PlanetScale — Claude Code MCP server: what it does, how to install
Connects agents to PlanetScale databases, branches, schema, and query insights with direct SQL execution.
claude mcp add --transport http mcp-server https://mcp.pscale.dev/mcp/planetscaleWhat PlanetScale does
The PlanetScale MCP server gives coding agents direct access to your database environment. It allows models to read schema definitions, inspect branches, track slow operations, and execute SQL statements. You avoid leaving your workspace for the web console.
The complete tool collection runs on the hosted endpoint at https://mcp.pscale.dev/mcp/planetscale. The public codebase only includes TypeScript implementations and helpers, because the remaining production tools are generated directly from the PlanetScale API OpenAPI specification. Local contributors can test tools through pnpm dev using MCP Inspector over stdio.
What it helps with
- execute SQL queries inside PlanetScale databases
- inspect table schemas and database structure
- review available database branches
- diagnose slow queries using query insights
- test MCP tools locally with MCP Inspector
Example prompts for the agent
- Fetch the schema for the
orderstable and list all database branches. - Run
SELECT id, name FROM users LIMIT 5;on the active branch. - Check query insights to spot performance bottlenecks.
How to install PlanetScale
Platform CLI: remote server
claude mcp add --transport http mcp-server https://mcp.pscale.dev/mcp/planetscalePlatform CLI: remote server
codex mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscaleConfig file
{
"mcpServers": {
"planetscale": {
"url": "https://mcp.pscale.dev/mcp/planetscale"
}
}
}Config file
{
"servers": {
"planetscale": {
"type": "http",
"url": "https://mcp.pscale.dev/mcp/planetscale"
}
}
}Platform CLI: remote server
gemini mcp add -t http planetscale https://mcp.pscale.dev/mcp/planetscaleStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about PlanetScale
How do I install PlanetScale in Claude Code?
Run claude mcp add --transport http planetscale https://mcp.pscale.dev/mcp/planetscale in your terminal.
What does the PlanetScale MCP server do?
It lets coding assistants interact with PlanetScale databases to query schemas, inspect branches, check performance insights, and run SQL.
Why are some tools absent from the repository?
The repository only maintains manual TypeScript tools, while other production endpoints are automatically generated from the PlanetScale OpenAPI spec.