PlanetScale MCP server
PlanetScale's official hosted MCP server: explore organizations, databases, and branches, read and write SQL, and pull query insights.
The PlanetScale MCP server is PlanetScale's official integration that connects an AI agent to your PlanetScale databases. The agent can navigate the full hierarchy — list organizations, databases, and branches and fetch details for each — read a branch's schema, and run SQL: a dedicated read-query tool for SELECTs and a separate write-query tool for INSERT, UPDATE, DELETE, and DDL, so you can keep an agent read-only by simply not granting the write path. Beyond data access it surfaces operational context: query performance insights, schema recommendations to optimize a database, available regions and cluster-size SKUs, and even billing details through invoice and line-item tools. A documentation-search tool lets the agent answer PlanetScale how-to questions inline.
The canonical deployment is the hosted, authenticated remote server at https://mcp.pscale.dev/mcp/planetscale. Each client (Claude Code, Cursor, and other MCP-compatible tools) registers as an OAuth application with PlanetScale, so authentication happens through the browser with no long-lived database credentials sitting on disk. The older CLI-based server launched via pscale mcp is deprecated in favor of this hosted endpoint. Because read and write are split across separate tools, the server fits naturally into a least-privilege setup where an agent explores and queries production safely while writes stay gated.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Available tools
| Tool | Description |
|---|---|
| planetscale_list_organizations | Lists all PlanetScale organizations the caller can access. |
| planetscale_get_organization | Retrieves details for a specific organization. |
| planetscale_list_databases | Lists the databases within an organization. |
| planetscale_get_database | Retrieves details for a specific database. |
| planetscale_list_branches | Lists the branches within a database. |
| planetscale_get_branch | Retrieves details for a specific branch. |
| planetscale_get_branch_schema | Retrieves the schema of a database branch. |
| planetscale_execute_read_query | Runs a read-only SQL query (SELECT) against a branch. |
| planetscale_execute_write_query | Executes a write SQL query, including INSERT, UPDATE, DELETE, and DDL. |
| planetscale_get_insights | Returns query performance insights for a database. |
| planetscale_list_schema_recommendations | Returns schema optimization recommendations for a database. |
| planetscale_list_regions_for_organization | Lists the regions available to an organization. |
| planetscale_list_cluster_size_skus | Lists the available cluster-size SKUs. |
| planetscale_list_invoices | Lists invoices for an organization. |
| planetscale_get_invoice_line_items | Returns invoice line items, including prorated costs. |
| planetscale_search_documentation | Searches PlanetScale documentation. |
What you can do with it
Explore and query a database safely
The agent lists databases and branches, reads the branch schema, and runs SELECTs through the read-query tool to answer data questions — without the write path, so production stays read-only.
Tune performance from the agent
Pull query insights and schema recommendations to spot slow or unindexed access patterns, then apply DDL through the write-query tool once you have reviewed the change.
FAQ
- Is it free?
- The MCP server is free to use with a PlanetScale account; what you pay is for PlanetScale itself. Access scopes (and whether the write tool is available) follow your account's permissions.
- Does it support remote/OAuth?
- Yes. The canonical deployment is the hosted server at https://mcp.pscale.dev/mcp/planetscale, where each client registers as an OAuth application with PlanetScale, so you authenticate through the browser with no database credentials on disk. The older pscale mcp CLI server is deprecated.
- Can the agent modify or drop data?
- Only through the separate write-query tool, which handles INSERT, UPDATE, DELETE, and DDL. Read and write are split across distinct tools, so you can keep an agent read-only by not granting access to the write path.