Perforce P4 MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| P4PORT | No | P4 Server address (e.g., ssl:perforce.example.com:1666) | |
| P4USER | No | Your P4 username | |
| P4CLIENT | No | Your current P4 workspace (optional but recommended) | |
| P4CONFIG | No | Path to a P4CONFIG file that defines P4PORT, P4USER, etc. | |
| P4PASSWD | No | Your P4 password or ticket | |
| P4MCP_LOG_DIR | No | Directory for log files (default: logs/ in server executable directory) | |
| P4MCP_CA_BUNDLE | No | Path to custom CA certificate bundle (requires P4MCP_TLS_CA_MODE=certifi) | |
| P4MCP_SSL_VERIFY | No | Enable/disable SSL verification for Swarm API (default: true) | |
| P4MCP_TLS_CA_MODE | No | TLS certificate source mode: system or certifi | system |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query_serverA | Get server info and current user information (READ permission) |
| query_workspacesB | Get workspace details, list workspaces, check type and status (READ permission) |
| modify_workspacesB | Create/delete workspace, Update workspace specs, and switch active workspace (WRITE permission) |
| query_filesB | Get file content, history, info, diff, annotations, search by name, grep by content (READ permission) |
| modify_filesB | Add, edit, move, delete, revert, reconcile, resolve, and sync files (WRITE permission) |
| query_changelistsB | Get changelist details and list changelists (READ permission) |
| modify_changelistsA | Create/delete changelists, update changelists and organize files/jobs (WRITE permission) |
| query_shelvesA | List shelves, get shelve diff and files (READ permission) |
| modify_shelvesA | Create/delete, update shelves and unshelve files (WRITE permission) |
| query_jobsB | Get jobs from changelist and get job details (READ permission) |
| modify_jobsC | Link or unlink jobs (WRITE permission) |
| query_reviewsA | Get review details and list reviews (READ permission). Open review - state is 'approved but pending=true' or 'needsReview' or 'needsRevision'. Closed review - state is 'approved but pending=false' or 'rejected' or 'archived'. |
| modify_reviewsC | Create/update/delete reviews (WRITE permission) |
| query_streamsB | Query streams: list, get spec, children/parent/graph, integration status, workspaces, validate files, check resolve, interchanges (READ permission) |
| modify_streamsC | Create/update/delete streams, edit/resolve/revert/shelve stream specs, copy/merge/integrate/populate between streams, switch workspace, create stream workspace (WRITE permission) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 15 tools
The query_/modify_ split cleanly separates read from write, and each tool targets a distinct Perforce resource (files, changelists, workspaces, shelves, jobs, reviews, streams, server). Although individual tools bundle many sub-operations, the resource boundaries are unambiguous.
Every tool follows a strict verb_noun convention with only two verbs (query_ for reads, modify_ for writes) across all 15 tools. The pattern is fully predictable and self-documenting.
15 tools for a full Perforce client covering 8 resource domains is well-scoped. Each resource earns its place with a paired read/write tool, none feels redundant.
The surface gives read/write coverage across files, changelists, workspaces, shelves, jobs, reviews, streams, and server info, covering most core workflows. Admin-oriented areas like depots, labels, users/groups, and triggers are absent, but typical developer operations are fully supported.