MCP Perforce Server is an MCP server that provides a reliable interface for interacting with Perforce (P4) version control systems directly through LLM clients like Claude. It connects local or remote Perforce installations to AI assistants by wrapping standard P4 command-line operations into non-interactive tools that return structured, parseable responses instead of raw console text. Software engineers, technical artists, and game developers working within Perforce environments use this server to automate everyday version control tasks. The server allows assistants to check workspace status, open files for edit or add, revert modifications, sync assets, manage multi-project setups via local .p4config files, and manipulate changelists without getting trapped in interactive terminal prompts. It also supports complex repository operations, including querying and switching client workspaces, examining diffs, and managing Perforce streams. By providing safe wrappers and clear error handling, the server allows AI coding assistants to coordinate source control alongside software development tasks.
Category: Developer Tools & Code Intelligence
Tags: p4, perforce, scm, version control
p4) are installed and added to your system PATH. 2. In Claude Code, install and register the package directly: bash claude mcp add perforce @cocoon-ai/mcp-perforce 3. Alternatively, for Claude Desktop, add the server to your claude_desktop_config.json file: json { "mcpServers": { "perforce": { "command": "npx", "args": ["-y", "@cocoon-ai/mcp-perforce"], "env": { "P4CONFIG": ".p4config" } } } } 4. Create a .p4config file containing P4PORT, P4CLIENT, and P4USER inside your project root directories. 5. Restart Claude Desktop to load the new MCP tools.Part of MCP Servers
You can install it automatically using Claude Code by running claude mcp add perforce @cocoon-ai/mcp-perforce. Alternatively, you can configure Claude Desktop by adding an entry for @cocoon-ai/mcp-perforce via npx in your claude_desktop_config.json file, provided you have Node.js 18 or higher and the p4 command-line client installed.
The server wraps common Perforce operations into non-interactive tools for AI assistants. It enables checking workspace status, adding, editing, deleting, reverting, and syncing files, managing numbered changelists, switching workspaces, and inspecting or modifying Perforce streams.
The server is built on the Model Context Protocol and officially supports Claude Desktop and Claude Code. Any MCP-compliant client that supports stdio process execution can communicate with the server.
It relies on Perforce's native P4CONFIG mechanism. By placing a .p4config file in each project root specifying P4PORT, P4CLIENT, and P4USER, the server automatically applies the correct Perforce configuration depending on the active working directory.
Yes, MCP Perforce Server is open-source software released under the MIT License, with source code available on GitHub.