zcode-worker-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZCODE_HOME | No | Override where ZCode's cli/db/db.sqlite and v2/tasks-index.sqlite live if customized. | |
| ZCODE_INSTALL_DIR | No | Override the ZCode desktop installation root if installed in a non-standard directory. | |
| ZCODE_DATA_BASE_DIR | No | Override where ZCode's cli/db/db.sqlite and v2/tasks-index.sqlite live if customized. | |
| ZCODE_WORKER_MCP_DATA_DIR | No | Override the state DB and worker log directory. Defaults to ~/.zcode-worker-mcp. | |
| ZCODE_WINDOWS_APP_INSTALL_DIR | No | Override the ZCode desktop installation root on Windows if installed in a non-standard directory. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
zcode-worker-mcp orchestrates local ZCode sessions with detached workers, per-task model selection, and unified observability across ZCode Desktop, CLI, and MCP. Built-in orchestration rules:
Dispatch & isolation: Only one active task may run per execution directory; specify distinct
worktree_pathvalues for concurrent tasks on one repository, and include explicitallowed_paths,forbidden_paths,acceptance_criteria, andtest_commands.Model selection: Call
zcode_modelswhen unsure of available providers,model_id, orreasoning_level. Passingmodelonzcode_start/zcode_continueapplies only to that session without overwriting workspace defaults.Default waiting (
waitnotification, zero polling tokens): Afterzcode_startorzcode_continue, prefer launchingzcode-worker-mcp wait <task_id> --timeout <sec>(optionally--notify) as a background shell command and ending your turn until notified, instead of loopingzcode_watch_session.Periodic inspection (opt-in or fallback): Use
zcode_watch_session(<=25s) andzcode_inspect_session(optionally via a lightweight watcher subagent or schedule) when periodic progress updates are desired or background shell execution is unavailable.Unified sessions & handoff: Query
zcode_list_sessionsandzcode_inspect_sessionby eithertask_idorsession_id(covering MCP, ZCode Desktop, and CLI). Passresume_session_idtozcode_startto attach directly to an existing Desktop/CLI session.Interactions, cancellation & verification: For
waiting_input, checkpending_interactionsand callzcode_replyonly within explicit user authorization (ask the user when uncertain), then resume waiting. Cancel safely withzcode_cancel. Aftercompleted, independently verify diffs/allowed paths and build/test commands before accepting the result.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| zcode_doctorA | Inspect local ZCode CLI/Desktop installation, SQLite stores, configured runtime availability, and live worker processes without leaking credentials. |
| zcode_modelsA | Probe local ZCode app-server for the current model selection and all available providers, model_id values, and reasoning levels (sanitized, no API keys). |
| zcode_startA | Dispatch a structured coding or analysis task to a detached ZCode worker that survives MCP restarts. Supports per-task model/provider/reasoning selection and optional resume_session_id. |
| zcode_continueB | Continue an existing task on its bound ZCode session_id with new feedback, optional updated requirements, or a different model/mode. |
| zcode_list_sessionsA | List sessions across zcode-worker-mcp, ZCode Desktop, and ZCode CLI with live runtime PID checks, model/mode info, todo counts, pagination, and latest assistant previews. |
| zcode_inspect_sessionA | Get real-time progress by task_id or session_id: effective state, live PID check, todos, recent tool calls, assistant messages, pending interactions, and final result/report. |
| zcode_watch_sessionA | Short-poll (<=25s) for periodic progress checks or environments without background commands. For zero-token completion wakeup, prefer running |
| zcode_replyB | Answer a waiting_input task's pending interaction (permission allow/deny, plan approval, or user input answers) so ZCode resumes. |
| zcode_cancelA | Terminate verified worker/app-server processes (strictly guarding against Windows PID reuse) and release the workspace lock. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools target distinct lifecycle actions (start, continue, reply, cancel), but zcode_list_sessions, zcode_inspect_session, and zcode_watch_session all touch session progress monitoring and could be confused. Descriptions clarify snapshot vs short-poll behavior, so the overlap is manageable.
All names use a uniform zcode_ prefix and snake_case, with mostly verb-led names like zcode_start and zcode_inspect_session. zcode_models and zcode_doctor are noun-style exceptions, but the overall pattern remains readable and predictable.
Nine tools is well-scoped for a worker orchestration server, and each maps to a clear lifecycle stage: discovery, start, continue, monitor, reply, and cancel. There is no obvious bloat.
The surface covers model discovery, environment diagnostics, task dispatch, continuation, monitoring, interaction replies, and cancellation, which is strong lifecycle coverage. Minor gaps include no explicit session deletion/cleanup operation and no standalone result-only endpoint, though zcode_inspect_session covers final results.