mcp-perforce

v1.2.1
@cocoon-ai/mcp-perforce Checked 3 days ago Published 11 months ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

p4_add

Add files to Perforce

ParameterTypeDescription
files *arrayFiles to add (can use wildcards)
pathstringWorking directory path (optional)

p4_edit

Open files for edit in Perforce

ParameterTypeDescription
files *arrayFiles to open for edit
pathstringWorking directory path (optional)

p4_delete

Mark files for deletion in Perforce

ParameterTypeDescription
files *arrayFiles to delete
pathstringWorking directory path (optional)

p4_revert

Revert files or changelist

ParameterTypeDescription
changeliststringChangelist to revert all files from (optional)
filesarrayFiles to revert (optional)
pathstringWorking directory path (optional)

p4_sync

Sync files from the depot

ParameterTypeDescription
filesarraySpecific files to sync (optional, syncs all if not provided)
forcebooleanForce sync even if you have local changes
pathstringWorking directory path (optional)

p4_diff

Show differences for files

ParameterTypeDescription
files *arrayFiles to diff
pathstringWorking directory path (optional)

p4_changelist_create

Create a new changelist with a description

ParameterTypeDescription
description *stringChangelist description
pathstringWorking directory path (optional)

p4_changelist_submit

Submit a changelist

ParameterTypeDescription
changelist *stringChangelist number to submit (or "default")
descriptionstringSubmit description (optional, uses CL description if not provided)
pathstringWorking directory path (optional)

p4_move_to_changelist

Move files to a specific changelist

ParameterTypeDescription
changelist *stringTarget changelist number
files *arrayFiles to move
pathstringWorking directory path (optional)

p4_status

Get current P4 workspace status and pending changes

ParameterTypeDescription
pathstringPath to check status from (uses .p4config in that directory)

p4_info

Show Perforce configuration info for current directory

ParameterTypeDescription
pathstringWorking directory path (optional)

mcp_perforce_version

Show MCP Perforce server version

p4_raw_command

FOR DEBUGGING: Executes a raw p4 command and returns stdout/stderr

ParameterTypeDescription
command *stringThe full p4 command to run (e.g., 'p4 describe -s 1234')
pathstringWorking directory path (optional)

p4_stream_list

List all streams or streams matching a pattern

ParameterTypeDescription
depotstringDepot path to list streams from (e.g., //depot/...)
filterstringFilter pattern for stream names (optional)
pathstringWorking directory path (optional)

p4_stream_info

Get detailed information about a specific stream

ParameterTypeDescription
stream *stringStream path (e.g., //depot/main)
pathstringWorking directory path (optional)

p4_stream_switch

Switch workspace to a different stream

ParameterTypeDescription
stream *stringTarget stream path (e.g., //depot/dev)
forcebooleanForce switch even with pending changes
pathstringWorking directory path (optional)

p4_stream_create

Create a new stream

ParameterTypeDescription
description *stringStream description
stream *stringNew stream path (e.g., //depot/feature-xyz)
type *stringStream type (mainline, development, release, virtual, task)
parentstringParent stream path (required for non-mainline streams)
pathstringWorking directory path (optional)

p4_stream_edit

Edit stream specification

ParameterTypeDescription
stream *stringStream path to edit
pathstringWorking directory path (optional)
specstringStream specification content (optional, opens editor if not provided)

p4_stream_graph

Show stream hierarchy graph

ParameterTypeDescription
depotstringDepot path to show streams from
pathstringWorking directory path (optional)

p4_client_list

List all clients/workspaces for the current user

ParameterTypeDescription
pathstringWorking directory path (optional)
userstringFilter by specific user (optional)

p4_client_info

Get detailed information about a specific client/workspace

ParameterTypeDescription
clientstringClient/workspace name (optional, uses current if not specified)
pathstringWorking directory path (optional)

p4_client_create

Create a new client/workspace

ParameterTypeDescription
client *stringName for the new client/workspace
root *stringRoot directory for the client workspace
descriptionstringClient description (optional)
optionsarrayClient options (optional, e.g., ["allwrite", "clobber"])
pathstringWorking directory path (optional)
streamstringStream to associate with the client (optional)
viewarrayView mappings (e.g., ["//depot/... //myclient/..."])

p4_client_edit

Edit an existing client/workspace specification

ParameterTypeDescription
client *stringClient/workspace name to edit
pathstringWorking directory path (optional)
specstringClient specification content (optional, shows current spec if not provided)

p4_client_delete

Delete a client/workspace

ParameterTypeDescription
client *stringClient/workspace name to delete
forcebooleanForce delete even if client has opened files
pathstringWorking directory path (optional)

p4_client_switch

Switch to a different client/workspace

ParameterTypeDescription
client *stringClient/workspace name to switch to
pathstringWorking directory path (optional)