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

Installation

Use the CLI commands below to configure and run the PlanetScale MCP server:
pscale mcp install --target <claude|cursor|zed> # Writes the correct config for the selected tool
pscale mcp server                               # Enables read-only database interactions
The --target flag accepts claude, cursor, or zed. Run pscale mcp server whenever your AI tool needs to pull context from PlanetScale. You can get started using Claude, Cursor, or Zed immediately. Other tools should accept a configuration similar to the Cursor configuration shown below.

Claude Desktop:

1
Upgrade to the latest version of pscale CLI
2
Run pscale mcp install --target claude
3
Restart Claude Desktop so it picks up the new MCP server

Cursor

1
Upgrade to the latest version of pscale CLI
2
Run pscale mcp install --target cursor
3
Restart Cursor (or reload MCP servers) to start using PlanetScale context
If you prefer to manage the configuration manually—or want a reference for other MCP-compatible tools—add the following to your .cursor/mcp.json in your project or home directory:
{
  "mcpServers": {
    "planetscale": {
      "args": [
        "mcp",
        "server"
      ],
      "command": "pscale"
    }
  }
}

Zed

1
Upgrade to the latest version of pscale CLI
2
Run pscale mcp install --target zed
3
Restart or reload Zed to pick up the PlanetScale MCP server entry

OpenCode

1
Upgrade to the latest version of pscale CLI
2
Add the following configuration to your opencode.json file. See the OpenCode MCP documentation for where to find your OpenCode configuration file.
opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "planetscale": {
      "type": "local",
      "command": ["pscale", "mcp", "server"]
    }
  }
}

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, Cursor, Zed, or your preferred AI coding tool will then be able to access read-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.