planetscale avatar

PlanetScale

planetscale/mcp-serverOfficial

A solid bridge to PlanetScale's database platform that exposes both their public API and direct SQL execution capabilities. You get tools for managing databases and branches, inspecting schema and query insights, plus the ability to run SQL queries directly. The implementation is split between hand-written TypeScript tools in the open source repo and auto-generated tooling from PlanetScale's OpenAPI spec. Runs as a hosted server over streamable HTTP, so no local installation needed. Reach for this when you're working with PlanetScale databases and want Claude to help with schema exploration, query optimization, or direct database operations without context switching to the console.

tools
16
transport
HTTP
last updated
Apr 15, 2026

Tools

16 tools

Public tool metadata for what this MCP can expose to an agent.

planetscale_list_regions_for_organizationList the regions available for an organization.2 params

List the regions available for an organization.

Parameters* required
pathParametersobject
queryParametersobject
planetscale_get_invoice_line_itemsGet all line items for an invoice. See prorated costs broken down by database branch. Including storage, egress bandwidth and development branches.2 params

Get all line items for an invoice. See prorated costs broken down by database branch. Including storage, egress bandwidth and development branches.

Parameters* required
pathParametersobject
queryParametersobject
planetscale_list_invoicesList all invoices for an organization.2 params

List all invoices for an organization.

Parameters* required
pathParametersobject
queryParametersobject
planetscale_list_schema_recommendationsList all schema recommendations for a database. Each schema recommendation is based on production data from the users database. If you have access to the code base generating the queries, evaluate the code in the context of the recommendation to determine the best steps forwar...2 params

List all schema recommendations for a database. Each schema recommendation is based on production data from the users database. If you have access to the code base generating the queries, evaluate the code in the context of the recommendation to determine the best steps forwar...

Parameters* required
pathParametersobject
queryParametersobject
planetscale_get_branch_schemaGet the schema (tables, columns) for a database branch2 params

Get the schema (tables, columns) for a database branch

Parameters* required
pathParametersobject
queryParametersobject
planetscale_list_branchesList all branches within a databases2 params

List all branches within a databases

Parameters* required
pathParametersobject
queryParametersobject
planetscale_get_organizationGet details about a specific organization1 params

Get details about a specific organization

Parameters* required
pathParametersobject
planetscale_list_databasesList all databases within an organization2 params

List all databases within an organization

Parameters* required
pathParametersobject
queryParametersobject
planetscale_get_branchGet details about a database branch1 params

Get details about a database branch

Parameters* required
pathParametersobject
planetscale_get_databaseGet details about a specific database1 params

Get details about a specific database

Parameters* required
pathParametersobject
planetscale_list_organizationsList all PlanetScale organizations you have access to1 params

List all PlanetScale organizations you have access to

Parameters* required
queryParametersobject
planetscale_search_documentationSearch across the PlanetScale knowledge base to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about PlanetScale, find specific documentation, understand how features work, or locate implementation details....5 params

Search across the PlanetScale knowledge base to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about PlanetScale, find specific documentation, understand how features work, or locate implementation details....

Parameters* required
api_reference_onlyboolean
Only return API reference docs
code_onlyboolean
Only return code snippets
languagestring
Optional language filter (e.g., 'en', 'es')
querystring
Search query for PlanetScale docs
versionstring
Optional version filter (e.g., 'v0.7')
planetscale_list_cluster_sizesList available PlanetScale cluster sizes (SKUs) for an organization. PS-* sizes use autoscaling network-backed storage; M-* sizes use super fast NVMe storage drives. The rate field is for an HA cluster with 2 replicas; replica_rate is for a single instance. Single instance dat...3 params

List available PlanetScale cluster sizes (SKUs) for an organization. PS-* sizes use autoscaling network-backed storage; M-* sizes use super fast NVMe storage drives. The rate field is for an HA cluster with 2 replicas; replica_rate is for a single instance. Single instance dat...

Parameters* required
enginestring
Database engine to list SKUs for (default: mysql)one of mysql · postgresql
organizationstring
PlanetScale organization name
typestring
Filter to only autoscaling (PS-*, network-backed) or metal (M-*, local storage) sizesone of autoscaling · metal
planetscale_get_insightsGet query performance insights for a PlanetScale database branch. By default, aggregates the top queries across 5 different metrics (slowest, most time-consuming, most rows read, most inefficient, most rows affected) for a comprehensive view. Can also fetch queries sorted by a...5 params

Get query performance insights for a PlanetScale database branch. By default, aggregates the top queries across 5 different metrics (slowest, most time-consuming, most rows read, most inefficient, most rows affected) for a comprehensive view. Can also fetch queries sorted by a...

Parameters* required
branchstring
Branch name (e.g., 'main')
databasestring
Database name
limitnumber
Number of results per metric (default: 5, max: 20)
organizationstring
PlanetScale organization name
sort_bystring
Sort order: 'all' (default) aggregates 5 API calls for comprehensive view, or specify a single metric: 'totalTime', 'rowsRead', 'p99Latency', 'rowsReadPerReturned', 'rowsAffected'one of all · totalTime · rowsReadPerReturned · rowsRead · p99Latency · rowsAffected
planetscale_execute_write_queryExecute a write SQL query (INSERT, UPDATE, DELETE, or DDL) against a PlanetScale database. This tool creates short-lived credentials and executes the query securely. TRUNCATE is blocked. DELETE and UPDATE without WHERE clause are blocked. IMPORTANT: DELETE queries and DDL stat...5 params

Execute a write SQL query (INSERT, UPDATE, DELETE, or DDL) against a PlanetScale database. This tool creates short-lived credentials and executes the query securely. TRUNCATE is blocked. DELETE and UPDATE without WHERE clause are blocked. IMPORTANT: DELETE queries and DDL stat...

Parameters* required
branchstring
Branch name (e.g., 'main')
confirm_destructiveboolean
HUMAN CONFIRMATION REQUIRED: Only set to true after explicitly asking the user and receiving their approval. Show them the exact DELETE or DDL query first.
databasestring
Database name
organizationstring
PlanetScale organization name
querystring
SQL INSERT/UPDATE/DELETE/DDL query to execute
planetscale_execute_read_queryExecute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN) against a PlanetScale database. This tool creates short-lived credentials and executes the query securely.4 params

Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN) against a PlanetScale database. This tool creates short-lived credentials and executes the query securely.

Parameters* required
branchstring
Branch name (e.g., 'main')
databasestring
Database name
organizationstring
PlanetScale organization name
querystring
SQL SELECT query to execute

Sponsors

Readme

PlanetScale MCP Server Tools

This repository contains tool implementations that are part of the PlanetScale MCP server.

The full hosted MCP server includes additional tools that are generated from the PlanetScale API OpenAPI spec, not every production tool lives in this repository.

Related docs

Project scope

This repo is focused on:

  • MCP tools we maintain directly in TypeScript
  • shared helper code used by those tools
  • local development and validation of the open-source portions

Some MCP functionality is intentionally not duplicated here because it is generated from the API spec and maintained in that generation pipeline.

Quick start

Install dependencies:

pnpm install

Build a deployment zip:

pnpm build

Push to Gram:

pnpm push

Testing locally

Run a local MCP server over stdio with inspector support:

pnpm dev

This launches MCP Inspector so you can interactively test tool behavior during development.

Contributing


View the full README on GitHub

Details

Repository
github.com/planetscale/mcp-server
Website
planetscale.com/docs/connect/mcp
Category
Databases
Transport
HTTP
Registry
MCP registry, active

Related Databases MCP servers

View all
1bluwork avatarPostgres Scout Mcpbluwork/postgres-scout-mcpScout your PostgreSQL databases with AI - safety features, monitoring, and data quality0stars
2daedalus avatarMcp Mysql Connectordaedalus/mcp-mysql-connectorMCP server exposing MySQL database functionalities as tools0stars
3itunified-io avatarPostgreSQL MCP Serveritunified-io/mcp-postgresPostgreSQL MCP Server — 27 tools for queries, schema, CRUD, DBA, HA & server management0stars
4rog0x avatarDatabaserog0x/mcp-database-toolsSQL formatting, schema visualization, migration generation0stars
5musaddiq-dev avatarPostgreSQL MCP Servermusaddiq-dev/postgresql-mcp-serverPython MCP server for PostgreSQL database inspection and querying0stars
6neo4j-contrib avatarMcp Neo4j Aura Managerneo4j-contrib/mcp-neo4jMCP server for Neo4j Aura Database Instance Manager.958stars