P4mcp Server logo

P4mcp Server

Connects AI assistants to Perforce P4 for version control, workspace, review, file, and server operations.

Install P4mcp Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "p4mcp-server": {
      "command": "uvx",
      "args": [
        "p4mcp-server"
      ],
      "env": {
        "P4PORT": "YOUR_VALUE_HERE",
        "P4USER": "YOUR_VALUE_HERE",
        "P4CLIENT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The p4mcp-server MCP server connects AI assistants to Perforce P4 through FastMCP and direct P4 Python bindings. It provides structured read and write operations for files, changelists, shelves, workspaces, jobs, reviews, and server metadata, with optional P4 DAM access through REST. Read-only mode, ownership checks, and confirmation prompts help control destructive actions. Reach for it when an agent needs to inspect or manage Perforce data within an authenticated P4 environment.

Use cases

  • Inspect Perforce workspaces and sync status
  • Search and review files from an AI assistant
  • Compare file revisions and retrieve line ranges
  • Manage P4 code reviews and comments
  • Query changelist jobs and server metadata

Key features

  • Perforce P4 file, workspace, changelist, shelf, job, and review tools
  • File content, history, diff, search, grep, and annotation operations
  • P4 code review dashboards, comments, transitions, and activity
  • Optional P4 DAM asset and metadata access
  • Read-only mode with checks for destructive actions
  • Configurable tool categories and STDIO deployment

Tools80

What P4mcp Server lets your agent do. Expand a tool for its parameters.

Self-reported~1.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

8/8 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · p4mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars123Stargazers on the source repository.
Last commit28d agoMost recent push to the default branch.
Tools exposed80Callable tools this server registers over MCP.

How P4mcp Server works

What p4mcp-server MCP server does

The p4mcp-server MCP server exposes Perforce P4 operations through the Model Context Protocol. It covers repository and server inspection, workspace management, file content and history, changelists, shelves, jobs, and code reviews. The available operations include creating, updating, deleting, and switching supported P4 resources, along with read-only queries for server information, the current user, workspace state, and file metadata.

Review workflows include dashboards, comments, activity, available state transitions, voter information, and file read status. The server can also connect to P4 DAM through its REST API for asset searches, metadata, reviews, bundles, tags, and projects when that integration is configured.

How it works

The p4mcp-server MCP server uses the default STDIO transport for local deployment. An MCP client starts the executable and communicates with it over standard input and output. P4 operations use direct Python bindings, while P4 DAM access uses its REST API.

Authentication requires access to a P4 Server and valid credentials, using either a P4 login ticket or a password. The server supports read-only operation by default. Ownership checks apply to relevant actions, and interactive MCP elicitation can request a PROCEED or CANCEL response before destructive delete and obliterate operations.

Tool categories can be enabled selectively, including server, files, changelists, shelves, workspaces, jobs, reviews, streams, and P4 DAM. File content requests can optionally specify 1-based, inclusive line ranges; ranged responses return separate chunks instead of the complete file.

Setup and configuration

Install with uvx p4mcp-server, use a pre-built binary for macOS, Windows, or Linux, or build from source. Building requires Python 3.11 or newer and Tkinter. The documented operating systems are Windows 10 or newer, macOS 12 or newer, and Linux distributions using glibc 2.34 or newer.

Configure the MCP client with the executable path and P4 connection settings. The documented variables are P4PORT, P4USER, and P4CLIENT; a P4CONFIG file can provide configuration instead. P4 tickets can be used for authentication, including when running the provided Docker image. Docker STDIO deployment is documented for macOS and Linux and requires mounting the tickets file when ticket-based authentication is used.

Command-line options include --readonly and --allow-usage. Application and session logs are written to the logs/ directory. Usage telemetry is optional, requires consent, and is disabled by default.

Tools and capabilities

The server provides tools for:

  • Reading server version, uptime, configuration, user details, and permissions.
  • Listing, inspecting, checking, and managing workspaces.
  • Reading file content, metadata, type, size, permissions, annotations, and revision history.
  • Comparing file revisions, searching by filename pattern, and searching file contents.
  • Listing shelf files and retrieving jobs associated with changelists.
  • Inspecting review dashboards, comments, activity, transitions, voters, and read status.
  • Creating, updating, deleting, or switching supported P4 resources.

Parameters include workspace names, users, result limits, review IDs, selected response fields, comment fields, and optional content ranges.

Limitations and notes

The documented P4 Server version is 2026.1; earlier versions are untested. P4 access and valid authentication are prerequisites. P4 DAM features require separate API access and configuration. Docker-based execution is currently limited to macOS and Linux, while pre-built binaries are available for macOS, Windows, and Linux. The server is community-supported according to the repository information.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about P4mcp Server

p4mcp-server is an MCP server that connects AI assistants to Perforce P4 through direct P4 bindings and exposes tools for files, workspaces, changelists, shelves, jobs, reviews, and server metadata. It also supports P4 DAM access through its REST API and can perform configured read and write operations.

Install it with `uvx p4mcp-server`, download a platform-specific binary, or build it from source. The uvx method requires uv, while source builds require Python 3.11 or newer and Tkinter. Pre-built binaries are available for macOS, Windows, and Linux.

Set the P4 connection configuration before starting the server. The documented variables are `P4PORT`, `P4USER`, and `P4CLIENT`, or you can use `P4CONFIG`. You also need P4 Server access and valid authentication through a login ticket or password.

Yes, read-only mode is supported and is the default safety posture described by the project. The server also applies ownership checks and can request interactive PROCEED or CANCEL confirmation for destructive delete and obliterate operations.

Yes, Docker-based STDIO deployment is documented for macOS and Linux. The container requires valid P4 access, and ticket-based authentication can use a mounted P4 tickets file. The client starts the container interactively and removes it when it stops.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewP4mcp Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/p4mcp-server?style=directory)](https://allmcps.com/mcp/p4mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/p4mcp-server"><img src="https://allmcps.com/api/badge/p4mcp-server?style=directory" alt="P4mcp Server on AllMCPs" /></a>