by perforce
[Community Supported] Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system.
# Add to your Claude Code skills
git clone https://github.com/perforce/p4mcp-serverGuides for using mcp servers skills like p4mcp-server.
Last scanned: 7/7/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-07-07T07:39:47.537Z",
"npmAuditRan": true,
"pipAuditRan": false,
"promptInjectionRan": true
}See how p4mcp-server compares with popular alternatives.
p4mcp-server is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by perforce. [Community Supported] Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system. It has 122 GitHub stars.
Yes. p4mcp-server passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/perforce/p4mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
p4mcp-server is primarily written in Python. It is open-source under perforce on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh p4mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
logs/ directory.| Component | Supported Versions |
|---|---|
| Operating Systems | Windows 10+macOS 12+Linux (glibc 2.34+, e.g. Ubuntu 22.04+, Rocky Linux 9+) |
| Perforce P4 Server | 2026.1 (earlier versions untested) |
| Python | 3.11+ (required only for building from source) |
If you have uv installed, you can run P4 MCP Server directly without any manual installation:
# Run the server
uvx p4mcp-server
# Check version
uvx p4mcp-server --version
# Run with arguments
uvx p4mcp-server --readonly --allow-usage
This automatically fetches and runs the latest version from PyPI. No Python virtual environment setup or dependency management needed.
Requirements:
Download the appropriate binary for your operating system:
Extract and use the executable directly. No Python installation is required.
# macOS / Linux
unzip p4-mcp-server-mac.zip # or p4-mcp-server-linux.zip
./p4-mcp-server --help
# Windows
Expand-Archive p4-mcp-server-win.zip -DestinationPath .
.\p4-mcp-server.exe --help
Requirements:
Build:
Output:
Run the P4 MCP Server directly on your machine using the default STDIO transport.
Add the following to your mcp.json:
{
"mcpServers": {
"perforce-p4-mcp": {
"command": "/absolute/path/to/p4-mcp-server",
"env": {
"P4PORT": "ssl:perforce.example.com:1666",
"P4USER": "your_username",
"P4CLIENT": "your_workspace",
"P4DAM_API_KEY": "your_api_key"
},
"args": [
"--readonly", "--allow-usage"
]
}
}
}
Note: This example shows explicit
envvalues. IfP4CONFIGis set, you can omit them and use the generic configuration example in theMCP client configurationsection instead.
Run the P4 MCP Server from a Docker container with STDIO transport, allowing MCP clients to manage the container lifecycle.
Note: Docker-based execution is currently supported on macOS and Linux only.
Prerequisites
Pull the Docker image
docker pull ghcr.io/perforce/p4mcp-server:latest
cd /path/to/p4mcp-server
docker build -t ghcr.io/perforce/p4mcp-server .
Configure MCP Client
Add the following to your mcp.json:
{
"servers": {
"perforce-p4mcp-docker": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--hostname", "your-hostname",
"-e", "P4PORT=ssl:perforce.example.com:1666",
"-e", "P4USER=your_username",
"-e", "P4CLIENT=your_workspace",
"-e", "P4DAM_API_KEY=your_api_key",
"-v", "/Users/your_username/.p4tickets:/home/mcpuser/.p4tickets:ro",
"ghcr.io/perforce/p4mcp-server:latest"
]
}
}
}
Configuration Options
| Flag | Description |
|---|---|
-i |
Interactive mode (required for STDIO) |
--rm |
Remove container when stopped |
--hostname |
Match workspace host restriction |
-e P4PORT |
P4 server address |
-e P4USER |
P4 username |
-e P4CLIENT |
Workspace name |
-v |
Mount P4 tickets file |
Authentication
Using P4 tickets:
# macOS/Linux
-v /Users/your_username/.p4tickets:/home/mcpuser/.p4tickets:ro
Note: Use the full path to your tickets file (not
~). After runningp4 login, restart the MCP server to pick up the new ticket.
Note: By default the container starts as root, copies the bind-mounted tickets file to a location readable by the non-root
mcpuser, then drops privileges (viagosu) so the server runs asmcpuser. This auto-copy lets an owner-only (0600) tickets file owned by a foreign uid work on runtimes that preserve host ownership (native Linux Docker/podman). A:robind mount of the ticket is supported — the file is copied, not modified in place (this is distinct from a read-only container root filesystem; see below). Note the auto-copy runs only when the container starts as root (the default); forcing a non-root uid or a read-only root filesystem changes this behavior, as described below.
Kubernetes / restricted (non-root-enforced) profiles: the image intentionally starts as root and drops to
mcpuser(uid 1000) viagosu, so the server always runs non-root — both paths are supported. ForrunAsNonRoot/ restricted PodSecurity / OpenShift restricted SCC, setsecurityContext.runAsUser: 1000(andfsGroup: 1000when mounting the ticket). In that mode the entrypoint's root-only ticket copy is skipped, so the mounted ticket must already be readable by uid 1000 (owner-matched mount,-e P4PASSWD="your_ticket_content", orpodman -v <host>:/home/mcpuser/.p4tickets:U).
Read-only root filesystem (
--read-only/readOnlyRootFilesystem): provide a writable/tmpfs/home/mcpuser(e.g.--tmpfs /home/mcpuser) so the ticket copy can be written; otherwise the ticket copy fails and P4 will report a normal auth error.
Using a password:
-e P4PASSWD="your_password"
Workspace Host Restrictions
⚠️ Important: Docker containers have their own hostname, which differs from your local machine. If your P4 workspace is restricted to a specific host, operations like
syncwill fail.
To resolve this, set the container hostname to match your workspace's host restriction:
--hostname your-hostname
To find your workspace host name:
# macOS/Linux
p4 client -o your_workspace | grep "^Host:"
**Mounting Client Root for