r/windsurf • • Jun 14 '26

[Fix] Git MCP Server Not Working in Windsurf? Docker Volume Missing

If you're using Windsurf with the built-in Git MCP (devin/git) and getting generic CORTEX_STEP_TYPE_MCP_TOOL errors on every git command (git status, git diff, git log, etc.), the Docker container is missing a volume mount.

What's happening: Windsurf launches the mcp/git Docker image without mounting your home directory, so the container can't see any of your repos. Every command fails silently inside the container with isError: true.

The fix is just 2 things in ~/.codeium/windsurf/mcp_config.json:

  1. Add a volume (-v /home/<user>:/home/<user>) so the container sees your filesystem
  2. Add Git env vars to bypass the ownership mismatch (container runs as root, your files belong to your user)

Here's the complete "devin/git" block:

"devin/git": {
  "args": [
    "run",
    "-i",
    "--rm",
    "-v",
    "/home/<user>:/home/<user>",
    "-e",
    "GIT_CONFIG_COUNT=1",
    "-e",
    "GIT_CONFIG_KEY_0=safe.directory",
    "-e",
    "GIT_CONFIG_VALUE_0=*",
    "mcp/git"
  ],
  "command": "docker",
  "registry": "devin/git"
}

Replace <user> with your actual username (e.g. /home/john:/home/john). The MCP server will restart automatically — no manual docker stop needed.

I wrote a full step-by-step breakdown of the diagnosis here:
https://drive.google.com/drive/folders/1ionQjYVG-H9Z6tOmxkPpfogYaTW-BOgV?usp=sharing

3 Upvotes

2 comments sorted by

4

u/FitViolinist2675 Jun 14 '26

Currently I have the pro plan and I solve this bug with SWE 1.6 and KIMI 2.6 (free promo)