Wraps Perforce p4 commands into non-interactive tools for an assistant.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add perforce --env P4CONFIG='<P4CONFIG>' -- npx -y @cocoon-ai/mcp-perforce~/.codex/config.toml
[mcp_servers.perforce]
command = "npx"
args = ["-y", "@cocoon-ai/mcp-perforce"]
env = { P4CONFIG = "<P4CONFIG>" }
# codex mcp add perforce --env P4CONFIG='<P4CONFIG>' -- npx -y @cocoon-ai/mcp-perforce~/.cursor/mcp.json
{
"mcpServers": {
"perforce": {
"command": "npx",
"args": [
"-y",
"@cocoon-ai/mcp-perforce"
],
"env": {
"P4CONFIG": "<P4CONFIG>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"perforce": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cocoon-ai/mcp-perforce"
],
"env": {
"P4CONFIG": "<P4CONFIG>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"perforce": {
"command": "npx",
"args": [
"-y",
"@cocoon-ai/mcp-perforce"
],
"env": {
"P4CONFIG": "<P4CONFIG>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"perforce": {
"command": "npx",
"args": [
"-y",
"@cocoon-ai/mcp-perforce"
],
"env": {
"P4CONFIG": "<P4CONFIG>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"perforce": {
"command": "npx",
"args": [
"-y",
"@cocoon-ai/mcp-perforce"
],
"env": {
"P4CONFIG": "<P4CONFIG>"
}
}
}
}Environment variables
P4CONFIG
Replace the placeholders with your own credentials and keep them out of version control.