Listed from the MCP registry; nobody on Odel publishes it.
MCP server for P4 Plan — tasks, sprints, bugs, comments, custom fields via GraphQL API.
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y @perforce/p4plan-mcp
MCP client config
{
"mcpServers": {
"p4plan": {
"command": "npx",
"args": [
"-y",
"@perforce/p4plan-mcp"
]
}
}
}Run
docker run -i --rm docker.io/perforce/p4plan-mcp:2026.3.2
MCP client config
{
"mcpServers": {
"p4plan": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/perforce/p4plan-mcp:2026.3.2"
]
}
}
}
MCP (Model Context Protocol) server for P4 Plan, enabling AI assistants like Claude and VS Code Copilot to interact with P4 Plan project management data.
Architecture · Prerequisites · Quick Start · Install · Client Configurations · Tools
Skills · Logging · Troubleshoot · Development · License
This service acts as a stateless protocol adapter between MCP clients (AI assistants) and the P4 Plan GraphQL API, using stdio transport (stdin/stdout).
┌─────────────────┐ stdio (stdin/stdout) ┌─────────────────┐ GraphQL ┌─────────────────┐
│ AI Client │ ────────────────────────▶ │ P4 Plan MCP │ ──────────────▶ │ P4 Plan GraphQL │
│(Claude, Copilot)│ Spawns as child process │ Server │ Port 4000 │ API │
│ │ P4PLAN_API_AUTH_TOKEN │ (stateless) │ Bearer token │ │
└─────────────────┘ env var └─────────────────┘ forwarded └─────────────────┘
The client spawns the MCP server as a child process. Authentication is provided via the P4PLAN_API_AUTH_TOKEN environment variable, which the server validates at startup and forwards to the GraphQL API on every tool call.
| Requirement | Version | Notes |
|---|---|---|
| Node.js | >= 20 (24+ recommended) | The server targets ES2023. Check with node -v. |
| npm | >= 9 | Comes with Node.js. Check with npm -v. |
| P4 Plan API | >= 2026.1.002 | Required for all tool operations. Earlier versions are not supported. |
Tip: Use nvm to manage Node.js versions, or skip the Node.js requirement entirely by using Docker.
The fastest way to get started — no installation required. Just configure your MCP client to use npx:
npx -y @perforce/p4plan-mcp
npx automatically downloads and runs the latest version of the server. Your MCP client (VS Code, Claude Desktop, etc.) handles this for you — just add the config below and start chatting.
VS Code — add to .vscode/mcp.json:
{
"servers": {
"p4-plan": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
Claude Desktop — add to your config:
{
"mcpServers": {
"p4-plan": {
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
Note: The
-yflag auto-confirms the npm install prompt so the server starts without user interaction.
See Client Configuration for more options including Docker, secure token prompts, and local builds.
This server is published to the official MCP Registry as io.github.perforce/p4plan-mcp. Discover it via the registry API:
curl 'https://registry.modelcontextprotocol.io/v0/servers?search=io.github.perforce/p4plan-mcp'
MCP clients that support registry discovery can install the server by name without needing to know the npm package identifier.
For development or when you want to run from a local clone:
npm ci
npm run build
# For using npx locally
npm link
Run the MCP server via Docker instead of installing Node.js locally. The MCP client (VS Code, Claude Desktop) spawns the container as a child process — same as npx, just using docker as the command.
The image is published to Docker Hub at perforce/p4plan-mcp, built multi-arch (linux/amd64 + linux/arm64) on every release, with SLSA provenance and SBOM attestations.
VS Code (.vscode/mcp.json):
{
"servers": {
"p4-plan": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "P4PLAN_API_AUTH_TOKEN=YOUR_JWT_TOKEN",
"-e", "P4PLAN_API_URL=http://host.docker.internal:4000",
"perforce/p4plan-mcp:latest"
]
}
}
}
Claude Desktop:
{
"mcpServers": {
"p4-plan": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "P4PLAN_API_AUTH_TOKEN=YOUR_JWT_TOKEN",
"-e", "P4PLAN_API_URL=http://host.docker.internal:4000",
"perforce/p4plan-mcp:latest"
]
}
}
}
Note: Use
host.docker.internal(macOS/Windows) or172.17.0.1(Linux) to reach the P4 Plan GraphQL API running on the host machine.
Pin a specific version by replacing
:latestwith:2026.3.2(or whichever tag) for reproducible deployments.
Build locally (for development against unreleased changes):
docker build -t p4plan-mcp:dev .
# then swap "perforce/p4plan-mcp:latest" for "p4plan-mcp:dev" in the configs above
Copy the example config and configure:
cp config-example.env .env
Edit .env with your settings:
# JWT token for authenticating with P4 Plan GraphQL API
# Obtain via: login mutation on the GraphQL API
P4PLAN_API_AUTH_TOKEN=your-jwt-token
# P4 Plan GraphQL API URL — base origin only. Do not include a path or a
# trailing slash: the server appends /graphql, /healthcheck and /attachment/<id>
# itself, so a trailing slash produces //graphql.
P4PLAN_API_URL=https://p4plan-api.example.com
# Logging
LOG_LEVEL=info
# Maximum number of results returned by search_tasks (default: 400)
# SEARCH_LIMIT=400
# Allow self-signed TLS certificates when connecting to the P4 Plan API over HTTPS
# Set to true if your API uses a self-signed or untrusted certificate
# P4PLAN_ALLOW_SELF_SIGNED_CERTS=true
# Read-only mode: expose only the tools that read (same as the --readonly argument)
# P4PLAN_READONLY=true
# Folders upload_attachment may read files from, besides the workspace folders
# the MCP client shares. Separate several with ":" (";" on Windows)
# P4PLAN_UPLOAD_DIRS=/Users/me/Screenshots:/Users/me/logs
The server communicates via stdin/stdout. It is not meant to be run interactively — MCP clients (VS Code, Claude Desktop) spawn it as a child process automatically.
Start the server with the --readonly argument, or set P4PLAN_READONLY=true, to make it read-only:
comment-html-format, mentions) are left out.This means content read from P4 Plan (a task description or a comment, for example) cannot steer the model into changing data through this server.
{
"servers": {
"p4-plan": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp", "--readonly"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
With Docker, pass -e P4PLAN_READONLY=true or put --readonly after the image name. With Docker Compose, set P4PLAN_READONLY=true in your shell or .env; docker-compose.yml passes it to the container.
Read-only mode limits what the MCP server does; it does not change what the token may do. For the strongest guarantee, also authenticate as a P4 Plan user that only has read access.
upload_attachment attaches a local file, or text the model writes, to a task, bug, sprint or release. Reading local files would let a prompt injection ask for something like ~/.ssh/id_rsa, so the server only reads files inside allowed folders:
P4PLAN_UPLOAD_DIRS (separate several with :, or ; on Windows).Symlinks are resolved before the check, hidden files and folders (names starting with ., such as .env, .ssh or .git) are never uploaded, and only regular files are read. If the client shares no folders and P4PLAN_UPLOAD_DIRS is not set, only text uploads (content + fileName) work.
With Docker the container cannot see your files: mount a folder and point P4PLAN_UPLOAD_DIRS at the path inside the container, for example -v "$HOME/Screenshots:/uploads:ro" -e P4PLAN_UPLOAD_DIRS=/uploads, and pass paths such as /uploads/bug.png.
The file is streamed to the P4 Plan API (POST /attachment/<id>/upload), so its content never passes through the model. The P4 Plan server's own limits apply: its attachment size limit and blocked file types. If a file with the same name is already attached, the server stores the new one as name (1).ext. If an upload times out it may still have completed, so check get_attachments before retrying.
To show an image inside a comment or a multiline field (bug description, steps to reproduce, Multiline Text columns), upload it to the same item and put the returned imageHtml (<img src="hansoft://...">) in the HTML. This is how the P4 Plan clients embed pasted images; the server turns images with any other src into plain links.
So that one client cannot flood the P4 Plan API (a model stuck in a loop, or a prompt injection asking for many files), each MCP server runs its uploads one at a time and starts at most 20 uploads per minute. Further calls get an error saying how long to wait.
Every tool publishes MCP tool annotations. readOnlyHint marks the tools that only read; tools that write also carry destructiveHint (the call deletes or overwrites data) and idempotentHint. Clients that support annotations can use them to ask for confirmation before a write.
The MCP server requires a JWT token provided via the P4PLAN_API_AUTH_TOKEN environment variable. The token is validated at startup and forwarded to the P4 Plan GraphQL API on every tool call. No sessions or state are maintained.
Get a JWT token from the P4 Plan GraphQL API using curl. You can authenticate with either your password or a Personal Access Token (PAT):
curl -s -X POST http://localhost:4000/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "mutation Login($loginUserInput: LoginUserInput!) { login(loginUserInput: $loginUserInput) { access_token } }",
"variables": { "loginUserInput": { "username": "YOUR_USERNAME", "password": "YOUR_PASSWORD" } }
}'
A PAT can be used in place of your password in the same login mutation. This avoids exposing your actual password:
curl -s -X POST http://localhost:4000/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "mutation Login($loginUserInput: LoginUserInput!) { login(loginUserInput: $loginUserInput) { access_token } }",
"variables": { "loginUserInput": { "username": "YOUR_USERNAME", "password": "YOUR_PERSONAL_ACCESS_TOKEN" } }
}'
Both methods return the same response:
{
"data": {
"login": {
"access_token": "eyJhbGciOiJIUzI1NiIs..."
}
}
}
Copy the access_token value and use it in your MCP client configuration.
Note: JWT tokens expire. When your token expires, the server will fail to start with an authentication error. Generate a new JWT using the same
curlcommand above.
Tool arguments are parsed leniently, so less capable models succeed more often. Enum values match regardless of case, spaces, _ or - ("Time Spent" → timeSpent). "true"/"yes" are accepted for booleans, numbers for IDs, numeric strings for numbers, and JSON-encoded lists or comma-separated ID lists. Anything that can't be mapped unambiguously is rejected with the allowed values.
list_projects - List all active projects the user is a member ofget_project - Get project configuration including archivedStatus, backlog ID, and QA IDprojectIdcreate_project - Create a project and set up its team in one callname, optional methodTemplate, defaultMode, members (user or global group names/IDs), managers (normal user names/IDs), addMeAsManager (default true), or copyFromProjectId with copyUsers/copyColumns to base it on an existing projectfailedget_my_tasks - Get tasks assigned to current user (todoList)showCompleted, showOnlyNextFourWeeks, showHidden, showPipelineTasksThatCannotStartget_tasks - Get detailed information for one or more items by ID (max 20)taskIds (array of strings, max 20) -- database item IDs, i.e. the id returned by other toolsid (the database ID that all tools take) and localID (the number shown in the P4 Plan UI's "ID" column).search_tasks - Search for items in a project section using P4 Plan Find queriesfindQuery, projectIdread_skill with skillName="search-queries" first to get exact column names, operators, and value formats. For simple name search use Itemname:Text("text"). Supports filtering by status, assignee, severity, item type, dates, boolean conditions, and combinations with AND/OR/NOT.ID=<n> matches the UI "ID" column (the local ID, unique only within a section) and Databaseid=<n> matches the database ID.create_item - Create any item typebacklog_task, bug, scheduled_task, sprint, release, sprint_tasktype, name, projectId, parentItemId, previousItemId, and type-specific fieldsupdate_item - Update any item (auto-detects type)itemId, plus any updatable fields (name, status, assignedTo, points, etc.)commit_to_sprint - Commit a backlog task or bug to a sprinttaskId, sprintIduncommit_from_sprint - Remove a task from a sprint (return to backlog)taskIdget_custom_columns - Get custom column definitions available in a projectprojectIdcreate_custom_column - Create a custom column (e.g. Time Spent) in a project sectionprojectId (planning, backlog or QA ID), name, columnType, activated, readOnly, plus type-specific unitName, updateOn*/updateOnlyFirstTime, useForTimeReporting/updateWorkRemaining, dropListItems (labels, or objects with icon, autoAssignToUsers, autoAssignToUserGroups)get_custom_fields - Get custom field values set on a tasktaskId, onlySetset_custom_field - Set a custom field value on a tasktaskId, customFieldId, valueget_workflows - Get workflow definitions and status IDs for a projectprojectIdcomplete_task - Mark a task as completedtaskIdstart_task - Mark a task as in progresstaskIdget_comments - Get all comments on a tasktaskIdpost_comment - Post a new comment on a tasktaskId, textupdate_comment - Edit an existing commenttaskId, commentId, textdelete_comment - Delete a comment from a tasktaskId, commentIdget_attachments - Get all attachments on a tasktaskIddownload_attachment - Download and return attachment file contenttaskId, pathupload_attachment - Attach a local file or text to a tasktaskId, and either filePath (optionally fileName to rename it) or content + fileNamepath; the first image attached becomes the cover imageimageHtml, an <img> tag that shows the image inside a comment, description, steps to reproduce or Multiline Text field of the same itemdelete_attachment - Delete an attachment from a tasktaskId, pathset_cover_image - Set or unset the cover image for a tasktaskId, imagePathlink_items - Create internal or external linksfromItemId, toItemId or url, relation (blocks, duplicates, relatedTo)unlink_items - Remove an internal or external linkfromItemId, toItemId or urlget_current_user - Get current user informationlist_project_users - List users in a projectprojectIdread_skill - Read a P4 Plan skill document at runtimeskillNameskillName="search-queries" before composing any findQuery for search_tasks.project-navigation, search-queries, task-management, planning, backlog-refinement, bug-tracking, custom-fields, gantt-scheduling, workflows, pipeline, comment-html-format, mentionsCreate .vscode/mcp.json in your workspace:
{
"servers": {
"p4-plan": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
Note: The
-yflag auto-confirms the npm install prompt so the server starts without user interaction.
If running from a local clone instead of npm:
{
"servers": {
"p4-plan": {
"type": "stdio",
"command": "node",
"args": ["/path/to/MCP/dist/main.js"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
For added security, you can use VS Code input prompts to avoid storing tokens in files:
{
"inputs": [
{
"type": "promptString",
"id": "p4-plan-jwt",
"description": "P4 Plan JWT Token",
"password": true
}
],
"servers": {
"p4-plan": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "${input:p4-plan-jwt}",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"p4-plan": {
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
Replace YOUR_JWT_TOKEN with a token obtained from the login mutation (see Obtaining a JWT Token).
Create .mcp.json in your project root:
{
"mcpServers": {
"p4-plan": {
"command": "npx",
"args": ["-y", "@perforce/p4plan-mcp"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
For a local build, replace "command" and "args" with:
{
"mcpServers": {
"p4-plan": {
"command": "node",
"args": ["/path/to/MCP/dist/main.js"],
"env": {
"P4PLAN_API_AUTH_TOKEN": "YOUR_JWT_TOKEN",
"P4PLAN_API_URL": "http://localhost:4000"
}
}
}
}
Or add it via the CLI:
claude mcp add p4-plan \
-e P4PLAN_API_AUTH_TOKEN=YOUR_JWT_TOKEN \
-e P4PLAN_API_URL=http://localhost:4000 \
-- npx -y @perforce/p4plan-mcp
Note: The server name must come before the
-eflags, otherwise the variadic-eparser consumes the name as an env value.
Verify it's running: type /mcp inside Claude Code to check server status.
Tip: Place
.mcp.jsonin your project root to share the config with your team (tokens excluded). For personal config, add the server to~/.claude.jsoninstead.
.vscode/mcp.jsonP4PLAN_API_AUTH_TOKEN - JWT token for authenticating with the P4 Plan GraphQL APIP4PLAN_API_URL - P4 Plan GraphQL API URL, base origin only — no path, no trailing slash (the server appends /graphql, /healthcheck and /attachment/<id>). Defaults to http://localhost:4000 when unset; config-example.env ships an HTTPS example.P4PLAN_ALLOW_SELF_SIGNED_CERTS - Set to true to accept self-signed or untrusted TLS certificates when connecting to the API over HTTPS (default: false)P4PLAN_READONLY - Set to true (or 1, yes, on) to expose only the tools that read, same as the --readonly argument (default: false). Case and surrounding spaces are ignored; an unrecognised value turns read-only mode on and logs a warning. See Read-only modeP4PLAN_UPLOAD_DIRS - Folders upload_attachment may read files from, in addition to the workspace folders the MCP client shares. Separate several with : (; on Windows). See Uploading filesLOG_LEVEL - Logging level: debug, info, warn, error (default: debug)SEARCH_LIMIT - Maximum number of results returned by search_tasks (default: 400)The server includes skill files — domain-specific guides that help AI agents construct correct tool calls. Skills are accessible in two ways:
read_skill tool — any MCP client can call read_skill with a skillName to fetch skill content at runtime. This is the primary access method and works with all clients.skill://p4-plan/search-queries) for clients that support native resource reading.| Skill | Purpose |
|---|---|
| project-navigation | Finding and creating projects, items, getting started |
| search-queries | P4 Plan Find query syntax (column names, values, operators) |
| task-management | Task CRUD, status, assignments, comments, attachments |
| planning | Sprints, releases, commitment, allocations |
| backlog-refinement | Backlog items, estimation, prioritization |
| bug-tracking | Bugs, severity, QA section |
| custom-fields | Custom columns, project-specific metadata |
| gantt-scheduling | Scheduled tasks, timeline, dependencies |
| workflows | Status workflows, status state machines |
| pipeline | Pipeline steps, breakdown, defects in a pipeline step |
| comment-html-format | Allowed HTML subset for comments and multiline fields |
| mentions | @user mention syntax in comments |
See skills/README.md for details on using skills with different AI clients.
To test the npx experience locally without publishing to npm:
# Build and create a global symlink
npm run build
npm link
# Now test exactly as an end user would
P4PLAN_API_AUTH_TOKEN=your-jwt-token npx @perforce/p4plan-mcp
# Clean up when done
npm unlink -g @perforce/p4plan-mcp
The symlink persists across rebuilds — just run npm run build after code changes.
Create or edit a tools file in src/tools/
Define the tool with:
name: Unique tool identifierdescription: What the tool does (shown to AI)inputSchema: JSON Schema for parametershandler: Function that executes the toolRegister in ToolsModule
# Unit tests
npm run test
# E2E tests (MCP protocol compliance via @modelcontextprotocol/sdk)
npm run test:e2e
The server uses Winston with two transports:
warn and error level messages are shown to keep the output clean.logs/P4PlanMCP_<timestamp>.log. Use these for detailed troubleshooting.Note: All console output goes to stderr (never stdout) because stdout is the MCP protocol channel. VS Code labels all stderr output as
[warning]— this is expected behavior and does not indicate a problem.
This server uses the MCP stdio transport — communication happens over stdin/stdout using JSON-RPC 2.0 messages. The client spawns the server as a child process.
P4PLAN_API_AUTH_TOKEN environment variable (validated at startup)@modelcontextprotocol/sdk with StdioServerTransportCheck P4PLAN_API_AUTH_TOKEN is set:
The server requires a valid JWT token in the P4PLAN_API_AUTH_TOKEN environment variable. If missing, it exits immediately with an error.
Check token is valid: If the token is expired or invalid, the server exits with "Authentication failed". Generate a new JWT using the login mutation.
Check GraphQL API is reachable:
The P4 Plan GraphQL API must be accessible at the configured P4PLAN_API_URL (default: http://localhost:4000).
Verify mcp.json syntax:
Ensure your .vscode/mcp.json is valid JSON. Check for trailing commas.
Check the command is available:
If using npx, ensure Node.js is in VS Code's PATH. If npx is not found, use the absolute path to node instead (see local build config).
Reload VS Code window:
Press Cmd+Shift+P → "Developer: Reload Window"
Start a new chat: MCP servers are connected when a new chat session starts.
Check GraphQL server is running: The P4 Plan GraphQL API must be accessible at the configured URL.
Check server logs:
In VS Code, check the Output panel → select "p4-plan" from the dropdown to see warnings/errors. For full debug logs, check the logs/ directory.
Verify the JWT hasn't expired: Generate a new JWT if needed and update your mcp.json config.
This project is licensed under the MIT License. See LICENSE for details.