Skip to content
VS Code

Perforce P4 MCP Server for VS Code

io.github.perforce/p4mcp-server

Perforce P4 MCP server: changelists, files, shelves, workspaces, jobs, code reviews, and streams.

client:VS Code transport:stdio runtime:oci

Install Perforce P4 MCP Server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "p4port",
      "description": "P4PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "p4user",
      "description": "P4USER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "p4client",
      "description": "P4CLIENT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "p4passwd",
      "description": "P4PASSWD",
      "password": true
    }
  ],
  "servers": {
    "p4mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/perforce/p4mcp-server:2026.3.2996147"
      ],
      "env": {
        "P4PORT": "${input:p4port}",
        "P4USER": "${input:p4user}",
        "P4CLIENT": "${input:p4client}",
        "P4PASSWD": "${input:p4passwd}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Perforce P4 MCP Server in other clients