Model Worker MCP
Integrates with OpenAI-compatible /chat/completions endpoints to delegate coding tasks to language models and retrieve validated unified diffs.
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., "@Model Worker MCP fix the bug in src/utils.js in C:\dev\app and run npm test"
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.
Model Worker MCP
本機、受限範圍的 coding worker MCP。它只接受明確的 cwd、read_paths、write_paths,將 provider 回傳的 unified diff 在套用前驗證,並可執行指定驗證命令。
設定
在使用者環境變數設定
MODEL_WORKER_API_KEY,或執行npm run credentials:set -- worker-primary(Windows DPAPI 加密儲存)。設定
MODEL_WORKER_BASE_URL(任何 OpenAI-compatible/chat/completionsendpoint,預設為阿里雲百煉https://dashscope.aliyuncs.com/compatible-mode/v1;若使用百煉專屬 workspace,改成自己的 workspace endpoint)與MODEL_WORKER_MODEL。預設主力是qwen3.7-plus;單檔小修改可切換為qwen3.6-flash。deepseek-flash-0731會自動用於中低風險程式邏輯、bug 修復、測試與後端小功能,也支援手動指定。模型名稱與價格表在worker/router.js、worker/usage-store.js,換 provider 時一併調整。.mcp.json以相對路徑啟動server/server.js;若你的 MCP client 不支援cwd,把args改成此目錄的絕對路徑。
需求:Node.js 18 以上、Git(diff 以 git apply 套用,cwd 必須是 Git repository);驗證命令與 credential 加密目前透過 Windows PowerShell 執行。
Related MCP server: ForgeGuard MCP
本機測試
node server/server.jsMCP 工具:route_code_task、delegate_code_task、get_task_status、cancel_task、get_usage_summary。優先呼叫 route_code_task:CSS/文案/文件等低複雜度任務走 qwen3.6-flash;中低風險程式邏輯、bug 修復、測試與後端小功能走 deepseek-flash-0731;一般或跨檔 coding 走 qwen3.7-plus;審查走 glm-5.2。涉及 auth、payment、secret、migration、database、部署或正式環境時只回傳 guarded,不會自動委派。每個任務的 token、估算費用與失敗錯誤摘要會持久化到 %LOCALAPPDATA%\CodexModelWorker\usage.json,可用 get_usage_summary 查詢。DeepSeek 價格尚未填入,因此其費用會標為未知,不會猜算。錯誤內容會遮罩 Bearer 與 sk- 字串,API key 不會出現在設定檔、任務參數、diff 或 log 中。
License
Available Tools
5 toolscancel_taskC
Cancel a running delegated task.
Inputs: task_id (required).
delegate_code_taskC
Run a bounded coding task through the configured provider.
Inputs: cwd (required), task (required), read_paths (required), write_paths (required), +4 more.
get_task_statusB
Get status, diff and validation output for a delegated task.
Inputs: task_id (required).
get_usage_summaryA
Get persisted token usage and estimated CNY cost, optionally filtered by model or time range.
Inputs: model, since, until.
route_code_taskC
Classify a coding task by risk and automatically delegate safe work to the discounted model tier.
Inputs: cwd (required), task (required), read_paths (required), write_paths (required), +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
route_code_task and delegate_code_task both initiate delegated coding work, which could cause some initial confusion, but the descriptions clarify that one performs risk classification and auto-routing while the other directly runs a bounded task. The remaining tools (status, cancel, usage) are clearly distinct.
Most tools follow a verb_noun pattern (route_code_task, delegate_code_task, get_task_status, get_usage_summary), but cancel_task breaks the pattern by omitting the 'code' qualifier used by the delegation tools. The set is still readable and predictable overall.
Five tools is well-scoped for a task delegation worker: routing, execution, status, cancellation, and usage reporting. Each tool clearly earns its place with no redundancy.
The core lifecycle is covered: initiate/route, run, check status, cancel, and inspect usage. Minor gaps exist, such as no list/history operation to enumerate past tasks or a retry/resume capability, but these are workable around.
Maintenance
Related MCP Connectors
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Supervised API-write gateway for AI agents with policy, human approval and execution receipts.
Lets coding agents check their own code for leaked secrets, risky dependencies and AI-code mistakes
Guardian agent for AI coding: four frontier models review risky diffs and commits before they ship.
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables coding agents to perform workspace-confined file operations, read-only Git inspection, and structured shell commands, while requiring out-of-band human approval for mutations and external executions and maintaining an audit trail.143-
- AlicenseAqualityBmaintenanceEnables coding agents to safely inspect and modify project files within explicitly allowed workspace roots, with controls for file operations, git status/diff, and optionally allowlisted command execution.11Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables delegating coding tasks to sandboxed agents, returning changes as auditable diffs for human review before applying or discarding them.1MIT
- AlicenseNot gradedqualityFmaintenanceEnables a primary coding agent to delegate bounded implementation and repair tasks to a local OpenAI-compatible model that edits a copy of the project, runs configured checks, and returns artifacts for review. Exposes stdio tools for capability discovery, task submission, progress polling, artifact reading, and cancellation.MIT