MCP Server
Connect AI tools directly to Lux Cloud projects. Use MCP when you want agents to inspect projects, query tables, run Lux commands, read logs, and debug data without building your own control layer.
Setup
Claude Code
claude mcp add lux --transport http https://api.luxdb.dev/mcpClaude Code will open your browser to authenticate via OAuth. After approving, the connection is established automatically.
Claude Desktop
Add this to your Claude Desktop MCP config:
{"mcpServers":{"lux":{"url":"https://api.luxdb.dev/mcp"}}}Claude Desktop will handle the OAuth flow when it first connects.
With API Key (any client)
If your MCP client supports custom headers, you can use a lux_ API token from your dashboard settings:
{"mcpServers":{"lux":{"url":"https://api.luxdb.dev/mcp","headers":{"Authorization":"Bearer lux_YOUR_TOKEN"}}}}Available Tools
lux_list_projects
List all Lux Cloud projects for your account with status, memory, and region.
lux_project_status
Get detailed status and live metrics for a project: keys, memory, disk usage, ops/sec, connected clients, storage mode, and Lux Auth status.
lux_exec
Run any Lux/Redis command against a project.
SET key value
GET key
HSET hash field value
VSEARCH 3 5 0.1 0.2 0.3lux_table_query
Query a Lux table with WHERE, ORDER BY, and LIMIT.
lux_table_schema
Get the schema of a table (field names and types), or list all tables in a project.
lux_project_logs
Fetch recent logs from a project. Useful for debugging.
lux_restart_project
Restart a Lux Cloud project.
Example Usage
Once connected, you can ask your AI agent things like:
- "List my Lux projects"
- "What's the memory usage on my playground project?"
- "Create a users table with name, email, and age fields on my playground project"
- "Insert a test user into the users table"
- "Query all users where age is greater than 25"
- "Show me the logs for my http project"
- "Set a cache key on playground: SET greeting hello"
Authentication
The MCP server supports two authentication methods:
- OAuth 2.0 PKCE - Claude Code and Claude Desktop handle this automatically. A browser window opens for you to log in and approve access.
- API Key - Create a
lux_token in your dashboard settings and pass it as a Bearer token.
OAuth tokens are stored by your MCP client and refreshed automatically. You only need to authenticate once.
Endpoint
https://api.luxdb.dev/mcpOAuth metadata: https://api.luxdb.dev/.well-known/oauth-authorization-server