Skip to content

Latest commit

 

History

History
104 lines (79 loc) · 1.46 KB

File metadata and controls

104 lines (79 loc) · 1.46 KB

diffctx MCP Server

Installation

pip install diffctx[mcp]

Client Configuration

Claude Code

Add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "diffctx": {
      "command": "diffctx-mcp"
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "diffctx": {
      "command": "diffctx-mcp"
    }
  }
}

Continue

Add to ~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "diffctx-mcp"
        }
      }
    ]
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "diffctx": {
      "command": "diffctx-mcp"
    }
  }
}

Zed

Add to ~/.config/zed/settings.json:

{
  "context_servers": {
    "diffctx": {
      "command": {
        "path": "diffctx-mcp"
      }
    }
  }
}

Environment Variables

  • DIFFCTX_ALLOWED_PATHS — colon-separated list of directories the server is allowed to access. When set, requests for repositories outside these paths are rejected.

Available Tools

get_diff_context

Returns the most relevant code fragments for understanding a git diff.

Parameters:

  • repo_path (string, required) — absolute path to a git repository
  • diff_range (string, default "HEAD~1..HEAD") — git diff range
  • budget_tokens (integer, default 8000) — token budget for context selection