Skip to content

MCP setupDatabasestypescript

Convex MCP Server

Let your coding agent inspect a Convex deployment's tables, data, logs and functions through the Convex CLI's MCP server, with write tools turned off.

npx workspacetemplates add convex-mcp --tool claude-code

Writes 1 file to your project root

.mcp.jsonmerge into your file15 lines · 225 BFile
{
  "mcpServers": {
    "convex": {
      "command": "npx",
      "args": [
        "-y",
        "convex@latest",
        "mcp",
        "start",
        "--disable-tools",
        "run,envSet,envRemove"
      ]
    }
  }
}

What it does

The Convex CLI ships an MCP server that starts with npx and talks to your project's deployment. The agent can list tables and schemas, page through documents, run read-only queries and read recent function logs.

This setup passes the documented --disable-tools flag to remove run, envSet and envRemove, so the agent can look at your backend but cannot call mutations or change environment variables.

Production deployments stay off by default. Convex asks for an explicit dangerous flag to enable them, and this setup does not add it.

Example

you › List my Convex tables, then show the five newest documents in messages and the last errors from the logs.

agent › Tables: users, messages, channels. The five newest messages are listed with their channelId and author. Logs show two sendMessage failures: a validation error for an empty body.

Questions

How do I limit it to one deployment?
Set the CONVEX_DEPLOY_KEY environment variable before starting the server. Convex notes that the insights tool is unavailable when you do.
How do I point it at production?
Convex requires the --dangerously-enable-production-deployments flag, and offers --cautiously-allow-production-pii for data reads. Leave both off unless you accept that risk.
Which tools can I switch off?
The flag takes data, envGet, envList, envRemove, envSet, functionSpec, insights, logs, run, runOneoffQuery, status and tables, separated by commas.
  • MongoDB MCP Server

    MCP setupDatabases

    Free
  • Neon MCP Server

    MCP setupDatabases

    Free
  • PlanetScale MCP Server

    MCP setupDatabases

    Free
  • Prisma MCP Server

    MCP setupDatabases

    Free