PlanetScale MCP Server
Hosted Model Context Protocol server for PlanetScale databases, schema branching, query insights, and infrastructure metrics.
About this Server
The official PlanetScale Model Context Protocol (MCP) server connects AI agents directly to PlanetScale cloud databases and Vitess/Postgres infrastructure. It enables natural language schema exploration, read/write query execution with replica routing, schema change recommendations, error fingerprint tracking, query tag summaries, and deep Insights performance metrics.
Direct low-latency RPC protocol communication with structured JSON schemas.
Restricted capability bounds to prevent accidental modifications or leakage.
Security & Best Practices
When to Use (and When Not To)
- •Inspecting schemas, branches, and running SQL queries on PlanetScale databases
- •Diagnosing database latency and slow query bottlenecks using PlanetScale Insights
- •Reviewing schema index recommendations and error patterns without leaving the editor
- •Vector similarity search over unstructured document embeddings (use Chroma MCP instead)
- •Non-relational document stores and Atlas streams (use MongoDB MCP instead)
- •Local embedded in-memory Parquet analytics (use DuckDB / MotherDuck MCP instead)
Install & Setup
claude mcp add planetscale --transport http https://mcp.pscale.dev/mcp/planetscaleExposed Tools & Endpoints
10 toolsFunctions your AI agent can invoke via this Model Context Protocol server
Executes read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN) with optional replica or primary routing.
Executes write SQL queries (INSERT, UPDATE, DELETE, or DDL) against a PlanetScale database branch.
Retrieves the complete schema and table definitions for a specific database branch.
Fetches query performance insights, latency metrics, and row count trends for a database branch.
Lists all databases belonging to a specified PlanetScale organization.
Lists all development and production branches within a database.
Lists schema suggestions including missing indexes, redundant indexes, and primary key health.
Lists aggregated failing query patterns, error messages, and occurrence frequencies.
Fetches infrastructure telemetry: CPU, memory (RSS/cache), disk, replication lag, and connections.
Searches official PlanetScale documentation and technical guides.