mcp-perforce
v1.2.1A 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
| Parameter | Type | Description |
|---|---|---|
files * | array | Files to add (can use wildcards) |
path | string | Working directory path (optional) |
p4_edit
Open files for edit in Perforce
| Parameter | Type | Description |
|---|---|---|
files * | array | Files to open for edit |
path | string | Working directory path (optional) |
p4_delete
Mark files for deletion in Perforce
| Parameter | Type | Description |
|---|---|---|
files * | array | Files to delete |
path | string | Working directory path (optional) |
p4_revert
Revert files or changelist
| Parameter | Type | Description |
|---|---|---|
changelist | string | Changelist to revert all files from (optional) |
files | array | Files to revert (optional) |
path | string | Working directory path (optional) |
p4_sync
Sync files from the depot
| Parameter | Type | Description |
|---|---|---|
files | array | Specific files to sync (optional, syncs all if not provided) |
force | boolean | Force sync even if you have local changes |
path | string | Working directory path (optional) |
p4_diff
Show differences for files
| Parameter | Type | Description |
|---|---|---|
files * | array | Files to diff |
path | string | Working directory path (optional) |
p4_changelist_create
Create a new changelist with a description
| Parameter | Type | Description |
|---|---|---|
description * | string | Changelist description |
path | string | Working directory path (optional) |
p4_changelist_submit
Submit a changelist
| Parameter | Type | Description |
|---|---|---|
changelist * | string | Changelist number to submit (or "default") |
description | string | Submit description (optional, uses CL description if not provided) |
path | string | Working directory path (optional) |
p4_move_to_changelist
Move files to a specific changelist
| Parameter | Type | Description |
|---|---|---|
changelist * | string | Target changelist number |
files * | array | Files to move |
path | string | Working directory path (optional) |
p4_status
Get current P4 workspace status and pending changes
| Parameter | Type | Description |
|---|---|---|
path | string | Path to check status from (uses .p4config in that directory) |
p4_info
Show Perforce configuration info for current directory
| Parameter | Type | Description |
|---|---|---|
path | string | Working 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
| Parameter | Type | Description |
|---|---|---|
command * | string | The full p4 command to run (e.g., 'p4 describe -s 1234') |
path | string | Working directory path (optional) |
p4_stream_list
List all streams or streams matching a pattern
| Parameter | Type | Description |
|---|---|---|
depot | string | Depot path to list streams from (e.g., //depot/...) |
filter | string | Filter pattern for stream names (optional) |
path | string | Working directory path (optional) |
p4_stream_info
Get detailed information about a specific stream
| Parameter | Type | Description |
|---|---|---|
stream * | string | Stream path (e.g., //depot/main) |
path | string | Working directory path (optional) |
p4_stream_switch
Switch workspace to a different stream
| Parameter | Type | Description |
|---|---|---|
stream * | string | Target stream path (e.g., //depot/dev) |
force | boolean | Force switch even with pending changes |
path | string | Working directory path (optional) |
p4_stream_create
Create a new stream
| Parameter | Type | Description |
|---|---|---|
description * | string | Stream description |
stream * | string | New stream path (e.g., //depot/feature-xyz) |
type * | string | Stream type (mainline, development, release, virtual, task) |
parent | string | Parent stream path (required for non-mainline streams) |
path | string | Working directory path (optional) |
p4_stream_edit
Edit stream specification
| Parameter | Type | Description |
|---|---|---|
stream * | string | Stream path to edit |
path | string | Working directory path (optional) |
spec | string | Stream specification content (optional, opens editor if not provided) |
p4_stream_graph
Show stream hierarchy graph
| Parameter | Type | Description |
|---|---|---|
depot | string | Depot path to show streams from |
path | string | Working directory path (optional) |
p4_client_list
List all clients/workspaces for the current user
| Parameter | Type | Description |
|---|---|---|
path | string | Working directory path (optional) |
user | string | Filter by specific user (optional) |
p4_client_info
Get detailed information about a specific client/workspace
| Parameter | Type | Description |
|---|---|---|
client | string | Client/workspace name (optional, uses current if not specified) |
path | string | Working directory path (optional) |
p4_client_create
Create a new client/workspace
| Parameter | Type | Description |
|---|---|---|
client * | string | Name for the new client/workspace |
root * | string | Root directory for the client workspace |
description | string | Client description (optional) |
options | array | Client options (optional, e.g., ["allwrite", "clobber"]) |
path | string | Working directory path (optional) |
stream | string | Stream to associate with the client (optional) |
view | array | View mappings (e.g., ["//depot/... //myclient/..."]) |
p4_client_edit
Edit an existing client/workspace specification
| Parameter | Type | Description |
|---|---|---|
client * | string | Client/workspace name to edit |
path | string | Working directory path (optional) |
spec | string | Client specification content (optional, shows current spec if not provided) |
p4_client_delete
Delete a client/workspace
| Parameter | Type | Description |
|---|---|---|
client * | string | Client/workspace name to delete |
force | boolean | Force delete even if client has opened files |
path | string | Working directory path (optional) |
p4_client_switch
Switch to a different client/workspace
| Parameter | Type | Description |
|---|---|---|
client * | string | Client/workspace name to switch to |
path | string | Working directory path (optional) |