P4mcp Server logo

P4mcp Server

Connects AI assistants to Perforce P4 for repository queries, file and changelist changes, reviews, shelves, jobs, and streams.

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",
        "P4CONFIG": "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— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

p4mcp-server exposes Perforce P4 operations to MCP-compatible AI clients through structured read and write tools. It uses direct P4 Python bindings for core version-control operations and can access P4 DAM resources through its REST API. Read-only mode is enabled by default, with ownership checks and confirmation prompts for destructive actions. Use it when an agent needs to inspect or update P4 files, workspaces, changelists, reviews, or streams.

Use cases

  • Inspect P4 file history and diffs before proposing a change
  • Manage workspaces and synchronize files from an MCP client
  • Organize files into changelists and shelves
  • Find reviews, jobs, and stream integration status
  • Apply file or stream updates with write confirmation controls

Key features

  • Read and write P4 tools for files, changelists, shelves, workspaces, jobs, reviews, and streams
  • P4 Code Review discovery and management
  • P4 DAM asset and metadata access
  • Read-only mode enabled by default
  • Configurable tool categories
  • STDIO, Docker, and pre-built binary deployment options

Tools15

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

Verified live~8.0k 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.

15/15 checks healthy over the last 55d

What it can do

From the 15 tools this server returned when we ran it.

Can delete or modify data · 6Writes files · 1Read-only tools · 9
Network at startup2 connections
Files written at startup16

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

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

Adoption & maintenance

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

GitHub stars125Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.
Tools exposed15Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How P4mcp Server works

What p4mcp-server does

p4mcp-server connects MCP-compatible AI assistants to a Perforce P4 server. Its tools cover server and user information, workspaces, files, changelists, shelves, jobs, reviews, and streams. Read operations can inspect file content, history, diffs, annotations, changelist data, shelf contents, review states, stream relationships, and integration status.

Write operations support common repository workflows: creating and changing workspaces, editing or reconciling files, managing changelists and shelves, linking jobs, updating reviews, and copying or merging between streams. P4 Code Review workflows include finding reviews, checking their state, and creating, updating, or deleting reviews. P4 DAM access is available through the product's REST API for asset searches, metadata, review management, bundles, tags, and projects.

How it works

The server is built with FastMCP and communicates with P4 through the P4 Python bindings. It normally runs locally over STDIO, allowing an MCP client to start and manage the process. A Docker image is also available for STDIO deployment, and pre-built binaries are provided for macOS, Windows, and Linux.

P4 access requires a reachable server and valid authentication, using either a ticket-based login or a password. The P4 connection can be supplied with standard connection settings such as the server address, user, and workspace, or through P4CONFIG. For container use with ticket authentication, the P4 tickets file can be mounted into the container.

The server starts in read-only mode by default. Tool categories can be enabled or disabled independently for server metadata, files, changelists, shelves, workspaces, jobs, reviews, streams, and P4 DAM. Destructive delete and obliterate actions use interactive PROCEED/CANCEL elicitation, and ownership checks are part of the safety controls.

Setup and configuration

The simplest installation uses uvx, which downloads and runs the latest package from PyPI:

bash
uvx p4mcp-server

Run it with --readonly to explicitly keep write operations disabled, or use --allow-usage to enable consented usage statistics. Pre-built archives can be downloaded for supported operating systems when an offline or air-gapped installation is needed. Building from source requires Python 3.11 or later with Tkinter.

A local MCP configuration supplies the executable path and P4 connection values:

config.json
{
  "mcpServers": {
    "perforce-p4-mcp": {
      "command": "/absolute/path/to/p4-mcp-server",
      "env": {
        "P4PORT": "ssl:perforce.example.com:1666",
        "P4USER": "your_username",
        "P4CLIENT": "your_workspace"
      },
      "args": ["--readonly"]
    }
  }
}

Supported platforms include Windows 10 or later, macOS 12 or later, and Linux distributions with glibc 2.34 or newer. Application and session logs are written to the logs/ directory. Usage telemetry is optional and disabled by default.

Tools and capabilities

  • Query server details and current-user information.
  • List, inspect, create, update, delete, and switch P4 workspaces.
  • Read file content, history, diffs, annotations, and search results.
  • Add, edit, move, delete, revert, reconcile, resolve, and sync files.
  • Create and manage changelists, shelves, jobs, and reviews.
  • Inspect review states, including open and closed review classifications.
  • Explore stream parents, children, graphs, interchanges, and integration status.
  • Copy, merge, integrate, populate, resolve, revert, and shelve stream changes.
  • Access P4 DAM assets and metadata through the REST API.

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 and exposes structured tools for querying and modifying files, workspaces, changelists, shelves, jobs, reviews, and streams. It also accesses P4 DAM through its REST API and defaults to read-only operation for safer repository automation.

Install it with `uvx p4mcp-server`, or download a pre-built binary for macOS, Windows, or Linux. Source builds require Python 3.11 or later with Tkinter. The server can also run from the published Docker image using STDIO.

Set the P4 server address, username, and workspace through `P4PORT`, `P4USER`, and `P4CLIENT`, or use P4CONFIG. Authentication requires a valid P4 login using a ticket or password. Docker deployments can mount the P4 tickets file into the container.

Yes, read-only mode is the default, and you can also pass the `--readonly` argument explicitly. Write-capable tools cover repository changes, while ownership checks and interactive PROCEED/CANCEL prompts protect destructive delete and obliterate actions.

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>