# PlanetScale

Connects agents to PlanetScale databases, branches, schema, and query insights with direct SQL execution.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: planetscale
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/planetscale/mcp-server
- Updated: 2026-10-11
- HTML: https://affpapa.org/en/nevibecode/mcp/planetscale

## What it does

The PlanetScale MCP server gives coding agents direct access to your database environment. It allows models to read schema definitions, inspect branches, track slow operations, and execute SQL statements. You avoid leaving your workspace for the web console.

The complete tool collection runs on the hosted endpoint at `https://mcp.pscale.dev/mcp/planetscale`. The public codebase only includes TypeScript implementations and helpers, because the remaining production tools are generated directly from the PlanetScale API OpenAPI specification. Local contributors can test tools through `pnpm dev` using MCP Inspector over stdio.

## Requirements
- Remote server: `https://mcp.pscale.dev/mcp/planetscale`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http mcp-server https://mcp.pscale.dev/mcp/planetscale
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "planetscale": {
            "url": "https://mcp.pscale.dev/mcp/planetscale"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "planetscale": {
            "type": "http",
            "url": "https://mcp.pscale.dev/mcp/planetscale"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http planetscale https://mcp.pscale.dev/mcp/planetscale
```

## When to use it
- execute SQL queries inside PlanetScale databases
- inspect table schemas and database structure
- review available database branches
- diagnose slow queries using query insights
- test MCP tools locally with MCP Inspector

## Example prompts
- Fetch the schema for the `orders` table and list all database branches.
- Run `SELECT id, name FROM users LIMIT 5;` on the active branch.
- Check query insights to spot performance bottlenecks.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27844
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49863

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
