Navigation

PlanetScale CLI commands: mcp

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you've installed the pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.

The mcp command

This command installs and enables support for a PlanetScale MCP server.

Usage:

pscale mcp <SUB-COMMAND> <FLAG>

Available sub-commands

Sub-commandDescription
installInstall the MCP server
serverStart the MCP server

Available flags

FlagDescription
--targetThe target installation for the MCP server. claude and cursor are the only supported values.
-h, --helpView help for mcp command

Global flags

CommandDescription
--api-token <TOKEN>The API token to use for authenticating against the PlanetScale API.
--api-url <URL>The base URL for the PlanetScale API. Default is https://api.planetscale.com/.
--config <CONFIG_FILE>Config file. Default is $HOME/.config/planetscale/pscale.yml.
--debugEnable debug mode.
-f, --format <FORMAT>Show output in a specific format. Possible values: human (default), json, csv.
--no-colorDisable color output.
--service-token <TOKEN>The service token for authenticating.
--service-token-id <TOKEN_ID>The service token ID for authenticating.

Examples

The mcp command with list sub-command

Command:

pscale mcp install --target cursor

Output:

MCP server successfully configured for cursor at /Users/your-name/.cursor/mcp.json

Need help?

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