
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Model Context Protocol server that wraps Perforce (P4) commands into a reliable, non-interactive interface for use in Claude Desktop.
MCP Perforce Server is cataloged as an MCP server attributed to cocoon-ai. A Model Context Protocol server that wraps Perforce (P4) commands into a reliable, non-interactive interface for use in Claude Desktop. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP Perforce Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It uses Perforce's P4CONFIG mechanism to automatically switch between different Perforce servers based on the current directory via .p4config files.
It offers file operations, changelist operations, stream operations, client/workspace operations, and information commands such as p4_info.
README.md · 7bc9d6991b0f · 采集于 2026-11-13 09:46:41 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server that provides a clean interface for Perforce (P4) operations in Claude Desktop. This server wraps P4 commands to make them more reliable and easier for Claude to use, eliminating issues with interactive prompts and complex state management.
.p4config files for per-project settings.p4config files in your project directories (recommended)# Install the package globally
npm install -g @cocoon-ai/mcp-perforce
# Add to Claude Code
claude mcp add perforce @cocoon-ai/mcp-perforce
That's it! Claude Code will automatically configure the server for you.
npm install -g @cocoon-ai/mcp-perforce
git clone https://github.com/Cocoon-AI/mcp-perforce.git
cd mcp-perforce
npm install
npm run build
npm link # Makes 'mcp-perforce' available globally
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"perforce": {
"command": "npx",
"args": ["-y", "@cocoon-ai/mcp-perforce"],
"env": {
"P4CONFIG": ".p4config"
}
}
}
}
The server uses Perforce's built-in P4CONFIG mechanism to automatically switch between different Perforce servers based on your current directory. Create a .p4config file in each project root:
# ~/projects/gamedev/.p4config
P4PORT=perforce-game.company.com:1666
P4CLIENT=gamedev-workspace
P4USER=your-username
# ~/projects/web/.p4config
P4PORT=perforce-web.company.com:1666
P4CLIENT=web-workspace
P4USER=your-username
Now the MCP server will automatically use the correct Perforce settings based on which project directory you're working in!
Once configured, you can ask Claude to use these P4 operations. All commands will automatically use the .p4config settings from your current project directory.
p4_status: Check workspace status and pending changes
"Show me my pending P4 changes"
"Check P4 status in the gamedev directory"
p4_add: Add files to Perforce
"Add all .js files in the src directory to Perforce"
p4_edit: Open files for edit
"Open config.json for editing in Perforce"
p4_delete: Mark files for deletion
"Delete the old_module.py file from Perforce"
p4_sync: Sync files from depot
"Sync all files in the project"
"Force sync the src directory"
p4_revert: Revert files or entire changelists
"Revert all files in changelist 12345"
"Revert changes to config.json"
p4_diff: Show differences for files
"Show me the diff for all my open files"
p4_changelist_create: Create a new changelist
"Create a new changelist with description 'Fix login bug'"
p4_changelist_submit: Submit a changelist
"Submit changelist 12345"
p4_move_to_changelist: Move files between changelists
"Move all my open files to changelist 12345"
p4_stream_list: List streams in a depot
"List all streams in //depot"
"Show me development streams matching 'feature'"
p4_stream_info: Get detailed stream information
"Show me details about //depot/main stream"
p4_stream_switch: Switch workspace to a different stream
"Switch to the //depot/dev stream"
"Force switch to //depot/release-2.0"
p4_stream_create: Create a new stream
"Create a development stream //depot/feature-xyz from //depot/main"
p4_stream_edit: Edit stream specification
"Edit the //depot/feature-xyz stream spec"
p4_stream_graph: Show stream hierarchy
"Show the stream hierarchy for //depot"
p4_client_list: List all clients/workspaces
"List all my Perforce workspaces"
"Show clients for user jsmith"
p4_client_info: Get client/workspace details
"Show me details about my current workspace"
"Show info for client gamedev-workspace"
p4_client_create: Create a new client/workspace
"Create a new workspace called dev-feature in /home/user/p4/feature"
"Create a stream client for //depot/main-stream"
p4_client_edit: Edit client specification
"Edit the view mappings for client dev-workspace"
p4_client_delete: Delete a client/workspace
"Delete the old-feature workspace"
"Force delete the broken-client workspace"
p4_client_switch: Switch to a different client
"Switch to the production-client workspace"
p4_info: Show current Perforce configuration
"Show me which P4 server and workspace I'm using"
mcp_perforce_version: Show MCP Perforce server version
"What version of mcp-perforce is running?"
Here are some example conversations with Claude:
Example 1: Creating and submitting a change
You: "I've modified server.js and config.json. Create a changelist for these fixes"
Claude: I'll help you create a changelist for your changes. Let me first check the status...
[Uses p4_status, p4_changelist_create, p4_submit]
Example 2: Syncing and reviewing changes
You: "Sync the latest changes and show me what files I have open"
Claude: I'll sync your workspace and check your open files...
[Uses p4_sync, p4_status]
npm list -g @cocoon-ai/mcp-perforce.p4config file exists and has the correct settingsp4 infop4 loginp4 set P4CONFIG.p4config from the current or parent directoriesp4 info to see which config is being usedp4_info command in Claude to debug: "Show me my P4 configuration"To enable debug output, add to your configuration:
{
"mcpServers": {
"perforce": {
"command": "npx",
"args": ["-y", "@cocoon-ai/mcp-perforce"],
"env": {
"P4CONFIG": ".p4config",
"DEBUG": "mcp:*"
}
}
}
}
git clone https://github.com/Cocoon-AI/mcp-perforce.git
cd mcp-perforce
npm install
npm run build
npm test
src/tools/src/handlers/src/handlers/index.tsContributions are welcome! Please:
git checkout -b feature/new-command)git commit -am 'Add new P4 command')git push origin feature/new-command)MIT License - see LICENSE file for details
Made with ❤️ for AIs struggling with P4 command-line operations
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP Perforce Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-perforce)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.