Navigation

PlanetScale Model Context Protocol (MCP)

With PlanetScale MCP support, AI tools like Claude or Cursor can directly access read-only database information to answer your questions about your database.

Installation

We have two new CLI Commands you can use to get up and running:

pscale mcp install --target claude # Installs PlanetScale MCP server in Claude Desktop
pscale mcp server                  # Enables Claude to perform read-only database interactions

The --target flag accepts claude or cursor.

You can get started using Claude or Cursor. Other tools should accept a configuration similar to the Cursor configuration.

Claude Desktop:

  1. Upgrade to the latest version of pscale CLI
  2. Run pscale mcp install --target claude
  3. Restart Claude Desktop

Cursor

Add the following to your .cursor/mcp.json in your project or home directory:

{
  "mcpServers": {
    "planetscale": {
      "args": [
        "mcp",
        "server"
      ],
      "command": "pscale"
    }
  }
}

Use cases

Using this functionality allows you to interact with your PlanetScale organizations and databases right from your AI tooling. You can ask questions like "How many users do I have in North Carolina?" or "How many rows are in my messages table?". Claude or your preferred AI coding tool will then be able to access road-only information from your PlanetScale account to give bespoke answers.

Need help?

Get help from the PlanetScale Support team, or join our GitHub discussion board to see how others are using PlanetScale.