# Connect Claude Code, Cursor or another MCP client

> Give your coding agent Playcode's operations through MCP - run playcode mcp on your computer, or connect a client to Playcode's hosted server.
> Source: https://playcode.io/docs/developers/mcp - last reviewed 2026-10-10.

MCP lets a coding agent such as Claude Code or Cursor work in your Playcode workspace: list projects, read and change files, run commands, publish, manage domains. `playcode mcp` runs the server on your computer over your CLI sign-in. A client that connects to servers by address uses Playcode's hosted server instead, `https://playcode.io/api/mcp`.

## Do it yourself

1. Install the CLI: `npm i -g @playcode/cli`.
2. Sign in: `playcode login`. To let the agent manage domains too, run `playcode login --permissions projects:vm,domains:write`.
3. Add the server to your client's MCP settings. Claude Code, Cursor and Claude Desktop take it as a command:

   ```json
   {
     "mcpServers": {
       "playcode": {
         "command": "playcode",
         "args": ["mcp"]
       }
     }
   }
   ```

4. Restart the client, or reload its MCP servers. It shows four Playcode tools: `search_operations`, `describe_operation`, `read_operation` and `write_operation`.
5. Ask your agent, for example: "List my Playcode projects."

Or give your agent this sentence, and it sets itself up from [Docs for agents](/docs/developers/agents):

> Connect Playcode for me. Fetch https://playcode.io/docs/developers/agents.md and follow it.

### Use the hosted server

1. In your client, add a remote MCP server with the address `https://playcode.io/api/mcp`.
2. Your client opens Playcode's sign-in page, which says the tool wants to act as you. Check **What it may do**, pick the workspace under **Where**, and choose **Allow**.
3. The client now shows the four tools. On the **Developers** page, it appears under **Signed in as you**.

### The four tools

| Tool | What it does |
|---|---|
| `search_operations` | Finds operations by what they do, in words. Each result shows its effect (`READ`, `WRITE` or `MONEY`), the permission it needs and its arguments |
| `describe_operation` | One operation: its arguments as a JSON schema, an example, and what it returns |
| `read_operation` | Calls a `READ` operation with plain JSON arguments |
| `write_operation` | Calls a `WRITE` or `MONEY` operation. One that needs consent applies only with the id of a proposal from `proposalCreate`: see [Consent](/docs/developers/api#consent) |

## If it doesn't work

### "Not signed in. Run `playcode login`."

`playcode mcp` found no sign-in. Run `playcode login` in a terminal, then restart the client.

### "This sign-in cannot run ...: it needs the ... permission."

The sign-in lacks the permission the operation needs. Sign in again asking for it, like `playcode login --permissions projects:vm,domains:write`.

### "Your sign-in has ended: it was revoked, or thirty days passed without use."

Run `playcode login` again.

### "unauthorized: the access token is unknown, revoked or expired"

The hosted server refused the client's sign-in. Remove the server in your client and add it again, to sign in again.

### The client shows no Playcode tools

Run `playcode --version` in a terminal. If the command is not found, the client cannot start it either: install the CLI, or give the full path to `playcode` in the settings.

### "... takes a signed-in person, never a token"

Access tokens and webhooks are managed only by you, signed in to the app: on the **Developers** page, or by asking the agent in a chat.

## Limits

- Both servers act in one workspace, with the permissions allowed at sign-in.
- The hosted server does not offer the permission to change files, run commands or publish. For those, use `playcode mcp` with a sign-in that has **Projects and computers** (`projects:vm`).
- An operation that costs money or needs consent applies only with a proposal. A good agent shows you the terms and waits for your yes: [Docs for agents](/docs/developers/agents) tells it to.
- MCP does not reach access tokens, webhooks or an app's own settings, such as its email, secrets and AI.
- An interactive shell and large file transfers are the CLI's: `playcode vm shell` and `playcode vm cp`.
