PlanetScale MCP Server

Official PlanetScale MCP server: query database schema, performance data, and Insights directly from any compatible AI client – authenticated via OAuth.

Description

The PlanetScale MCP Server is PlanetScale's official Model Context Protocol server for AI-powered database access. It connects MCP-capable AI clients β€” including Claude Code, Cursor, VS Code, OpenCode, Codex, Gemini CLI, and Notion β€” to PlanetScale organizations, databases, branches, schemas, and query performance data (Insights). The official product link is https://planetscale.com/docs/mcp-server; the TypeScript tooling repository containing the directly maintained MCP tools lives at https://github.com/planetscale/mcp-server (Apache-2.0, 4 GitHub stars as retrieved from the API on 2026-09-08). The hosted server runs at https://mcp.pscale.dev/mcp/planetscale; no local build step, npm package, or own server infrastructure is required.

What is the PlanetScale MCP Server?

According to the provider, the PlanetScale MCP Server is a hosted remote server implementing the Model Context Protocol (MCP) that gives AI clients direct access to database metadata, schemas, query patterns, and performance metrics. The server is secured via OAuth for configurable permissions and scopes. Those who only need Insights data without query execution can use the separate insights-only endpoint at https://mcp.pscale.dev/mcp/planetscale-insights-only. For CI systems and headless agents that cannot support an interactive OAuth flow, service tokens are also available.

Available tools

The PlanetScale MCP Server exposes the following tools per the provider:
get_insights – Access query performance data and patterns from PlanetScale Insights
list_organizations / get_organization – List and inspect PlanetScale organizations
list_databases / get_database – List and inspect databases within an organization
list_branches / get_branch / get_branch_schema – List and inspect database branches and their schemas
list_regions_for_organization – List available regions for an organization
list_cluster_size_skus – List available cluster sizes (engine filter, rates, region)
search_documentation – Search PlanetScale documentation, code examples, API references, and guides

With optional permission: execute_read_query (read queries automatically routed to replicas), execute_write_query (write queries with built-in safeguards), and list_invoices / get_invoice_line_items (billing and invoice data).

Scopes and permissions

OAuth permissions are controlled through scopes. Scopes define which organizations, databases, and branches the server can see. For each database, no access, read-only access, or full access can be chosen independently for production and development branches. Per the provider, read access should be the default for production databases; write access to production should only be granted when explicitly required, and all queries should be carefully reviewed before execution.

Safe and intelligent query execution

The server includes several built-in safety features per the provider: Ephemeral credentials β€” each query uses short-lived credentials that are created on demand and deleted immediately after execution. Automatic replica routing β€” read-only queries are automatically routed to a replica when the database has replicas configured. Built-in query tagging β€” all queries include source=planetscale-mcp SQL comments for identification in PlanetScale Insights. Destructive query protection β€” UPDATE or DELETE statements without a WHERE clause are blocked, and TRUNCATE is not allowed. Human confirmation for DDL β€” schema-changing operations (CREATE, DROP, ALTER) prompt the language model to request human confirmation before proceeding.

Setup

Connecting to the PlanetScale MCP Server uses the server URL https://mcp.pscale.dev/mcp/planetscale. For Claude Code, the command claude mcp add --transport http planetscale https://mcp.pscale.dev/mcp/planetscale is sufficient. VS Code offers a one-click install button on the documentation page; manually, add the server via "MCP: Add Server" β†’ HTTP β†’ URL. Cursor also provides a one-click install button; manually, add the JSON configuration under .cursor/mcp.json. OpenCode adds the server through the global configuration file ~/.config/opencode/opencode.json. The PlanetScale MCP Server is also available as a connector in the Claude Connectors Directory and as a Claude Code plugin.

Use cases

Typical use cases per the provider include: analyzing and optimizing schema and queries (asking questions like "Why is this query slow?" or "How should I index this table?" based on the actual schema and query patterns), querying metrics in natural language (daily signups, active users, conversion rates without writing SQL), and debugging with full production context (schema, indexes, and query patterns available directly in the AI client).

Security and data access

The PlanetScale MCP Server transmits database structure information and query results to the connected AI client and from there to the chosen language model. Credentials are managed as short-lived and ephemeral; OAuth scopes determine which databases and operations are reachable. Write operations on production databases should only be configured with explicit authorization. Prompt injection via database content is a general risk for MCP servers that return database values; queries that return user-generated data in results should be tested before production use.

FAQ

Is the PlanetScale MCP Server free? The server itself is free to use. Costs arise from the PlanetScale database subscription; current plan and pricing details are at planetscale.com/pricing. Read tools such as get_insights, schema queries, and documentation search are available regardless of plan; write operations and billing data require the appropriate OAuth permissions.

Do I need to install anything locally? No. The PlanetScale MCP Server runs exclusively as a hosted remote service. Only the server URL in the AI client is needed; no npm package, local build, or own server infrastructure is required. For CI and headless environments, service tokens are recommended instead of OAuth.

What do the 4 GitHub stars mean? The repository github.com/planetscale/mcp-server contains the MCP tools maintained directly in TypeScript; the full hosted server includes additional tools generated from the PlanetScale API OpenAPI specification that do not live in this repository. The low star count reflects the tooling-repository nature of the project, not the breadth of usage of the hosted server.

Requirements

Active PlanetScale account and an MCP-capable AI client such as Claude Code, Cursor, VS Code, or OpenCode. For CI and headless environments, a PlanetScale service token is recommended instead of OAuth.

Installation instructions

For Claude Code: claude mcp add --transport http planetscale https://mcp.pscale.dev/mcp/planetscale. VS Code: add server URL https://mcp.pscale.dev/mcp/planetscale (type HTTP) via "MCP: Add Server". Cursor: one-click install button on planetscale.com/docs/mcp-server or manual JSON configuration under .cursor/mcp.json.

claude mcp add --transport http planetscale https://mcp.pscale.dev/mcp/planetscale

Authentication

OAuth flow through PlanetScale login (recommended for interactive clients) or PlanetScale service token for CI and headless environments.

Required access permissions

Access is configured per OAuth scope at the organization, database, and branch level. Read and write access are separately configurable; write access to production branches requires explicit authorization.

Transmitted or stored data

The server transmits database structure, schemas, query performance data, and query results to the connected AI client. Credentials are short-lived and deleted after each query.

Security risks

Write access to production databases should only be configured with explicit authorization. Prompt injection via database content is a general MCP risk for servers that return database values. UPDATE/DELETE without a WHERE clause are blocked server-side; DDL operations require user confirmation.

License and costs

License
Apache-2.0
Cost
free

The MCP server is free to use. Costs arise from the PlanetScale database subscription. Current pricing at planetscale.com/pricing.

Alternatives

Not recorded yet.

At a glance

Provider
PlanetScale
Status
Official server
Deployment
Remote
Current version
Not recorded yet.
GitHub stars
6
Last reviewed
08.09.2026

Repository and documentation

Categories

Supported clients