# Perforce P4 MCP Server

> Manage Perforce P4 version control and P4 DAM resources through MCP.

- **URL**: https://followmcp.com/en/servers/p4mcp-server
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 127
- **FMRS Score**: 59/100 (Grade C)
- **Source**: https://github.com/perforce/p4mcp-server
- **Transports**: stdio (local process)
- **Runtimes**: Docker, Python 3.11+, Prebuilt binary
- **Auth**: API key / credential required

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

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

## Client config (JSON)
```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"}}}}
```

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