claude-delegate-local-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-delegate-local-mcpHave the local agent read src/ and summarize what each module does."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
See PLAN.md for what is open, and archive/PLAN-milestones.md for the roadmap that closed.
How it works
Two shapes of delegation, and the second is the interesting one:
One-shot — the server reads the files you name and answers from them in a single prompt, so their contents never reach your context. Good for review, summary and explanation.
delegate_readonly()is this shape guaranteed rather than chosen, which is what lets a caller run it where a write would not be allowed.Agentic — the local model gets its own tools and iterates: write, run the tests, read the real failure, try again, at no cloud token cost, then hand back a result for Claude to review.
That second loop is why a shell exists, why it is confined by bubblewrap, and why it is refused outright rather than run unconfined when bubblewrap is missing. The server also captures process exit codes itself rather than believing the model's account of them, which is what makes the loop's self-verification worth anything.
How each of those works is docs/ARCHITECTURE.md and docs/DISPATCH.md; this file names them and links, and deliberately does not restate them.
Related MCP server: cctx
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 —
bubblewrapis 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 timeOn Windows plus WSL2 the two interpreters cannot share .venv: a Linux python -m venv .venv overwrites a Windows one in place, and it reads as a corrupted install rather than a
collision. Put the WSL one elsewhere, on the native filesystem rather than /mnt/c where
creating it is ~27x slower (ADR-0020) — python3 -m venv ~/.venvs/delegate, then
~/.venvs/delegate/bin/pip install -e /mnt/c/path/to/the/repo. That is the runtime
only; CONTRIBUTING.md adds [dev] to the same venv for tests.
.env is read by config.load() as a fallback: anything already set in the environment
wins, so an explicit override still works. Point DELEGATE_ENV_FILE at another file to use
one elsewhere — if it names a file that does not exist, that is an error rather than a
silent fall back to defaults. ADR-0027 for why the server reads the file itself instead of
taking an env key from your MCP client's configuration.
.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.04Then 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 WindowsThe 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",
"--cd", "C:\path\to\claude-delegate-local-mcp",
"-e", "/home/YOU/.venvs/delegate/bin/claude-delegate-local-mcp"],
"timeout": 900000
} } }--cd and the script's absolute path are both load-bearing: without them the server starts
in the wrong directory or is not found at all, and neither failure names its own cause —
TROUBLESHOOTING has both symptoms. Give --cd the
Windows form of the path; /mnt/c/... is rejected.
timeout is milliseconds and the wall-clock default is generous. The per-turn progress
notification holds off the separate stdio idle timeout but does not extend the wall clock.
Documentation
How the pieces fit, and why | |
What is sent to a model, and what comes back | |
Every setting (generated) | |
The registry, and adding a model | |
Agent files, and the path policy | |
Symptom to cause to fix | |
Numbered decisions, newest first | |
What took real work to figure out | |
Setup and conventions |
No configuration default is stated anywhere but src/claude_delegate_local/config.py,
which is where they live; docs/CONFIGURATION.md is generated from it and is a rendering,
never a source to edit. 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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Your AI Agent's Infrastructure Layer. Connect Claude, Copilot, Codex, or ChatGPT to 200+ managed open source services. Start databases, pipelines, and applications through natural language.
Build and supervise fleets of agents from Claude Code, Codex or Cursor. Connects over OAuth.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to delegate coding tasks to local Ollama models, reducing API token usage by up to 98.75% while leveraging local compute resources. Supports code generation, review, refactoring, and file analysis with Claude providing oversight and quality assurance.48824AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to reduce token usage by 70-90% using a local LLM for codebase indexing, tool output compression, and turn summarization.243MIT
- AlicenseBqualityCmaintenanceEnables coding agents like Claude Code and Codex to offload boilerplate generation, summarization, and other bounded text tasks to local or cheap cloud LLMs, keeping the frontier agent in charge of judgment and code edits.93MIT
- AlicenseAqualityCmaintenanceEnables Claude Code to offload routine code generation and text processing tasks to a local Ollama LLM, saving Cloud API tokens and costs with automatic model selection and security features.11774Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ComputerSaysNull/claude-delegate-local-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server