# Perforce P4 MCP Server (MCP server)

> Perforce P4 MCP Server is an MCP server that adds developer tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Perforce P4 MCP server for version control and P4 DAM digital… It has 122 GitHub stars, is released under the MIT license and runs locally with docker run -i --rm -e P4PASSWD -e P4DAM_API_KEY ghcr.io/perforce/p4mcp-server:2026.4.3078076.

Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system. It is built on FastMCP with direct P4 Python bindings to expose safe, structured read/write tools for changelists, files, shelves, workspaces, jobs, reviews, and server metadata. It also integrates with P4 DAM through its REST API to manage resources .

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/perforce/p4mcp-server |
| GitHub stars | 122 |
| License | MIT |
| Language | Python |
| Transport | stdio |
| Packages | docker: ghcr.io/perforce/p4mcp-server:2026.4.3078076 |
| Remote URL | none |
| Needs API key | yes |
| Official | yes |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Developer tools |
| Latest release | v2026.4.3078076 (Sep 25, 2026) |
| Last commit | Sep 25, 2026 |
| MCP registry name | io.github.perforce/p4mcp-server |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "perforce-p4-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "P4PASSWD",
        "-e",
        "P4DAM_API_KEY",
        "ghcr.io/perforce/p4mcp-server:2026.4.3078076"
      ],
      "env": {
        "P4PASSWD": "your-value",
        "P4DAM_API_KEY": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env P4PASSWD=your-value --env P4DAM_API_KEY=your-value --transport stdio perforce-p4-mcp-server -- docker run -i --rm -e P4PASSWD -e P4DAM_API_KEY ghcr.io/perforce/p4mcp-server:2026.4.3078076
```

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

```json
{
  "mcpServers": {
    "perforce-p4-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "P4PASSWD",
        "-e",
        "P4DAM_API_KEY",
        "ghcr.io/perforce/p4mcp-server:2026.4.3078076"
      ],
      "env": {
        "P4PASSWD": "your-value",
        "P4DAM_API_KEY": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

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

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "p4passwd",
      "description": "P4PASSWD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "p4dam_api_key",
      "description": "P4DAM_API_KEY",
      "password": true
    }
  ],
  "servers": {
    "perforce-p4-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "P4PASSWD",
        "-e",
        "P4DAM_API_KEY",
        "ghcr.io/perforce/p4mcp-server:2026.4.3078076"
      ],
      "env": {
        "P4PASSWD": "${input:p4passwd}",
        "P4DAM_API_KEY": "${input:p4dam_api_key}"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `P4PORT`: Perforce server address (e.g. ssl:perforce.example.com:1666)
- `P4USER`: Perforce username
- `P4CLIENT`: Perforce workspace/client name
- `P4PASSWD` (secret): Perforce password or ticket
- `P4DAM_API_KEY` (secret): P4 DAM API key (account_key). When unset, P4 DAM tools are not registered.

## Tools

- `server_info`: Get P4 version, uptime, and configuration
- `current_user`: Get current user information and permissions
- `list`: List all workspaces (optionally filtered by user)
- `type`: Check workspace type and configuration
- `status`: Check workspace sync status
- `content`: Get file content at a specific revision
- `history`: Get file revision history and integration records
- `info`: Get file basic details (type, size, permissions)
- `metadata`: Get file metadata (attributes, filesize, etc.)
- `diff`: Compare file versions (depot-to-depot or mixed)
- `annotations`: Get file annotations with blame information
- `search`: Search for files by name pattern (wildcard matching)
- `grep`: Search for files by content pattern (text search)
- `ranges`: Optional list of [start, end] line pairs, 1-based and inclusive (e.g. [[10, 20], [50, 60]]).
- `files`: List files in a specific shelf
- `list_jobs`: List jobs associated with a changelist
- `get_job`: Get detailed job information and status
- `dashboard`: Get current user's review dashboard (my reviews, needs attention)
- `transitions`: Get available state transitions for a review
- `files_readby`: Get files read status by users
- `activity`: Get review activity history
- `comments`: Get comments on a review
- `review_id`: Review ID (required for get, transitions, files_readby, files, comments, activity)
- `review_fields`: Comma-separated fields to return (e.g., "id,description,author,state")
- `comments_fields`: Fields for comments (default: "id,body,user,time")
- `up_voters`: List of up voters for transitions
- `from_version`: , toversion - Version range for files action
- `max_results`: Maximum results (default: 10)
- `children`: Get child streams of a given stream
- `parent`: Get the parent stream
- `graph`: Get the full stream graph (parent + children)
- `integration_status`: Get integration status between stream and parent (p4 istat)
- `get_workspace`: Get a workspace spec bound to a stream
- `list_workspaces`: List workspaces bound to a stream
- `validate_file`: Validate file paths against a stream's view
- `validate_submit`: Validate opened files for submit in a stream workspace
- `check_resolve`: Check for pending stream spec conflicts
- `interchanges`: List changelists awaiting integration between streams
- `stream_name`: Stream depot path (required for get, children, parent, graph, check_resolve, interchanges)
- `stream_path`: Path pattern(s) for list (e.g., ["//depot/..."])

## Similar MCP servers

- [Gemini CLI](https://appsgit.com/mcp-servers/gemini-cli): An open-source AI agent that brings the power of Gemini directly into your terminal. (107,240 stars, Apache-2.0)
- [Front-End Checklist](https://appsgit.com/mcp-servers/front-end-checklist): Review frontend code and live pages against 386 quality-gated web development rules. (74,390 stars, MIT)
- [Claude Flow](https://appsgit.com/mcp-servers/claude-flow): AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev. (74,016 stars, MIT, needs API key)
- [Codebase Memory](https://appsgit.com/mcp-servers/codebase-memory): Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens. (45,917 stars, MIT)
- [Bytedance Filesystem](https://appsgit.com/mcp-servers/bytedance-filesystem): MCP server for filesystem access. (39,206 stars, Apache-2.0)
- [GitHub](https://appsgit.com/mcp-servers/github): Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language. (33,414 stars, MIT, official, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/perforce-p4-mcp-server
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
