Skip to content

MCP setupDatabases

PlanetScale MCP Server

Inspect PlanetScale databases and branches from your agent, run read queries, check schema and review performance insights over OAuth.

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

Writes 1 file to your project root

.mcp.jsonmerge into your file8 lines · 129 BFile
{
  "mcpServers": {
    "planetscale": {
      "type": "http",
      "url": "https://mcp.pscale.dev/mcp/planetscale"
    }
  }
}

What it does

PlanetScale hosts an MCP server that covers organizations, databases and branches. The agent can read a branch's schema, run read queries, pull query insights, list schema recommendations and search the PlanetScale documentation.

You sign in with OAuth and choose, per organization or database, whether the grant is none, read-only or full. Pick read-only for everyday work. The read query tool accepts only SELECT, SHOW, DESCRIBE and EXPLAIN, and reads go to a replica when one exists. PlanetScale also offers an insights-only endpoint with no query tools at all.

Example

you › Show the schema of the main branch of the shop database and flag any table without a primary key.

agent › 12 tables on main. The table session_events has no primary key; the other 11 do. Suggested fix: add an auto-increment id.

Questions

How do I keep it read-only?
Choose read-only in the OAuth prompt, or use the insights-only endpoint, which leaves out both query tools.
Can I use it in CI?
PlanetScale offers an MCP service token for headless agents. Its access level is set on the token.
Does it protect against bad writes?
With write access, UPDATE and DELETE without WHERE and TRUNCATE are blocked, and schema changes ask for confirmation.
  • Convex MCP Server

    MCP setuptypescript

    Free
  • MongoDB MCP Server

    MCP setupDatabases

    Free
  • Neon MCP Server

    MCP setupDatabases

    Free
  • Prisma MCP Server

    MCP setupDatabases

    Free