Skip to content

Releases: perforce/p4mcp-server

P4 MCP Server 2026.1 - Stream Tools

27 Apr 08:19

Choose a tag to compare

What's New

Stream Operations

P4 MCP Server now supports a full suite of Perforce P4 stream operations:

  • Detect whether a workspace is stream-based or classic.
  • List streams and their structure (name, type, parent, path).
  • Switch a workspace to a different stream (with open-file safety checks; requires confirmation before executing).
  • Create a new stream from a parent, with type and duplicate-name validation.
  • Edit an existing stream spec safely.
  • Guard against stream deletion that would affect active workspaces.
  • Validate file operations against stream context before executing.
  • Detect when a stream spec resolve is required.
  • Propagate changes between streams (merge, copy, interchanges) with preview support.
  • View integration status between streams (p4 istat).

Admin and User Controls for MCP Tools

Administrators can now enable or disable the P4 MCP server, toolsets, and individual tools globally, per P4 group, or per individual user using p4 property. The MCP server checks properties in this order. Each property is resolved independently by P4 using the standard resolution rules (highest -s wins, then user > group > global at equal sequence, then alphabetically-first group name).

# Global controls
p4 property -a -n mcp.enabled -v true
p4 property -a -n mcp.toolsets.write -v false
p4 property -a -n mcp.toolsets.allowed -v "files,changelists,streams"

# Per-group toolset permissions
p4 property -a -n mcp.toolset.files.enabled -v true -g developers
p4 property -a -n mcp.toolset.workspace.write -v false -g reviewers

# Tool-specific overrides
p4 property -a -n mcp.toolset.files.tools -v "query_files,query_diff" -g reviewers

# Emergency global disable
p4 property -a -n mcp.enabled -v false

See the updated README for the full property reference and examples.

Remote MCP Server Deployment via HTTP

P4 MCP Server can now be deployed centrally on a shared host using HTTP transport and a shared read-only Perforce account, giving multiple users MCP access without a per-user installation or local binary. See the README for setup instructions and known limitations.

Linux Pre-Built Binary

P4 MCP Server now ships a pre-built Linux binary (Ubuntu 20.04+) alongside the existing macOS and Windows binaries. Linux users no longer need to build from source. The CI/CD pipeline has been updated to publish p4-mcp-server-linux.tar.gz on every release.

SSL / Custom CA Support

New CLI flags and environment variables allow use in environments with self-signed or internal CA certificates for P4 Code Review and P4 Code Review API connections:

--ssl-no-verify          Disable SSL certificate verification
--ca-bundle <path>       Path to a CA bundle file

P4MCP_SSL_VERIFY=false   Env var equivalent of --ssl-no-verify
P4MCP_CA_BUNDLE=<path>   Env var equivalent of --ca-bundle
P4MCP_TLS_CA_MODE=certifi  Use certifi bundle instead of OS trust store

Priority order: CLI args > env vars > default (verification enabled).

MCP Registry Discovery

P4 MCP Server is now published to the MCP Registry with a server.json manifest, making it discoverable by MCP-compatible clients (VS Code, Copilot, Claude, Cursor). A pre-built Docker image is available at ghcr.io/perforce/p4mcp-server – no local build required. The README has been updated to use the published image as the primary installation path.

Confirmation Prompts for Destructive Operations

Destructive operations (file delete, changelist delete, workspace delete, shelve delete, stream delete, review actions) now use MCP elicitation to prompt for explicit user confirmation before executing. The prompt describes exactly what will be affected. If the user cancels, no operation is performed. The separate execute_delete tool has been removed.

Lightweight Perforce Skill Profile

A new guide under docs/skills/ documents a minimal recommended tool subset for IDE agent use. The lightweight profile reduces LLM context size and improves tool invocation reliability in constrained environments.

FastMCP 3 and Search Transforms

Upgraded to FastMCP 3. Search Transforms are now enabled, filtering the visible tool list based on query context and reducing tool catalog token cost for connected MCP clients.

Docker: Non-Root Execution and Flexible Argument Passing

  • Container now runs as mcpuser instead of root, reducing potential impact in the event of a container escape. P4TICKETS path updated to /home/mcpuser/.p4tickets; volume mount paths updated from /root to /home/mcpuser.
  • ENTRYPOINT and CMD split so additional arguments can be passed to the server at container runtime without overriding the entrypoint.

Bug Fixes

  • Removed unnecessary workspace ownership check that blocked valid operations on shared workspaces.
  • Destructive operations now correctly enforce the user_confirmed flag before execution.
  • Fixed safety gate bypass in modify_reviews where obliterate actions did not require approval.
  • Removed unused _get_public_ip() method that made outbound calls to an external service to resolve the developer IP.
  • Fixed unintended Perforce user creation when an arbitrary string was supplied as P4USER.
  • Corrected product name from P4MCP to P4 MCP in the GitHub About section.

Security


Internal / Infrastructure

  • Refactored server.py, models.py, handlers.py into modular toolset files – no behaviour changes.

New Contributors


Full Changelog: 2025.2.2901372...v2026.1.2933350

P4 MCP Server 2025.2 Patch 1 — Docker Support & Claude Compatibility Fix

26 Feb 16:17

Choose a tag to compare

Release Summary

This patch release adds Docker support for building and running the P4 MCP Server from source, introduces a refined tool parameter pattern for improved MCP client compatibility, and improves connection resilience with automatic reconnection on authentication errors.


What's New

Docker Support

  • Added a Docker image that enables building and running the P4 MCP Server from source on macOS and Linux
  • Simplifies local development and deployment without needing to manage Python environments directly

Claude Model Compatibility Fix

Fixed an issue where Claude models failed to correctly invoke tools that used Pydantic model parameters. Migrated to individual annotated parameters with Literal types for action and enum fields, ensuring reliable tool invocation across all MCP clients.

New invocation flow:

  1. FastMCP receives individual parameters from the MCP client
  2. Function receives typed, annotated parameters
  3. Pydantic model constructed from parameters (validation happens here)
  4. If validation fails, Pydantic raises ValidationError
  5. If validation passes, model is sent to the handler

Authentication Error Recovery

  • Added a mechanism to handle authentication errors by forcing a disconnect and reconnect, improving resilience against expired credentials or transient auth failures
  • Enhanced error logging to provide detailed information on P4 operation errors

Dependency Updates

  • Upgraded FastMCP to 2.14.4 along with its transitive dependencies
  • Added dynamic collection of submodules from rich._unicode_data for PyInstaller compatibility
  • Removed several unnecessary package dependencies from requirements.txt to reduce footprint

Upgrade Instructions

  1. Download the appropriate binary for your platform — or use the new Docker image to build from source
  2. Extract the archive (if using binary)
  3. Update your MCP client configuration to use the new binary/container path
  4. Restart your MCP client

Full Changelog: 2025.2.2880005...2025.2.2901372

P4 MCP Server 2025.2 - Code Review Integration

22 Jan 04:54

Choose a tag to compare

Release Summary

This release introduces comprehensive P4 Code Review support, bringing native code review workflows to the Perforce MCP Server. Version 2025.2 adds powerful review management capabilities including discovery, voting, state transitions, commenting, and participant management ‒ all accessible through the Model Context Protocol interface.


What's New

Code Review Support

New reviews toolset for comprehensive code review workflows.

  • query_reviews tool ‒ Review discovery and information retrieval

    • List all reviews with optional filtering
    • Display a personal review dashboard (my reviews, needs attention)
    • Retrieve detailed review information
    • Discover available state transitions
    • List review files with optional version ranges
    • Track activity history
    • Retrieve comments
  • modify_reviews tool ‒ Complete review management

    • Create new reviews from changelists
    • Refresh project associations
    • Vote on reviews (up/down/clear)
    • Update state transitions (needsRevision, needsReview, approved, committed, rejected, archived)
    • Manage participants (append, replace, delete)
    • Add comments to reviews

Updated Dependencies

  • Upgraded to p4python 2025.2.2863679
  • Updated fastmcp to 2.14.2
  • Enhanced dependency pinning with complete requirements specification
  • Added THIRD-PARTY-NOTICES.txt for license compliance

Configuration Changes

  • New --toolsets option now supports reviews category
  • Available toolsets: files, changelists, shelves, workspaces, jobs, reviews
  • Default behavior: All toolsets enabled

Bug Fixes & Build Improvements

  • Fixed FakeRedis missing commands.json in PyInstaller build
  • Added missing Lupa dependency for build
  • Updated requirements and spec to get builds working (#2)

Upgrade Instructions

  1. Download the appropriate binary for your platform
  2. Extract the archive
  3. Update your MCP client configuration to use the new binary path
  4. (Optional) Add --toolsets reviews to explicitly enable review tools
  5. Restart your MCP client

Use Cases

The new review capabilities enable:

  • Automated code review discovery and tracking
  • Review status monitoring and dashboard views
  • Voting and approval workflows
  • Review state management through AI assistants
  • Comment analysis and activity tracking
  • Participant and reviewer management
  • Integration with AI-powered code review assistance

Full Changelog: 2025.1.2830393...2025.2.2880005

P4 MCP Server 2025.1 release

24 Sep 14:28

Choose a tag to compare

This is the first release of P4 MCP Server - 2025.1.2830393

Binaries are available for the following platforms:

  • Windows : p4-mcp-server-win.zip
  • Mac : p4-mcp-server-mac.zip