p4mcp-server — Claude Code MCP server for Perforce P4
Wires your AI assistant into Perforce P4: files, changelists, shelves and workspaces. Useful when the code lives in P4 instead of Git.
Open on GitHubWhat p4mcp-server does
The server runs on FastMCP with direct P4 Python bindings and hands the assistant tools for files, changelists, shelves, workspaces, jobs, reviews, streams and server metadata. A separate piece talks to P4 DAM over its REST API: asset search, metadata, tags, bundles and projects. Tool categories are switched on individually — server, files, changelists, shelves, workspaces, jobs, reviews, streams, p4dam.
Read-only is the default. Destructive delete and obliterate operations go through MCP elicitation with PROCEED/CANCEL, and ownership checks sit alongside. Logs land in the logs/ directory; telemetry is off unless you consent to it.
You can start it without installing anything via uvx p4mcp-server, or use a pre-built binary, or build from source with Python 3.11+. A P4 server connection and a valid login (ticket or password) are required. P4 DAM access needs a P4DAM_API_KEY. The Docker route is macOS and Linux only.
What it helps with
- inspect what sits in a changelist without opening P4V
- list the files in a shelf before sending it to review
- vote and comment on a P4 Code Review
- find a P4 DAM asset and update its tags
- check workspace and stream metadata
Example prompts for the agent
- Show me the files in my current changelist
- Search P4 DAM for assets tagged
heroand print their metadata - List the reviews I'm a participant in and show the vote states
How to install p4mcp-server
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about p4mcp-server
How do I install p4mcp-server in Claude Code?
There is no install command for Claude. You run the server with uvx p4mcp-server, a pre-built binary, or a source build, then add the launch command and the P4PORT, P4USER, P4CLIENT environment variables to mcp.json.
What does p4mcp-server do?
It gives the assistant tools for Perforce P4: files, changelists, shelves, workspaces, jobs, reviews, streams and server metadata. It also connects to P4 DAM through its REST API.
What do I need to run it?
Access to a P4 server and a valid login. P4 DAM needs a P4DAM_API_KEY. Building from source requires Python 3.11+.