P4mcp Server MCP Server

<strong>Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system. It is built on

Local serverstdioPython

What is the P4mcp Server MCP Server?

Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system. It is built on FastMCP with

The short version

  • Comprehensive P4 integration — Read/write tools across files, changelists, shelves, workspaces, jobs, reviews, streams, and server information
  • Code review workflows — P4 Code Review support for review discovery, voting, state transitions, commenting, and participant management
  • Safety first — Read-only mode by default, ownership checks, interactive MCP elicitation (PROCEED/CANCEL) for destructive delete and obliterate operations
  • Flexible toolsets — Configure which tool categories to enable: server, files, changelists, shelves, workspaces, jobs, reviews, and streams
  • Robust logging — Application and session logging to the logs/ directory
  • Optional telemetry — Consent-gated usage statistics. Disabled by default

What it needs from you

  • P4 Server access: Connection to a P4 Server with proper credentials - Authentication: Valid P4 login (ticket-based or password)

Recorded tools

  • certifi — disable truststore injection and use default Python TLS certificate behavior. Custom CA bundles (P4MCP_CA_BUNDLE / --ca-bundle) take effect only in this mode.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
Actions- create - Create a new stream (mainline, development, release, task, virtual, etc.)
current_userGet current user information and permissions
getGet a detailed stream specification
statusCheck workspace sync status
Parametersdepot_path (required), commit_id (required)
listList changelists with filters (status, user, workspace)
historyGet file revision history and integration records
infoGet file basic details (type, size, permissions)
metadataGet file metadata (attributes, filesize, etc.)
diffShow differences in shelved files
annotationsGet file annotations with blame information
searchSearch for files by name pattern (wildcard matching)
grepSearch for files by content pattern (text search)
rangesOptional list of [start, end] line pairs, 1-based and inclusive (e.g. [[10, 20], [50, 60]]). Applies to the content action only. When set, the response returns
filesGet files in a review (with optional version range)
get_jobGet detailed job information and status
dashboardGet current user's review dashboard (my reviews, needs attention)
transitionsGet available state transitions for a review
files_readbyGet files read status by users
activityGet review activity history
commentsGet comments on a review
review_fieldsComma-separated fields to return (e.g., "id,description,author,state")
comments_fieldsFields for comments (default: "id,body,user,time")
up_votersList of up voters for transitions
max_resultsMaximum results
childrenGet child streams of a given stream
parentParent stream for non-mainline create
graphGet the full stream graph (parent + children)
integration_statusGet integration status between stream and parent (p4 istat)
get_workspaceGet a workspace spec bound to a stream
list_workspacesList workspaces bound to a stream
validate_fileValidate file paths against a stream's view
validate_submitValidate opened files for submit in a stream workspace
check_resolveCheck for pending stream spec conflicts
interchangesList changelists awaiting integration between streams
stream_pathPath pattern(s) for list (e.g., ["//depot/..."])
filterFilter expression for list (e.g., "Owner=alice&Type=development")
fieldsFields to return for list (e.g., ["Stream", "Owner", "Type"])
workspaceWorkspace name for switch
file_pathsFile paths for propagation
view_without_editView locked stream spec without opening for edit
at_changeRetrieve historical stream spec at a changelist number
both_directionsShow integration status in both directions
force_refreshForce istat cache refresh
RequiresRead-only mode disabled, appropriate permissions
SafetyStream existence validation, locked stream detection, bound workspace warnings, open file checks for view-affecting changes
refresh_projectsRefresh project associations
voteVote on a review (up, down, clear)
transitionTarget state: needsRevision, needsReview, approved, committed, approved:commit, rejected, archived
append_participantsAdd reviewers/groups to a review
replace_participantsReplace all participants
delete_participantsRemove participants from a review
add_commentAdd a comment to a review
reply_commentReply to an existing comment
edit_commentEdit an existing comment's body and/or task state
append_changeAdd a changelist to an existing review
replace_with_changeReplace review content with a changelist
joinJoin a review as a participant
leaveLeave a review
archive_inactiveArchive inactive reviews
update_authorChange the review author
update_descriptionUpdate review description
obliteratePermanently delete a review
change_idChangelist ID (required for create, append_change, replace_with_change)
reviewer_groupsReviewer groups with requirements
vote_valueVote value: up, down, clear
versionReview version for voting
bodyComment body text
task_stateComment task state: open, comment, addressed, verified. add_comment accepts only open and comment; addressed and verified are reachable through edit_comment.
notifyNotification mode: immediate, delayed
comment_idComment ID for replies, edits, or marking read/unread
contextComment context (file, line numbers, content, version)
updateUpdate stream properties (name, description, options, paths, parent_view)
deleteDelete a stream
edit_specOpen stream spec for editing (p4 stream edit)
resolve_specResolve stream spec conflicts
revert_specRevert stream spec edits
shelve_specShelve stream spec edits to a numbered changelist
unshelve_specUnshelve stream spec edits
copyCopy changes between parent and child streams
mergeMerge changes between parent and child streams
integrateIntegrate changes with advanced options
populatePopulate a new stream with files (branch)
switchSwitch a workspace to a different stream
create_workspaceCreate a new workspace bound to a stream
stream_typeStream type for create: mainline, development, sparsedev, release, sparserel, task, virtual
optionsStream options: allsubmit/ownersubmit, unlocked/locked, toparent/notoparent, fromparent/nofromparent, mergedown/mergeany
parent_viewParent view treatment: inherit or noinherit
changelistChangelist for spec editing or propagation operations
resolve_modeResolve mode for resolve_spec: auto, accept_theirs, accept_yours
parent_streamOverride parent for propagation (-P flag)
branchBranch spec for integrate/populate (-b flag)
previewPreview only, no changes (-n flag)
forceForce operation (-f flag)
reverseReverse direction (-r flag)
max_filesLimit files processed (-m flag)
quietSuppress informational messages (-q flag)
output_baseShow base revision with scheduled resolve (-Ob flag for merge/integrate) or list files created (-o flag for populate)
virtualCopy using virtual stream (-v flag, copy only)
schedule_branch_resolveSchedule branch resolves instead of automatic branching (-Rb flag, integrate only)
integrate_around_deletedIntegrate around deleted revisions (-Di flag, integrate only)
skip_cherry_pickedSkip cherry-picked revisions already integrated (-Rs flag, integrate only)

How to install the P4mcp Server MCP Server

{
  "mcpServers": {
    "perforce-p4-mcp": {
      "command": "uvx",
      "args": [
        "p4mcp-server",
        "--readonly",
        "--allow-usage"
      ],
      "env": {
        "P4PORT": "ssl:perforce.example.com:1666",
        "P4USER": "your_username",
        "P4CLIENT": "your_workspace",
        "P4DAM_API_KEY": "YOUR_P4DAM_API_KEY"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • P4 Server access: Connection to a P4 Server with proper credentials - Authentication: Valid P4 login (ticket-based or password)
VariableDescriptionRequired
P4PORTDeclared in the maintainer’s client configuration.Check documentation
P4USERDeclared in the maintainer’s client configuration.Check documentation
P4CLIENTDeclared in the maintainer’s client configuration.Optional
P4DAM_API_KEYDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use P4mcp Server to Authentication.”
  • “Use P4mcp Server to macOS.”
  • “Use P4mcp Server to Windows.”

Frequently asked questions

<strong>Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the Perforce P4 version control system. It is built on FastMCP with Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.