Back to Servers

PlanetScale

Official

by PlanetScale

The PlanetScale MCP Server is an official, hosted Model Context Protocol server that bridges AI assistants and PlanetScale MySQL databases. Unlike self-hosted MCP servers that require local installation and credential management, PlanetScale runs its server at mcp.pscale.dev, handling authentication through OAuth with granular permission scopes. This architecture eliminates the need to store database credentials on developer machines entirely. The server exposes 16 tools organized into four functional groups. Infrastructure tools let AI agents list organizations, databases, branches, regions, and cluster SKUs. Query tools handle both read and write operations with built-in safety rails: read queries automatically route to replicas when available, reducing primary database load, while write queries enforce destructive query protection that blocks UPDATE and DELETE statements lacking a WHERE clause and prevents TRUNCATE operations altogether. Schema management tools provide branch schema inspection and performance-oriented schema recommendations powered by PlanetScale Insights data. A documentation search tool rounds out the toolset by letting agents query PlanetScale docs directly. Security is deeply integrated into the server's design through three mechanisms. First, all database credentials are ephemeral, created on demand for each query execution and deleted immediately after. Second, every query is tagged with a source=planetscale-mcp SQL comment, making all AI-originated queries visible in PlanetScale Insights for auditing and performance monitoring. Third, DDL operations such as CREATE TABLE, ALTER TABLE, and DROP TABLE require explicit human confirmation before the server executes them, preventing accidental schema changes from autonomous AI agents. The server supports a wide range of MCP clients including Claude Desktop, Claude Code, Cursor, VS Code, Notion, Zed, and CLI tools like OpenCode, Codex CLI, Gemini CLI, and Amp CLI. Quick-install options are available for Cursor and VS Code through one-click buttons, while Claude Desktop users can add it through the Connectors Directory. Launched in January 2026, the PlanetScale MCP Server represents a production-grade approach to database-AI integration with enterprise security guarantees.

databaseplanetscale-mcpmysql-databasedatabase-managementoauth-authenticationmodel-context-protocol

Installation

# See GitHub for installation instructions

Key Features

  • 16 MCP tools across infrastructure, query execution, analytics, and billing categories with OAuth-based authentication
  • Automatic replica routing sends read-only queries to replicas when available, reducing primary database load
  • Ephemeral credentials created on demand and deleted after each query execution, eliminating persistent credential storage
  • Destructive query protection blocks UPDATE/DELETE without WHERE clauses and prevents TRUNCATE statements entirely
  • Human confirmation required for all DDL schema changes, preventing accidental ALTER TABLE or DROP operations from AI agents
  • Built-in query tracking via source=planetscale-mcp SQL comments for full visibility in PlanetScale Insights
  • Schema recommendations tool analyzes database structure and suggests performance optimizations based on Insights data
  • Hosted server architecture at mcp.pscale.dev requires zero local installation or credential management

Use Cases

  • Query production data using natural language through Claude or Cursor without writing SQL manually or sharing database credentials
  • Analyze slow queries and optimize database schema by combining PlanetScale Insights data with AI-powered recommendations
  • Debug application issues by correlating code context with live database state, branch schemas, and query performance metrics
  • Manage PlanetScale branch workflows from AI assistants, inspecting schemas across development and production branches
  • Monitor database costs and resource usage by querying invoices and cluster SKU pricing directly through AI conversations

FAQ

Server Stats

GitHub Stars
647
Updated
3/10/2026

Category

Related Resources

Weekly AI Digest