local-coder-mcp
Allows delegating bounded code implementation tasks to a locally running Ollama model, including health checks, code generation/editing, validation, retry, rollback, and diff reporting.
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., "@local-coder-mcpImplement the missing parseDate function in src/date.ts with the local model."
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.
local-coder-mcp
Global MCP bridge for keeping Claude focused on reasoning, architecture, sensitive decisions, and review while delegating bounded implementation and context preprocessing to local Ollama models.
Architecture
User task
|
+--> deterministic work --------------------------> normal tools
|
+--> prepare_local_context -----------------------> compact file:line capsule
| |
| v
+-------------------------------------------------- Claude decides
|
+-------------------+------------------+------------------+
| | |
normal local local-supervised Claude
| | |
| sensitive decision already |
| resolved by Claude |
| | |
+---------+---------+ |
| |
compact task / Claude-planned feature |
| |
Ollama edit -> validate -> retry |
| |
compact review capsule |
| |
full diff mandatory if supervised |
+---------------------> Claude final review <----+Related MCP server: Ollama MCP Server
v0.6 capabilities
The server exposes twelve MCP tools:
local_coder_healthclassify_local_code_taskdiscover_local_workspacesearch_local_workspaceprepare_local_contextdelegate_code_taskexecute_local_code_taskexecute_local_code_task_compactpreferredexecute_local_code_planexecute_local_code_plan_compactpreferredget_local_runlocal_coder_telemetry
Four routing classes
classify_local_code_task now returns one of:
deterministic— existing tooling is better than any LLM;local— bounded implementation with known approach;local-supervised— sensitive domain, but Claude already resolved the sensitive behavior and only bounded implementation remains;claude— reasoning, architecture, discovery, or risk is still unresolved.
The key v0.6 rule is:
classify the work that remains, not merely the domain touched.
Authentication, authorization, credentials, permissions, sessions, tokens, and secrets no longer automatically force all implementation into Claude.
Claude must first resolve the relevant sensitive behavior/contract. After that, a bounded implementation can be routed with:
{
"solutionKnown": true,
"validationKnown": true,
"sensitiveDecisionResolved": true,
"riskTags": ["auth", "credentials"]
}A local-supervised result means:
Claude decides sensitive behavior
↓
local model implements only that bounded decision
↓
validation/retry stays local
↓
full diff is mandatory
↓
Claude reviews before approvallocal-supervised does not allow the local model to redesign auth/security behavior.
Cryptography design, unresolved architecture/discovery, unknown-root-cause debugging, destructive migrations, production infrastructure, concurrency, and similar work remain Claude blockers.
Token Killer
Compact execution results
execute_local_code_task_compact and execute_local_code_plan_compact persist complete execution results under:
~/.local-coder-mcp/runs/<runId>/run.json
~/.local-coder-mcp/runs/<runId>/diff.patchClaude initially receives a compact result containing status, validation summary, routing/review metadata, changed-file counts, local token/latency data, and runId.
Use get_local_run with summary, diff, validation, or full only when needed. Results are paginated.
For local-supervised, the compact result explicitly requires Claude to fetch and review the full stored diff before approval.
Context capsules
prepare_local_context maintains a persistent local repository index under:
~/.local-coder-mcp/indexes/It ranks likely relevant files and returns bounded path:startLine-endLine evidence so Claude does not need to broadly read the repository before every task.
Review capsules
Compact execution returns deterministic review metadata including:
additions/deletions;
changed-file count;
risk level;
review targets;
validation state;
dependency/package signals;
export/suppression signals;
security/environment/migration/infra signals;
fullDiffRecommended.
Normal low-risk validated work can stay compact. Supervised-sensitive work always forces full-diff review.
Large-feature orchestration
For dashboards, modules, multi-screen features, or other broad implementation:
Claude understands requirements and architecture.
Claude resolves sensitive/product decisions.
Claude decomposes into bounded subtasks, normally 1–5 editable files each.
Normal subtasks route
local.Sensitive subtasks whose decisions are already resolved route
local-supervised.execute_local_code_plan_compactvalidates the dependency DAG and routing before editing.Tasks execute sequentially through the bounded local executor.
Each task validates and retries locally.
Final integration validation runs after all tasks succeed.
Failure rolls the whole feature back by default.
Any supervised subtask forces full aggregate-diff Claude review.
The local model never owns large-feature decomposition or sensitive design decisions.
Safety boundaries
absolute workspace required;
relative file paths only;
path traversal rejected;
symlink escapes rejected;
.git,node_modules,.ssh, and real.env*secrets blocked;.env.example,.env.sample, and.env.templateallowed;explicit editable-file allowlists;
bounded file/context sizes;
validation commands supplied by Claude, never invented by the local model;
validation runs with
shell: false;default executable allowlist:
npm,pnpm,yarn,bun;failed bounded tasks roll back by default;
failed plans roll back the full plan by default;
supervised-sensitive execution injects a constraint forbidding redesign of sensitive contracts.
Claude-side token saver
Install/update:
npm run install:claude-token-saverIt backs up ~/.claude/settings.json, enables deferred MCP Tool Search, caps MCP output, installs a PostToolUse hook that compacts only large successful validation output, and adds this user-level permission:
{
"permissions": {
"allow": ["mcp__local-coder__*"]
}
}The installer preserves existing permissions.allow, permissions.ask, and permissions.deny entries and is idempotent. Claude Code evaluates permission rules in deny -> ask -> allow order across settings scopes, so a matching project or managed ask/deny rule can still override the user-level local-coder allowlist. Use /permissions to identify the source if prompts continue.
It deliberately does not lower Claude thinking-token settings.
Global routing policy
Install/update:
npm run install:routingThis installs:
~/.claude/rules/local-coder.mdThe v0.6 rule explicitly teaches Claude that auth/security domain presence is not itself an implementation blocker: Claude resolves the sensitive decision first, then delegates the mechanical remainder as local-supervised with mandatory full-diff review.
Telemetry
Aggregate telemetry is stored locally at:
~/.local-coder-mcp/telemetry.jsonlIt records route/status/attempt/task/token/duration/count metadata, not prompts or source code. Classification telemetry distinguishes local-supervised from ordinary local work.
Requirements
Node.js 20+
Ollama running locally
qwen2.5-coder:14binstalled, or anotherLOCAL_CODER_MODELClaude Code Desktop / Code tab with local MCP support
Install / update
Existing clone:
git switch main
git pull
npm install
npm run check
npm run build
npm run install:routing
npm run install:claude-token-saverIf the MCP already points at the same dist/index.js, npm run install:claude is not required again.
For first setup:
npm run install:claude
npm run install:routing
npm run install:claude-token-saverFully quit and reopen Claude Code Desktop after changing user-level Claude configuration.
Test without Claude
npx @modelcontextprotocol/inspector \
"$(which node)" \
"$(pwd)/dist/index.js"Useful v0.6 classifier test:
{
"task": "Implement the already-decided credential removal behavior and update its tests.",
"solutionKnown": true,
"validationKnown": true,
"estimatedFiles": 3,
"riskTags": ["auth", "credentials"],
"sensitiveDecisionResolved": true
}Expected route:
local-supervisedThe same request without sensitiveDecisionResolved: true should remain in Claude.
Configuration
Variable | Default | Purpose |
|
| Ollama |
|
| local executor |
|
| model request timeout |
|
| validation timeout |
|
| per-file limit |
|
| local subtask context limit |
|
| validation executable allowlist |
|
| aggregate telemetry |
|
| telemetry path |
|
| lazy full run results |
|
| persistent context indexes |
Benchmark
LOCAL_CODER_MODEL=qwen2.5-coder:14b npm run benchmark -- benchmarks/my-real-tasks.jsonUse disposable worktrees.
Roadmap
MCP + Ollama bridge
bounded local executor
validation/retry/rollback
deterministic/local/Claude routing
local-supervisedsensitive execution routingmandatory full-diff supervised review
workspace discovery/search
multi-task transactional orchestrator
telemetry + benchmark harness
compact/lazy execution results
deterministic review capsules
persistent context index + file:line context capsules
compact global Claude rule
Claude-side MCP output/tool-search guardrails
local-coder MCP permission allowlist installer
successful validation-output compaction hook
benchmark candidate local models on the same real repository suite and choose the measured default
License
MIT
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 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 gradedqualityDmaintenanceA bridge that enables Claude Code to interact with local Ollama instances for text generation, multi-turn chat, and vision-based analysis. It supports model management tasks such as listing, pulling, and showing details, alongside generating text embeddings.488MIT
- AlicenseNot gradedqualityDmaintenanceExposes local Ollama instances as tools for Claude Code, allowing users to offload code generation, text drafting, and embedding tasks to local GPUs. It supports multi-turn conversations and model management through the Model Context Protocol.MIT
- 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
Related MCP Connectors
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Coding agents from Claude Code, Cursor and Codex claim jobs and lock files on one shared board.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
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/gustavolbs/local-coder-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server