PlanetScale MCP server

OfficialPlanetScaleConfig last verified Jun 1, 2026

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.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "planetscale": {
      "type": "http",
      "url": "https://mcp.pscale.dev/mcp/planetscale"
    }
  }
}
Or via CLI
bash
claude mcp add --transport http planetscale https://mcp.pscale.dev/mcp/planetscale

Heads up

  • First tool call opens a browser to authorize.

Available tools

ToolDescription
planetscale_list_organizationsLists all PlanetScale organizations the caller can access.
planetscale_get_organizationRetrieves details for a specific organization.
planetscale_list_databasesLists the databases within an organization.
planetscale_get_databaseRetrieves details for a specific database.
planetscale_list_branchesLists the branches within a database.
planetscale_get_branchRetrieves details for a specific branch.
planetscale_get_branch_schemaRetrieves the schema of a database branch.
planetscale_execute_read_queryRuns a read-only SQL query (SELECT) against a branch.
planetscale_execute_write_queryExecutes a write SQL query, including INSERT, UPDATE, DELETE, and DDL.
planetscale_get_insightsReturns query performance insights for a database.
planetscale_list_schema_recommendationsReturns schema optimization recommendations for a database.
planetscale_list_regions_for_organizationLists the regions available to an organization.
planetscale_list_cluster_size_skusLists the available cluster-size SKUs.
planetscale_list_invoicesLists invoices for an organization.
planetscale_get_invoice_line_itemsReturns invoice line items, including prorated costs.
planetscale_search_documentationSearches 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.
← Browse all databases servers