MCP Perforce Server

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

Visit MCP Perforce Server

How to install and configure MCP Perforce Server

  1. Ensure Node.js 18+ and the Perforce command-line client (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.

What you can do with MCP Perforce Server

  • Checking workspace status and reviewing pending or opened files before writing new code. - Opening files for edit, staging newly added assets, or marking obsolete files for depot deletion. - Creating dedicated changelists with clear descriptions and submitting modified code directly through Claude. - Syncing workspaces or specific directories to update local files against the Perforce depot. - Switching workspace branches across development, feature, and main streams using stream operations.

Key facts

  • Open Source
  • https://github.com/Cocoon-AI/mcp-perforce
  • Developer Tools & Code Intelligence, DevOps, CI/CD & Version Control
  • p4, perforce, scm, version control

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab — MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…

How do I install MCP Perforce Server?

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.

What can MCP Perforce Server do?

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.

Which MCP clients work with MCP Perforce Server?

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.

How does MCP Perforce Server handle multiple projects?

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.

Is MCP Perforce Server open source?

Yes, MCP Perforce Server is open-source software released under the MIT License, with source code available on GitHub.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories