Docker MCP Toolkit

Code Pathfinder is available on the Docker MCP Catalog — a curated collection of verified MCP servers that run as isolated Docker containers. Install it with one click from Docker Desktop, and it works with every MCP-compatible AI assistant: Claude Code, Cursor, VS Code, Gemini, Codex, Goose, Zed, and more.

No binary installation, no dependency management, no PATH configuration. Docker handles everything.

Prerequisites

  • Docker Desktop 4.48 or later
  • MCP Toolkit enabled in Docker Desktop (Settings → Beta features → Enable Docker MCP Toolkit)

Setup

The easiest way is through the Docker Desktop UI: open MCP Toolkit → Catalog, search for Code Pathfinder, add it to a profile, configure the project path, and connect your AI client from the Clients tab.

For CLI setup, follow the steps below. The commands differ slightly depending on your Docker Desktop version.

Step 1: Enable the server

Docker Desktop 4.62+ (profile-based CLI):

docker mcp profile server add my-profile \
  --server catalog://mcp/docker-mcp-catalog/code-pathfinder

Docker Desktop 4.48–4.61:

docker mcp server enable code-pathfinder

Step 2: Configure your project path

Code Pathfinder needs to know which project directory to analyze.

Docker Desktop 4.62+:

docker mcp profile config my-profile \
  --set code-pathfinder.path=/absolute/path/to/your/project

Docker Desktop 4.48–4.61:

cat > ~/.docker/mcp/config.yaml << EOF
code-pathfinder:
  path: /absolute/path/to/your/project
EOF

Step 3: Connect your AI assistant

From the Clients tab in Docker Desktop MCP Toolkit, click Connect next to your AI assistant. Or use the CLI:

Docker Desktop 4.62+:

docker mcp client connect claude-code --profile my-profile
docker mcp client connect cursor --profile my-profile
docker mcp client connect vscode --profile my-profile
docker mcp client connect gemini --profile my-profile

Docker Desktop 4.48–4.61:

docker mcp client connect claude-code
docker mcp client connect cursor
docker mcp client connect vscode
docker mcp client connect gemini

This creates an MCP_DOCKER entry in your assistant's MCP configuration that routes all tool calls through the Docker MCP Gateway.

Supported clients: claude-code, claude-desktop, cline, codex, continue, cursor, gemini, goose, kiro, lmstudio, opencode, sema4, vscode, zed.

Step 4: Verify the connection

Claude Code:

claude mcp list
# Should show: MCP_DOCKER: docker mcp gateway run - ✓ Connected

Gemini:

gemini mcp list
# Should show: ✓ MCP_DOCKER: docker mcp gateway run (stdio) - Connected

Codex:

codex mcp list
# Should show: MCP_DOCKER with "enabled" status

Available Tools

Code Pathfinder exposes 12 MCP tools through Docker MCP Toolkit:

Code Intelligence (8 tools)

ToolDescription
get_index_infoCodebase statistics — symbols, modules, call edges, files. Use first.
find_symbolSearch functions, classes, methods by name/type/module. Partial matching.
find_moduleSearch Python modules by name. Returns file path and symbol counts.
list_modulesList all Python modules in the indexed project.
get_callersReverse call graph — who calls this function?
get_calleesForward call graph — what does this function call?
get_call_detailsDetailed call site info between two specific functions.
resolve_importResolve Python import paths to file locations.

Docker Analysis (4 tools)

ToolDescription
find_dockerfile_instructionsSearch Dockerfile instructions with semantic filters (base image, ports, digest pinning).
find_compose_servicesSearch docker-compose services (privileged mode, volumes, ports).
get_dockerfile_detailsFull Dockerfile breakdown with multi-stage build analysis.
get_docker_dependenciesDependency graph for compose services and Dockerfile stages.

Supported Languages

  • Python — Full call graph, type inference, stdlib/third-party resolution
  • Java — Method invocations, class hierarchy, annotations
  • Go — Function declarations, struct methods, stdlib metadata
  • Dockerfile — Instruction parsing, multi-stage analysis, base image tracking
  • docker-compose — Service configuration, dependency mapping

Example Prompts

Once connected, try these in your AI assistant. Each prompt maps to a specific Code Pathfinder tool:

  1. Use get_index_info to show me the codebase stats
  2. Use find_symbol to find all class definitions in the project
  3. Use get_callers to show who calls the process_payment function
  4. Use get_callees to show what the login_endpoint function depends on
  5. Use find_symbol to list all methods in the auth module
  6. Use find_dockerfile_instructions to find all Dockerfiles with unpinned base images
  7. Use find_compose_services to show docker-compose services running in privileged mode
  8. Use get_dockerfile_details to analyze the main Dockerfile

How It Works

When you invoke a tool, the Docker MCP Gateway:

  1. Starts the Code Pathfinder container with your project directory mounted at /project
  2. The server indexes your codebase (typically 5-30 seconds depending on size)
  3. Tool calls are routed over stdio (JSON-RPC 2.0) to the running container
  4. Results are returned to your AI assistant

The container runs as a non-root user with restricted privileges. Network access is limited to:

  • assets.codepathfinder.dev — type registry data (stdlib and third-party library signatures for better type inference)
  • us.i.posthog.com — anonymous usage analytics (can be disabled)

Switching Projects

To analyze a different project, update the config:

cat > ~/.docker/mcp/config.yaml << EOF
code-pathfinder:
  path: /path/to/different/project
EOF

The next tool call will start a fresh container indexing the new project.

Manual Docker Usage

If you prefer to run the container directly without Docker Desktop MCP Toolkit:

# Add to Claude Code
claude mcp add -s user code-pathfinder \
  -- docker run -i --rm \
  -v /path/to/your/project:/project \
  mcp/code-pathfinder:latest

# Verify
claude mcp list

Or add to any MCP client's JSON config:

{
  "mcpServers": {
"code-pathfinder": {
  "command": "docker",
  "args": [
    "run",
    "-i",
    "--rm",
    "-v",
    "/path/to/your/project:/project",
    "mcp/code-pathfinder:latest"
  ]
}
  }
}

Disabling Analytics

Code Pathfinder collects anonymous usage analytics (tool call counts, indexing time, language stats) to improve the product. No code, file paths, or personally identifiable information is ever sent.

To disable analytics when using Docker MCP Toolkit, run the container with the --disable-metrics flag. For manual Docker usage:

claude mcp add -s user code-pathfinder \
  -- docker run -i --rm \
  -v /path/to/your/project:/project \
  mcp/code-pathfinder:latest --disable-metrics

For the JSON config approach, append "--disable-metrics" to the args array:

{
  "mcpServers": {
"code-pathfinder": {
  "command": "docker",
  "args": [
    "run",
    "-i",
    "--rm",
    "-v",
    "/path/to/your/project:/project",
    "mcp/code-pathfinder:latest",
    "--disable-metrics"
  ]
}
  }
}

Troubleshooting

Tools not showing up

Make sure the server is enabled and configured:

# Docker Desktop 4.62+
docker mcp profile server ls --filter profile=my-profile

# Docker Desktop 4.48–4.61
docker mcp server ls          # Should show code-pathfinder
docker mcp tools ls           # Should list 12 Code Pathfinder tools

"Indexing" response on first call

This is normal. The server indexes your codebase in the background when the container starts. Small projects take 10-30 seconds, larger codebases may take a few minutes. Subsequent calls are instant once indexing completes.

Permission errors on mounted volume

The container runs as a non-root user. Ensure the project directory is readable:

ls -la /path/to/your/project  # Check permissions