MCP Perforce MCP Server

A Model Context Protocol (MCP) server that provides a clean interface for Perforce (P4) operations in Claude Desktop. This server wraps P4 commands

Local serverstdio

What is the MCP Perforce MCP server?

Connect MCP Perforce to Claude, Cursor or any other MCP client and it stops being a tab you switch to. A Model Context Protocol (MCP) server that provides a clean interface for Perforce (P4) operations in Claude Desktop. This server wraps P4 commands to make them more reliable and easier for Claude to use, eliminating issues with. The mcp perforce mcp server is what makes that connection.

What the server does

  • Non-interactive operations — All commands are wrapped to avoid interactive prompts
  • Structured responses — Clean, parseable output instead of raw P4 output
  • Multi-project support — Automatically uses .p4config files for per-project settings
  • Common operations — Add, edit, delete, submit, revert, sync, and more
  • Changelist management — Create and submit changelists with explicit parameters
  • Error handling — Graceful error handling with clear error messages

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Prerequisites — The Prerequisites tool exposed by this server

Credentials and setup notes

Configuration is passed through the environment: P4CONFIG, DEBUG. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Node.js 18+ installed - Perforce command-line client (p4) installed and in your PATH - .p4config files in your project directories (recommended)

Installation

Installation goes through your MCP client rather than a global install: point it at @cocoon-ai/mcp-perforce on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP Perforce's toolset — Prerequisites — is a fair guide to whether it matches your workflow. It is maintained by Cocoon-AI; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against MCP Perforce's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
PrerequisitesThe Prerequisites tool exposed by this server.

How to install the MCP Perforce MCP server

{
  "mcpServers": {
    "perforce": {
      "command": "npx",
      "args": ["-y", "@cocoon-ai/mcp-perforce"],
      "env": {
        "P4CONFIG": ".p4config"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 18+ installed - Perforce command-line client (p4) installed and in your PATH - .p4config files in your project directories (recommended)
VariableDescriptionRequired
P4CONFIGConfiguration value read at startup.Optional
DEBUGConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP Perforce to Prerequisites.

Frequently asked questions

It connects MCP Perforce to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Prerequisites) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Perforce directly.