claude-delegate-local-mcp

claude-delegate-local-mcp

Enables Claude Code to hand off bulk, mechanical, read-heavy tasks to a local model, including agentic loops that can read, write, and run commands sandboxed at zero cloud token cost.

Category
Visit Server

README

<!-- BUDGET: 160 -->

claude-delegate-local-mcp

An MCP server that lets Claude Code hand work to a local model you host yourself.

Bulk, mechanical, read-heavy work — reading a subsystem, writing tests, mechanical refactors, first-pass review — costs cloud tokens even when the reasoning required is modest. This moves that class of work onto your own hardware, where it is effectively free, and keeps Claude for the parts that need it.

Status: early. Configuration, the model registry and the documentation tooling are in place and tested. The delegation tools themselves are not built yet. See STATUS.md for where things actually stand and PLAN.md for the route.

How it works

Two shapes of delegation, and the second is the interesting one:

  • One-shot — file contents are read server-side and inlined into a single prompt. The model answers; the bytes never enter Claude's context. Good for review, summary, explanation.
  • Agentic — the local model gets its own read_file, write_file and run_bash, and iterates. It writes code, runs your test suite, reads the real failure, fixes it, and runs again — for as many turns as it needs, at zero cloud token cost — then hands back a result for Claude to review.

That second loop is why the shell exists, and why run_bash is confined by bubblewrap in an empty-root sandbox with the network off by default. If bubblewrap is unavailable the server refuses to run shell commands rather than running them unconfined.

The server also captures real process exit codes itself and reports them separately from whatever the model claims in its answer. Models misreport command outcomes; the whole self-verification idea collapses without a ground truth.

What it is not

  • Not a cloud router. One backend format ships — OpenAI-compatible. Anthropic-compatible endpoints are a planned addition behind an existing seam, not a current feature.
  • Not a way to run Claude Code against a different model. It delegates tasks; Claude Code stays Claude Code.
  • Not a sandbox for untrusted code. It confines a model you chose to run against a workspace you chose to expose.

Requirements

  • A local OpenAI-compatible endpoint (this was built against vLLM serving DeepSeek V4 Flash on two DGX-Spark-class machines, but nothing depends on that specific stack).
  • Python 3.11+.
  • Linux, or WSL2 on Windows — bubblewrap is Linux-only and there is no cheap Windows equivalent, so the server runs there even when Claude Code does not.

Install

git clone https://github.com/ComputerSaysNull/claude-delegate-local-mcp
cd claude-delegate-local-mcp

cp .env.example .env                  # then set DELEGATE_WORKSPACE_ROOTS
cp models.toml.example models.toml    # then set your endpoint

python -m venv .venv && .venv/bin/pip install -e ".[dev]"
python scripts/install_hooks.py       # optional, gives the gate at commit time

.env and models.toml are gitignored, deliberately: they name a host, and a hostname identifies your machine as surely as an address does.

On Windows, with the server in WSL2

wsl --install -d Ubuntu-24.04

Then inside Ubuntu — and verify rather than assume, because two of these fail silently:

sudo apt install -y bubblewrap python3 python3-venv git
bwrap --unshare-all --ro-bind /usr /usr --ro-bind /etc /etc --proc /proc \
      --dev /dev --tmpfs /tmp --symlink usr/bin /bin --symlink usr/lib /lib \
      --symlink usr/lib64 /lib64 -- /bin/echo ok      # must print: ok
getent hosts YOUR-HEAD-NODE                           # must resolve in WSL, not just Windows

The usr/lib64 symlink is not optional on x86-64: without it nothing dynamically linked runs, and the error blames the executable rather than the missing loader.

Register with Claude Code

Native Linux:

{ "mcpServers": { "delegate-local": {
    "command": "claude-delegate-local-mcp",
    "timeout": 900000
} } }

Windows, server in WSL2:

{ "mcpServers": { "delegate-local": {
    "command": "wsl.exe",
    "args": ["-d", "Ubuntu-24.04", "-e", "claude-delegate-local-mcp"],
    "timeout": 900000
} } }

timeout is milliseconds. The wall-clock default is generous, but a long delegation can trip the separate 30-minute stdio idle timeout — the server emits progress notifications each turn to keep that from firing. See docs/TROUBLESHOOTING.md.

Documentation

docs/ARCHITECTURE.md How the pieces fit, and why
docs/CONFIGURATION.md Every setting (generated)
docs/MODELS.md The registry, and adding a model
docs/AGENTS.md Agent files, and the path policy
docs/TROUBLESHOOTING.md Symptom to cause to fix
DECISIONS.md Numbered decisions, newest first
JOURNAL.md What took real work to figure out
CONTRIBUTING.md Setup and conventions

No configuration default is stated anywhere but docs/CONFIGURATION.md, which is generated from the code that defines it. If you find one repeated elsewhere, that is a bug — CLAUDE.md explains the scheme.

Provenance and licence

MIT. A derivative work, not an independent implementation: substantial code was ported from fegone/claude-code-delegate-local and its mixicz fork, both MIT. The server-side context-prefetch idea comes from fjgbue/claude-delegator-deepseek-mcp. NOTICE records what came from where, feature by feature.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured