Skip to main content
Glama
zcode-worker-mcp
by Hope-08

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ZCODE_HOMENoOverride where ZCode's cli/db/db.sqlite and v2/tasks-index.sqlite live if customized.
ZCODE_INSTALL_DIRNoOverride the ZCode desktop installation root if installed in a non-standard directory.
ZCODE_DATA_BASE_DIRNoOverride where ZCode's cli/db/db.sqlite and v2/tasks-index.sqlite live if customized.
ZCODE_WORKER_MCP_DATA_DIRNoOverride the state DB and worker log directory. Defaults to ~/.zcode-worker-mcp.
ZCODE_WINDOWS_APP_INSTALL_DIRNoOverride 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:

  1. Dispatch & isolation: Only one active task may run per execution directory; specify distinct worktree_path values for concurrent tasks on one repository, and include explicit allowed_paths, forbidden_paths, acceptance_criteria, and test_commands.

  2. Model selection: Call zcode_models when unsure of available providers, model_id, or reasoning_level. Passing model on zcode_start/zcode_continue applies only to that session without overwriting workspace defaults.

  3. Default waiting (wait notification, zero polling tokens): After zcode_start or zcode_continue, prefer launching zcode-worker-mcp wait <task_id> --timeout <sec> (optionally --notify) as a background shell command and ending your turn until notified, instead of looping zcode_watch_session.

  4. Periodic inspection (opt-in or fallback): Use zcode_watch_session (<=25s) and zcode_inspect_session (optionally via a lightweight watcher subagent or schedule) when periodic progress updates are desired or background shell execution is unavailable.

  5. Unified sessions & handoff: Query zcode_list_sessions and zcode_inspect_session by either task_id or session_id (covering MCP, ZCode Desktop, and CLI). Pass resume_session_id to zcode_start to attach directly to an existing Desktop/CLI session.

  6. Interactions, cancellation & verification: For waiting_input, check pending_interactions and call zcode_reply only within explicit user authorization (ask the user when uncertain), then resume waiting. Cancel safely with zcode_cancel. After completed, 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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-worker-mcp wait <task_id> in background.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 9 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues