Perforce P4
[Community Supported] Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system.
What is Perforce P4?
Perforce P4 is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to [community supported] perforce p4 mcp server is a model context protocol (mcp) server that integrates with the perforce p4 version control system.
[Community Supported] Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system.
This server falls under the Version Control category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP protocol support
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx p4mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Perforce P4
The Perforce P4 MCP Server integrates Helix Core (Perforce) version control with AI assistants via the Model Context Protocol, enabling natural-language interaction with changelists, code reviews, streams, shelved files, jobs, and workspaces. It exposes separate read and write toolsets covering the full P4 workflow — from querying file history and reviewing diffs to submitting changelists and voting on reviews. Enterprise development teams using Helix Core can leverage AI to navigate large depot structures, summarize code reviews, and automate repetitive P4 operations without memorizing P4 command syntax.
Prerequisites
- Access to a Perforce Helix Core server (P4PORT address and credentials)
- P4 client/workspace configured (P4CLIENT recommended)
- Python 3.11+ (only for source builds; pre-built binaries require no Python)
- uvx (from the uv package manager) for the simplest install, OR download a pre-built binary
- An MCP client such as Claude Desktop, VS Code, or Cursor
Install uvx and verify
uvx is the recommended way to run p4mcp-server without a permanent install. Install uv (which includes uvx) if you don't have it.
# Install uv (includes uvx)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Verify uvx works
uvx p4mcp-server --versionSet P4 environment variables
Configure the standard Perforce environment variables so the server can connect to your Helix Core instance. These can also be set in your MCP client config env block.
export P4PORT=ssl:perforce.example.com:1666
export P4USER=your_username
export P4CLIENT=your_workspace_nameConfigure your MCP client
Add the P4 MCP server to your MCP client config. The --readonly flag disables all write operations for a safe read-only mode. Remove it only if you need the server to submit changelists or modify files.
{
"mcpServers": {
"perforce": {
"command": "uvx",
"args": ["p4mcp-server", "--readonly", "--allow-usage"],
"env": {
"P4PORT": "ssl:perforce.example.com:1666",
"P4USER": "your_username",
"P4CLIENT": "your_workspace_name"
}
}
}
}Authenticate with Helix Core
Run p4 login in your terminal to cache credentials before starting the MCP server. The server uses the same P4 trust/ticket mechanism as the p4 command-line client.
p4 login
# Enter your password when promptedRestart your MCP client and test
Restart your MCP client. Ask it to list pending changelists or query your workspace to verify the connection to Helix Core.
Perforce P4 Examples
Client configuration
Claude Desktop config for the Perforce P4 MCP Server in read-only mode using uvx.
{
"mcpServers": {
"perforce": {
"command": "uvx",
"args": ["p4mcp-server", "--readonly", "--allow-usage"],
"env": {
"P4PORT": "ssl:perforce.example.com:1666",
"P4USER": "your_username",
"P4CLIENT": "your_workspace_name"
}
}
}
}Prompts to try
Natural-language Perforce operations you can perform via the P4 MCP Server.
- "List all pending changelists for my user."
- "Show me the diff for changelist 12345."
- "What files were modified in the last 10 submitted changelists to //depot/main/...?"
- "Summarize the open code reviews assigned to me."
- "Show the stream hierarchy for the //depot/main stream."Troubleshooting Perforce P4
Connection fails with 'Connect to server failed' or SSL errors
Verify P4PORT is correct and reachable: run 'p4 -p ssl:perforce.example.com:1666 info' in a terminal. For SSL trust errors, run 'p4 trust' to accept the server's fingerprint. Set P4MCP_SSL_VERIFY=false temporarily to bypass certificate verification during debugging.
Server starts but returns 'Ticket has expired' on every tool call
Re-authenticate by running 'p4 login' in the terminal before restarting the MCP client. Helix Core tickets expire based on server policy. Some deployments require periodic re-login or SSO token refresh.
'uvx p4mcp-server' is slow on first invocation
uvx downloads the package on first use. Subsequent runs use the local cache. For zero-latency startup, download the pre-built binary from the GitHub Releases page and use its absolute path as the 'command' in your MCP client config instead of uvx.
Frequently Asked Questions about Perforce P4
What is Perforce P4?
Perforce P4 is a Model Context Protocol (MCP) server that [community supported] perforce p4 mcp server is a model context protocol (mcp) server that integrates with the perforce p4 version control system. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Perforce P4?
Follow the installation instructions on the Perforce P4 GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Perforce P4?
Perforce P4 works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Perforce P4 free to use?
Yes, Perforce P4 is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Perforce P4 Alternatives — Similar Version Control Servers
Looking for alternatives to Perforce P4? Here are other popular version control servers you can use with Claude, Cursor, and VS Code.
Ruiyu MA
★ 30.1kConnect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GitMCP
★ 8.1kTransforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
GitHub Codemunch
★ 1.8kA token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption c
Azure DevOps MCP Server
★ 1.7kThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standard
GitHub Official
★ 1.2kOfficial GitHub integration with comprehensive API coverage
Azure DevOps
★ 367Enables interaction with Azure DevOps through Cursor chat, providing tools to manage builds, pipelines, work items, sprints, and board operations. Supports secure authentication via Personal Access Tokens and allows natural language-driven DevOps tas
Browse More Version Control MCP Servers
Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Perforce P4 in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Perforce P4?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.