← Back to directory
P

Perforce P4 MCP Server

Community
Manage Perforce P4 version control and P4 DAM resources through MCP.
Category
Dev Tools #108 of 751
Stars
★ 127 Popular
Transport
stdio (local process)
Runtime
Docker · Python 3.11+ · Prebuilt binary
Credentials
API key / credential required
License
MIT
Last commit
Tools
32
59FMRS · C

A community-supported Perforce P4 MCP server covering version control, code review, streams, and optional P4 DAM tools. It supports read and write operations, with read-only mode enabled by a flag; check credentials, permissions, and Docker workspace mounts before use.

Strongest · Documentation 15/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
13/20
Maintenance
10/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 8/20
The README describes several P4 and P4 DAM query and modification tools, stdio/HTTP transports, a read-only option, and result limits, making the startup and main capability paths plausible. This review has only the README and manifest, with no verifiable CI, test coverage, or evidence of a real initialization and tool-list handshake; behavior and error handling therefore remain unconfirmed.
Security and permissions 13/20
The documentation says read-only mode is the default, writes are permission-controlled, and delete and obliterate operations require PROCEED/CANCEL confirmation. It also discloses that HTTP has no authentication and that binding publicly exposes the service. Credentials use environment variables or a ticket file, and the DAM API key is sent with requests; credential protection details, data flows, and code-level permission boundaries are not independently verifiable here.
Maintenance 10/20
The repository has an MIT license, a versioned OCI package, and a GitHub release installation path, and the supplied metadata says it is not archived. There is no evidence here about commit history, issue response, dependency updates, or a security response process, so sustained maintenance cannot be established.
Documentation 15/20
The README gives substantial guidance on installation, client configuration, authentication, environment variables, tool parameters, limits, read-only controls, HTTP exposure risks, and Docker workspace mounts. Runtime behavior is not verified from source, troubleshooting and cost information are limited, and some deployment examples require users to supply environment and security configuration.
Setup experience 13/20
The README offers uvx, prebuilt binaries, Docker, and source installation, with examples for several mainstream clients and descriptions of P4 connection variables. There is no CI or execution evidence in the supplied material, and Docker setup can require additional ticket, hostname, and workspace mount configuration.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesUses the network

Best for

  • Development and code review teams with access to a Perforce P4 server and valid credentials.
  • Users who need to inspect P4 version control, review, or P4 DAM information through MCP.
  • Teams able to configure permissions and manage workspace access.

Not for

  • Users without access to a P4 server or valid authentication.
  • Users who need P4 DAM tools but cannot provide a P4 DAM API key.
  • Users who need a Docker container to access local files but cannot mount the P4 client root.

Required permissions

  • Requires P4PORT and P4USER; P4CLIENT and P4PASSWD are optional, and P4CONFIG can supply configuration.
  • P4USER should be a standard user; each read or write operation also requires the corresponding P4 server permissions.
  • Write operations require read-only mode to be disabled and appropriate P4 permissions.
  • P4 DAM tools require P4DAM_API_KEY and an active P4 DAM session.

Risks and side effects

  • Without --readonly, write operations are enabled and may modify files, submit changes, or alter reviews and streams.
  • Some actions, such as deleting changes or permanently deleting reviews, may be irreversible; delete operations can prompt for PROCEED/CANCEL confirmation.
  • HTTP transport binds to localhost by default and has no authentication; exposing it may allow access from clients beyond a trusted network.
  • P4 DAM API requests use the configured API key for authorization.
  • Docker write operations require the client root to be mounted; workspace host restrictions can also cause sync failures.

Setup

Before you start

Runtime:Docker · Python 3.11+ · Prebuilt binary

P4PORT required Perforce server address; obtain it from your administrator, for example ssl:perforce.example.com:1666.
P4USER required Perforce standard username; use an account authorized to access the server.
P4PASSWD optionalsecret Perforce password or login ticket; obtain it from your administrator or through Perforce login.
P4DAM_API_KEY optionalsecret P4 DAM API key (account_key); obtain it from a P4 DAM administrator. DAM tools register only when it is set.
Other optional settings (9)
P4CLIENT optional Perforce workspace or client name; optional but recommended for the current workspace.
P4MCP_MAX_RESULTS optional Maximum rows returned per command; optionally set a non-negative integer, default 10000.
P4MCP_MAX_SCAN_ROWS optional Maximum rows scanned per command; optionally set a non-negative integer, default governed by administrator or group policy.
P4MCP_LOG_DIR optional Directory for application and session logs; optionally set a custom path, defaulting to logs/ beside the server executable.
P4MCP_TLS_CA_MODE optional TLS certificate source mode; set to system (default) or certifi.
P4MCP_SSL_VERIFY optional SSL verification setting for P4 Code Review API requests; enabled by default.
P4MCP_CA_BUNDLE optional Path to a custom PEM CA bundle; it takes effect only when P4MCP_TLS_CA_MODE is set to certifi.
OTEL_EXPORTER_OTLP_ENDPOINT optional Destination for telemetry export; defaults to the Perforce OTLP endpoint.
OTEL_EXPORTER_OTLP_PROTOCOL optional Telemetry export protocol; only grpc is supported, and other values fall back to grpc.

Use the Docker STDIO configuration example to run the image. Set P4PORT and P4USER; set P4CLIENT, P4PASSWD, and P4DAM_API_KEY as needed. P4 DAM tools require an API key. To enable write operations, turn off read-only mode; with Docker, also mount the client root at the same path as the P4 workspace root. The example uses read-only mode for safer exploration.

.mcp.json
{"mcpServers":{"perforce-p4-mcp":{"command":"docker","args":["run","-i","--rm","-e","P4PORT","-e","P4USER","-e","P4CLIENT","-e","P4PASSWD","-e","P4DAM_API_KEY","ghcr.io/perforce/p4mcp-server:2026.4.3126709"],"env":{"P4PORT":"ssl:perforce.example.com:1666","P4USER":"your_username","P4CLIENT":"your_workspace"}}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "perforce-p4-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "P4PORT",
        "-e",
        "P4USER",
        "-e",
        "P4CLIENT",
        "-e",
        "P4PASSWD",
        "-e",
        "P4DAM_API_KEY",
        "ghcr.io/perforce/p4mcp-server:2026.4.3126709"
      ],
      "env": {
        "P4PORT": "ssl:perforce.example.com:1666",
        "P4USER": "your_username",
        "P4CLIENT": "your_workspace"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.perforce-p4-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "P4PORT", "-e", "P4USER", "-e", "P4CLIENT", "-e", "P4PASSWD", "-e", "P4DAM_API_KEY", "ghcr.io/perforce/p4mcp-server:2026.4.3126709"]

[mcp_servers.perforce-p4-mcp.env]
P4PORT = "ssl:perforce.example.com:1666"
P4USER = "your_username"
P4CLIENT = "your_workspace"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add perforce-p4-mcp -e P4PORT=ssl:perforce.example.com:1666 -e P4USER=your_username -e P4CLIENT=your_workspace -- docker run -i --rm -e P4PORT -e P4USER -e P4CLIENT -e P4PASSWD -e P4DAM_API_KEY ghcr.io/perforce/p4mcp-server:2026.4.3126709

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After connecting, confirm query_server appears in the client's tool list. Call it to retrieve the P4 server version and current user details, which verifies the connection and credentials.

Troubleshooting

  1. Check P4PORT, P4USER, credentials or P4CONFIG, and connectivity to the P4 server.
  2. Confirm P4USER is a standard user and has the required operation permissions.
  3. If P4 DAM tools are missing, check P4DAM_API_KEY; if calls fail, confirm P4.HTH.URL is set on the server and an active P4 DAM session exists.
  4. For Docker sync or write failures, check that the container hostname matches the workspace restriction and that the client root is mounted at the same path.
  5. For TLS request failures, check CA and TLS settings; P4MCP_CA_BUNDLE requires P4MCP_TLS_CA_MODE=certifi.
  6. Check result limits; commands exceeding P4MCP_MAX_RESULTS return an error rather than truncated results.

Things to try

Once connected, you can ask your AI assistant things like:

  • List the current user's workspaces and check a workspace's sync status.
  • Find recently submitted changelists and show the files in one.
  • Search P4 DAM for image assets with a given tag and fetch a preview.

Tools 32

query_server read-only
Query P4 server version, uptime, configuration, current user, and permissions.
query_workspaces read-only
Query workspace lists, specifications, types, and sync status.
query_changelists read-only
Query changelist details, history, and filtered results.
query_files read-only
Query file content, history, metadata, diffs, and annotations, and search by name or content.
query_shelves read-only
Query shelved changes, files, and diffs.
query_jobs read-only
Query jobs and their changelist associations.
query_reviews read-only
Query code review details, transitions, files, comments, and activity.
query_streams read-only
Query stream hierarchies, integration status, workspace bindings, and path validation information.
Show 24 more tools
query_p4dam_assets read-only
Search P4 DAM assets by keyword or filters.
query_p4dam_asset read-only
Fetch full metadata for a single P4 DAM asset.
query_p4dam_projects read-only
List or search P4 DAM projects.
query_p4dam_repositories read-only
List repositories in a P4 DAM project.
query_p4dam_helix_classic_branches read-only
List Helix Classic branches in a repository.
fetch_p4dam_media read-only
Fetch a P4 DAM media URL; images can be rendered as images, while non-images return MIME type and size.
query_p4dam_file_reviews read-only
List file (asset) reviews for a project.
query_p4dam_file_review read-only
Fetch a single file review by UUID.
query_p4dam_workflows read-only
List P4 DAM workflows.
query_p4dam_workflow read-only
Fetch a workflow by short name or UUID.
query_p4dam_workflow_states read-only
List states for a workflow.
query_p4dam_custom_attribute_templates read-only
List custom attribute templates for a project.
modify_workspaces writes
Create, update, delete, or switch workspaces.
modify_changelists writes
Create, update, submit, or delete changelists, or move files.
modify_files writes
Add, edit, delete, move, revert, reconcile, resolve, or sync files.
modify_shelves writes
Shelve, unshelve, update, or delete shelved content.
modify_jobs writes
Link jobs to changelists or unlink them.
modify_reviews destructive
Create and manage reviews, votes, states, participants, and comments; also archive or permanently delete reviews.
modify_streams destructive
Create and manage streams, edit or resolve specs, and copy, merge, integrate, populate, or switch workspaces.
create_p4dam_asset_bundle writes
Create a P4 DAM asset bundle.
update_p4dam_asset_bundle writes
Update a bundle's description, file scope, or cover image.
delete_p4dam_asset_bundle destructive
Delete a P4 DAM asset bundle.
sync_p4dam_asset_bundle writes
Sync asset bundle files to a local workspace.
create_p4dam_file_review writes
Create a P4 DAM asset review.

Use cases

Inspect P4 file content, history, diffs, and annotations.
Review changelists, shelves, jobs, and code reviews.
Manage P4 streams, workspaces, and file syncs.
Search P4 DAM assets and inspect metadata, workflows, or file reviews.
Create asset bundles and sync their files to a local workspace.

Supported clients

Claude Code
Cursor
VS Code
Windsurf
JetBrains IDEsPartial support
EclipsePartial support
Kiro

Listed from the project's documentation, not tested by this site.

Overview

Perforce P4 MCP Server is a community-supported MCP server for the Perforce P4 version control system. It provides read and write tools for files, changelists, shelves, workspaces, jobs, code reviews, streams, and server information. It also manages P4 DAM resources through its REST API; P4 DAM tools are not registered unless a P4 DAM API key is set.

Similar servers

Source revision 808b328599cb Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/p4mcp-server.svg)](https://followmcp.com/en/servers/p4mcp-server)