# P4 Plan MCP server

> Allows AI assistants to manage project data including tasks, sprints, bugs, and comments via the P4 Plan GraphQL API.

- Repository: https://github.com/perforce/p4plan-mcp
- Page: https://hostedmcp.org/servers/perforce/p4plan-mcp
- Official: yes
- Transport: stdio
- Stars: 4
- License: MIT
- Latest version: 2026.3.2

## Install

### Claude Code

```sh
claude mcp add --env 'P4PLAN_API_AUTH_TOKEN=<YOUR_P4PLAN_API_AUTH_TOKEN>' p4plan-mcp -- npx -y @perforce/p4plan-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "p4plan-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@perforce/p4plan-mcp"
      ],
      "env": {
        "P4PLAN_API_AUTH_TOKEN": "<YOUR_P4PLAN_API_AUTH_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "p4plan-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@perforce/p4plan-mcp"
      ],
      "env": {
        "P4PLAN_API_AUTH_TOKEN": "<YOUR_P4PLAN_API_AUTH_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"p4plan-mcp","type":"stdio","command":"npx","args":["-y","@perforce/p4plan-mcp"],"env":{"P4PLAN_API_AUTH_TOKEN":"<YOUR_P4PLAN_API_AUTH_TOKEN>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "p4plan-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@perforce/p4plan-mcp"
      ],
      "env": {
        "P4PLAN_API_AUTH_TOKEN": "<YOUR_P4PLAN_API_AUTH_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add p4plan-mcp --env 'P4PLAN_API_AUTH_TOKEN=<YOUR_P4PLAN_API_AUTH_TOKEN>' --env 'P4PLAN_API_AUTH_TOKEN=<YOUR_P4PLAN_API_AUTH_TOKEN>' -- npx -y @perforce/p4plan-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.p4plan-mcp]
command = "npx"
args = ["-y", "@perforce/p4plan-mcp"]

[mcp_servers.p4plan-mcp.env]
P4PLAN_API_AUTH_TOKEN = "<YOUR_P4PLAN_API_AUTH_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'P4PLAN_API_AUTH_TOKEN=<YOUR_P4PLAN_API_AUTH_TOKEN>' -e 'P4PLAN_API_AUTH_TOKEN=<YOUR_P4PLAN_API_AUTH_TOKEN>' p4plan-mcp npx -- -y @perforce/p4plan-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "p4plan-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@perforce/p4plan-mcp"
      ],
      "env": {
        "P4PLAN_API_AUTH_TOKEN": "<YOUR_P4PLAN_API_AUTH_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `P4PLAN_API_AUTH_TOKEN` | yes | yes | JWT bearer token for the P4 Plan GraphQL API. Forwarded as Authorization on every tool call. |
| `P4PLAN_API_AUTH_TOKEN` | yes | yes | JWT bearer token for the P4 Plan GraphQL API. Forwarded as Authorization on every tool call. |
| `LOG_LEVEL` | no | no |  |
| `P4PLAN_ALLOW_SELF_SIGNED_CERTS` | no | no | Set to 'true' to accept self-signed TLS certificates from the GraphQL API. Default: false. |
| `P4PLAN_ALLOW_SELF_SIGNED_CERTS` | no | no | Set to 'true' to accept self-signed TLS certificates from the GraphQL API. Default: false. |
| `P4PLAN_API_URL` | no | no | URL of the P4 Plan GraphQL API (default: http://localhost:4000). |
| `P4PLAN_API_URL` | no | no | URL of the P4 Plan GraphQL API (default: http://localhost:4000). |
| `P4PLAN_READONLY` | no | no | Set to 'true' to expose only the tools that read (same as the --readonly argument). Default: false. |
| `P4PLAN_READONLY` | no | no | Set to 'true' to expose only the tools that read (same as the --readonly argument). Default: false. |
| `P4PLAN_UPLOAD_DIRS` | no | no | Folders upload_attachment may read files from, besides the workspace folders the MCP client shares. Separate several with ':' (';' on Windows). |
| `P4PLAN_UPLOAD_DIRS` | no | no | Folders upload_attachment may read files from, besides the workspace folders the MCP client shares. Separate several with ':' (';' on Windows). |

## FAQ

### How do I authenticate with the P4 Plan MCP server?

Authentication is handled by providing a JWT token through the P4PLAN_API_AUTH_TOKEN environment variable.

### Can I run the server in a mode that prevents data modification?

Yes, you can enable read-only mode using the --readonly argument or by setting the P4PLAN_READONLY environment variable to true.

### Can I use Docker to run the server?

Yes, you can run the MCP server via Docker instead of installing Node.js locally using the perforce/p4plan-mcp image.
