local-executor-mcp
Allows generation of Odoo module boilerplate including models, XML views, manifest, and security CSV files through delegated code generation.
Click on "Deploy 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-executor-mcp generate Odoo model fields for sale.order with name, date, total, status"
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-executor-mcp
An MCP server that lets a frontier planner (Claude Code) delegate mechanical
code-generation subtasks to a local LLM served by llama-swap, to save
frontier-model tokens.
Mental model: Claude Code plans and verifies; the local model does the high-volume, mechanical writing. The split saves tokens because the expensive part — generating large amounts of output — happens on a free local model.
Design choices (and why)
Generation-only, stateless. The server never writes files and never runs tests. Claude Code keeps its native file + bash tools for that. This keeps the server portable (no repo coupling, no Windows path pain) and trivial to share.
Compact output. The tool returns just the generated artifact plus a short usage footer. (Claude Code warns when an MCP tool output exceeds ~10k tokens, and re-reading huge blobs would eat the token savings.)
Model routing built in. A
tierargument routes between aqualitymodel and afastmodel.Fallback is explicit. On failure the tool returns
DELEGATION_FAILEDand tells the planner to do the task itself — so a weak local result never blocks you. This is your guardrail against compounding errors.Metrics. Every call is appended to
~/.local-executor-mcp/usage.jsonl(model, tokens, latency, ok/fail) so you can quantify savings later.
Related MCP server: mcp-local-llm
Model recommendations (from a typical llama-swap list)
Use | Model | Why |
|
| 35B MoE, ~3B active → fast and capable, high-fidelity quant |
|
| small, quick, for trivial / high-volume tasks |
A/B alternative for |
| if code-tuned, may beat Qwen — measure it |
Avoid for code: translation models (hy-mt2-*, tower-plus), the vision model
(minicpm-v), and ultra-low quants (iq2_xxs / iq3_xxs).
Build
Requires Node.js 18+.
npm install
npm run buildQuick test (no Claude Code needed)
Confirm the server starts and your backend is reachable:
LOCAL_LLM_BASE_URL=http://10.0.0.42:8080/v1 npx @modelcontextprotocol/inspector node build/index.jsIn the Inspector UI, call list_local_models first, then try delegate_code.
Use it from Claude Code
Solo (personal)
claude mcp add local-executor \
--env LOCAL_LLM_BASE_URL=http://10.0.0.42:8080/v1 \
--env LOCAL_LLM_MODEL_QUALITY=qwen3.6-35b-a3b-q8_0 \
--env LOCAL_LLM_MODEL_FAST=qwen3.5-4b-q8_0 \
-- node /absolute/path/to/local-executor-mcp/build/index.jsRestart your Claude Code session so the tools are discovered.
Team rollout (the point of this project)
Use project scope so the config is checked into git and every teammate gets
it automatically. Copy .mcp.json.example to .mcp.json at the repo root and
commit it. The first time each teammate opens the repo, Claude Code asks them to
approve the server (workspace trust), then it just works.
.mcp.json.example— assumes the package is published to npm and runs vianpx. Lowest friction; teammates need nothing installed..mcp.json.vendored.example— no publishing: drop the built server intools/local-executor-mcp/inside the repo and pointnodeat it.
The backend URL uses ${LOCAL_LLM_BASE_URL:-...default...} expansion, so each
machine can override it via an environment variable without editing the file.
Windows notes
Node +
npxwork fine on Windows for stdio servers like this one.If a teammate hits issues with
npx, pre-install once (npm i -g @yourorg/local-executor-mcp) and set"command": "local-executor-mcp".Nothing here touches the filesystem, so there are no path-separator issues.
How to actually drive it (prompt Claude Code like this)
"Plan the module. For the boilerplate parts — the Odoo model fields, the XML views, and the security CSV — use the
delegate_codetool with a precise spec and the relevant context, then review what comes back and run the tests."
Good delegation targets: boilerplate, scaffolding, CRUD, test stubs, format
conversions, Odoo models/views/manifest/ir.model.access.csv, bulk
rule-based edits. Keep logic, debugging, and security-sensitive code on Claude.
Inspect your savings
cat ~/.local-executor-mcp/usage.jsonlEach line records the model, token counts, latency and success. Aggregate it to get "X tokens / Y% of a representative workload handled locally at Z% fallback rate" — a quantified, defensible impact claim.
Available Tools
2 toolsdelegate_codeA
Delegate a self-contained, mechanical code-generation subtask to a local LLM to save frontier-model tokens. GOOD for: boilerplate, scaffolding, repetitive CRUD, test stubs, format/data transformations, bulk edits with a clear rule, Odoo models/views/manifests. NOT for: subtle logic, debugging, cross-file reasoning, or security-sensitive code (do those yourself). Provide a precise spec plus any context the worker needs; it returns ONLY the generated artifact. You, the planner, verify and integrate it.
Inputs: task (required), tier, context, language.
list_local_modelsA
List the model IDs currently available on the local llama-swap endpoint. Use it to pick a model or to confirm the backend is reachable.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: delegate_code handles code generation subtasks, while list_local_models checks available models. There is zero overlap or ambiguity.
Both tool names follow a clean verb_noun pattern (delegate_code, list_local_models), using snake_case consistently. The naming is predictable and easy to understand.
With only 2 tools, the server feels minimal. However, the narrow scope of 'local execution' justifies a small surface; it is borderline but not excessive.
For its stated purpose, the server covers the core delegation flow and model discovery. A status or cancel tool would be a minor enhancement, but no critical gaps exist.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server for generating rough-draft project plans from natural-language prompts.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Hosted YouTube MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityCmaintenanceA local MCP server that lets Claude delegate scoped work to Codex with structured results and guardrails, supporting planning, code review, build, reverse engineering, and long-running background tasks.1144 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceMCP server that lets Claude Code delegate mechanical tasks to a local LLM for summarization, classification, extraction, and drafting.19 npm15MIT
- AlicenseAqualityDmaintenanceMCP server bridging Claude Code to local llama.cpp. Run local LLMs alongside Claude for experimentation, testing, and cost-effective inference.1913 npm1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that offloads light LLM work from Claude to a model you control, such as a local LLM or any OpenAI-compatible provider, saving frontier-model quota on non-critical tasks.1MIT