> ## Documentation Index
> Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PlanetScale CLI commands: mcp

<Warning>
  The `mcp` command is no longer recommended. Please use the hosted and authenticated [PlanetScale MCP server](/connect/mcp) instead.
</Warning>

## Getting Started

Make sure to first [set up your PlanetScale developer environment](/cli/planetscale-environment-setup). 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:**

```bash theme={null}
pscale mcp <SUB-COMMAND> <FLAG>
```

### Available sub-commands

| **Sub-command** | **Product**      | **Description**        |
| :-------------- | :--------------- | :--------------------- |
| `install`       | Postgres, Vitess | Install the MCP server |
| `server`        | Postgres, Vitess | Start the MCP server   |

### Available flags

| **Flag**       | **Description**                                                                          |
| :------------- | :--------------------------------------------------------------------------------------- |
| `--target`     | The target installation for the MCP server. Supported values: `claude`, `cursor`, `zed`. |
| `-h`, `--help` | View help for `mcp` command                                                              |

### Global flags

| **Command**                     | **Description**                                                                      |
| :------------------------------ | :----------------------------------------------------------------------------------- |
| `--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`.                      |
| `--debug`                       | Enable debug mode.                                                                   |
| `-f`, `--format <FORMAT>`       | Show output in a specific format. Possible values: `human` (default), `json`, `csv`. |
| `--no-color`                    | Disable 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:**

```bash theme={null}
pscale mcp install --target cursor
```

**Output:**

```bash theme={null}
MCP server successfully configured for cursor at /Users/your-name/.cursor/mcp.json
```

## Need help?

Get help from [the PlanetScale Support team](https://planetscale.com/contact?initial=support), or join our [Discord community](https://pscale.link/community) to see how others are using PlanetScale.
