<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
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 direct P4 Python bindings to expose safe, structured read/write tools for. That is what the p4mcp server mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
p4mcp-server on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.
The server publishes 14 tools. What each one is for:
Authentication — Valid P4 login (ticket-based or password)macOS — p4-mcp-server-mac.zipWindows — p4-mcp-server-win.zipLinux — p4-mcp-server-linux.zipP4PORT — P4 Server address. Examples: ssl:perforce.example.com:1666, localhost:1666P4USER — Your P4 usernameP4CLIENT — Your current P4 workspace. Optional, but recommendedP4MCP_MAX_RESULTS — Cap on the number of rows the P4 server returns per command (p4.maxresults). Default: 10000. Set to 0 to disable the limit (server default inP4MCP_MAX_SCAN_ROWS — Cap on the number of rows the P4 server scans per command (p4.maxscanrows). Unset by default, so admin/group policy governs scan limits. Can beP4MCP_LOG_DIR — Directory for log files. Default: logs/ in the server executable's directory. Can be overridden by the --log-dir CLI argumentP4MCP_TLS_CA_MODE — TLS certificate source modecertifi — disable truststore injection and use default Python TLS certificate behavior. Custom CA bundles (P4MCP_CA_BUNDLE / --ca-bundle) take effect only inConfiguration is passed through the environment: P4PORT, P4USER, P4CLIENT. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. P4mcp Server's toolset — Authentication, macOS, Windows and 11 more — is a fair guide to whether it matches your workflow. It is maintained by perforce; worth a glance at recent repository activity before you build anything load-bearing on it.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| Authentication | Valid P4 login (ticket-based or password) |
| macOS | [p4-mcp-server-mac.zip](https://github.com/perforce/p4mcp-server/releases/latest/download/p4-mcp-server-mac.zip) |
| Windows | [p4-mcp-server-win.zip](https://github.com/perforce/p4mcp-server/releases/latest/download/p4-mcp-server-win.zip) |
| Linux | [p4-mcp-server-linux.zip](https://github.com/perforce/p4mcp-server/releases/latest/download/p4-mcp-server-linux.zip) |
| P4PORT | P4 Server address. Examples: ssl:perforce.example.com:1666, localhost:1666 |
| P4USER | Your P4 username |
| P4CLIENT | Your current P4 workspace. Optional, but recommended |
| P4MCP_MAX_RESULTS | Cap on the number of rows the P4 server returns per command (p4.maxresults). Default: 10000. Set to 0 to disable the limit (server default in effect). When a command would exceed this limit the server aborts it with an e |
| P4MCP_MAX_SCAN_ROWS | Cap on the number of rows the P4 server scans per command (p4.maxscanrows). Unset by default, so admin/group policy governs scan limits. Can be overridden by the --max-scan-rows CLI argument. Must be a non-negative integ |
| P4MCP_LOG_DIR | Directory for log files. Default: logs/ in the server executable's directory. Can be overridden by the --log-dir CLI argument. |
| P4MCP_TLS_CA_MODE | TLS certificate source mode. |
| 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. |
| P4MCP_SSL_VERIFY | Set to false to disable SSL verification for P4 Code Review API requests. Default: true. Works in both TLS modes. |
| P4MCP_CA_BUNDLE | Path to a custom CA certificate bundle (PEM) for P4 Code Review API requests. Takes priority over P4MCP_SSL_VERIFY. **Requires P4MCP_TLS_CA_MODE=certifi** to take effect. |
{
"mcpServers": {
"perforce-p4-mcp": {
"command": "/absolute/path/to/p4-mcp-server",
"env": {
"P4PORT": "ssl:perforce.example.com:1666",
"P4USER": "your_username",
"P4CLIENT": "your_workspace"
},
"args": [
"--readonly", "--allow-usage"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| P4PORT | Configuration value read at startup. | Optional |
| P4USER | Configuration value read at startup. | Optional |
| P4CLIENT | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.