Perforce P4 MCP Server
Perforce P4 MCP Server is a Model Context Protocol (MCP) server that integrates with the P4 version control system. P4 MCP Server exposes safe, structured read/write tools to AI models for changelists, files, shelves, workspaces, jobs, reviews, and server metadata in P4 Server.
On this page:
What you can do with P4 MCP Server
Here are some sample queries you might send to an AI model connected to P4 MCP Server.
Read operations:
-
"List the latest changelists from John Smith"
-
"Get the history of the file modified in change 123456"
-
"Tell me about my server (uptime, version, etc.)"
Write operations:
-
"Create a new changelist titled 'test' in my current workspace"
-
"Check out my-file.txt to my pending changelist"
-
"Revert the changes to my-file.txt and shelve the remaining files"
-
"Switch my workspace to my-stream and convert it to a release stream"
-
"Exclude this/file/path/... from my-stream and propagate the change to my other streams"
Prerequisites
For the most up-to-date prerequisites, see the Perforce P4 MCP Server README on GitHub.
To use P4 MCP Server, you need:
-
A connection to a P4 Server.
-
Valid P4 login credentials (ticket-based or password).
-
An MCP-compatible client, such as IntelliJ IDEA, Claude Code, or VS Code.
Installation
For complete and current installation steps, see the Perforce P4 MCP Server README on GitHub.
-
Download the pre-built binary for your operating system:
-
macOS: p4-mcp-server-map.zip
-
Windows: p4-mcp-server-win.zip
-
Linux: p4-mcp-server-linux.zip
You can also build P4 MCP Server from source or run it from Docker (macOS and Linux only). -
-
Extract and run the executable.
-
Configure your MCP client settings. Set P4 environment variables and limit the scope of MCP operations.
-
If necessary, configure P4 to match your MCP client settings.
P4 administrators can manage MCP access through global, group-level, and user-level server properties.
Limitations
Some MCP tools might require non-read-only mode or appropriate P4 permissions. General tool usage is restricted by configurations set by an administrator.
Support and licensing
P4 MCP Server is a community-supported project and is not officially supported by Perforce. Report P4 MCP Server issues to the GitHub community. For P4 issues, see the P4 Support portal.
P4 MCP Server is licensed under the MIT License. To learn more, see the license on GitHub.