Skip to content
appsgit

Perforce P4 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.

github.com/perforce/p4mcp-server (opens in a new tab)

Install Perforce P4 MCP Server

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.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

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
{
  "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
{
  "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 Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
P4PORTNoPerforce server address (e.g. ssl:perforce.example.com:1666)
P4USERNoPerforce username
P4CLIENTNoPerforce workspace/client name
P4PASSWDsecretNoPerforce password or ticket
P4DAM_API_KEYsecretNoP4 DAM API key (account_key). When unset, P4 DAM tools are not registered.

Tools (40)

Parsed from the Tools section of the README; check the repository for the current list.

  • 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/..."])

About Perforce P4 MCP Server

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 .

  • mcp
  • mcp-server
  • p4
  • perforce
  • p4python
  • p4-code-review
  • p4-mcp
  • p4-mcp-server

FAQ

Perforce P4 MCP Server FAQ

Still curious? Email info@appsgit.com.

What is Perforce P4 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. The source code is at github.com/perforce/p4mcp-server.

How do I install the Perforce P4 MCP Server MCP server?

Add the command docker run -i --rm -e P4PASSWD -e P4DAM_API_KEY ghcr.io/perforce/p4mcp-server:2026.4.3078076 to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Perforce P4 MCP Server free?

The server is open source under the MIT license, so running it is free. It needs credentials (P4PASSWD and P4DAM_API_KEY) for the service it connects to, which may require a paid account.

Is Perforce P4 MCP Server actively maintained?

The most recent commit was on Sep 25, 2026. The latest release is v2026.4.3078076, published Sep 25, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.