Skip to main content
Glama

Z-Code MCP

MCP (Model Context Protocol) server for orchestrating multiple Claude Code sessions with HEAD/SUB coordination pattern.

Overview

Z-Code MCP enables complex, multi-task coding projects by coordinating multiple Claude Code CLI sessions:

  • HEAD Phase: Analyzes objectives and creates execution plans

  • SUB Phase: Executes tasks in parallel with controlled concurrency

  • Aggregation Phase: Combines results and generates summaries

Related MCP server: Orchestrator MCP Server

Installation

npx z-code-mcp

For always getting the latest version:

npx z-code-mcp@latest

Global Installation

npm install -g z-code-mcp

Claude Desktop / Claude Code Configuration

Add to your Claude configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "z-code-mcp": {
      "command": "npx",
      "args": ["-y", "z-code-mcp@latest"]
    }
  }
}

Local Development Configuration

For testing local changes without publishing:

{
  "mcpServers": {
    "z-code-mcp-dev": {
      "command": "node",
      "args": ["C:/path/to/z-code-mcp/build/index.js"]
    }
  }
}

Environment Variables

Variable

Description

Default

Z_MCP_CLAUDE_COMMAND

Claude CLI command

claude

Z_MCP_MAX_CONCURRENT

Max concurrent processes (1-10)

3

Z_MCP_TEMP_DIR

Temp directory for outputs

System temp

Z_MCP_KEEP_TEMP

Keep temp files on error

false

Z_MCP_TEMPLATE_DIR

Custom templates directory

Built-in

Z_MCP_LOG_LEVEL

Log level (debug/info/warn/error)

info

Available Task Templates

Template

Description

code_analysis

Analyze existing code structure and patterns

code_generation

Generate new code based on specifications

test_writing

Write tests for existing code

documentation

Create documentation

security_review

Security analysis and vulnerability detection

refactoring

Code improvements and refactoring

custom

Use custom template

Usage Example

Once configured, the MCP exposes an orchestrate tool:

{
  "objective": "Implement user authentication feature",
  "workingDirectory": "/path/to/project",
  "tasks": [
    {
      "id": "analyze",
      "type": "code_analysis",
      "description": "Analyze current auth implementation"
    },
    {
      "id": "implement",
      "type": "code_generation",
      "description": "Implement JWT authentication",
      "dependencies": ["analyze"]
    },
    {
      "id": "test",
      "type": "test_writing",
      "description": "Write auth tests",
      "dependencies": ["implement"]
    }
  ],
  "coordination": {
    "strategy": "dependency-based",
    "maxConcurrent": 3
  }
}

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Run MCP Inspector
npm run inspector

Auto-Update Behavior

  • npx caches packages: Use npx z-code-mcp@latest to force latest version

  • Local development: Use direct path reference for immediate updates after build

License

MIT

Available Tools

1 tool
orchestrateB

Orchestrate multiple Claude Code sessions with HEAD/SUB coordination. HEAD analyzes the objective, creates an execution plan, spawns SUB processes to handle individual tasks, and aggregates results.

ParametersJSON Schema
NameRequiredDescriptionDefault
tasksYesList of tasks to execute
objectiveYesHigh-level objective for the orchestration
coordinationNoCoordination settings
resourceLimitsNoResource limits
workingDirectoryYesBase directory for all operations

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden for behavioral disclosure. While it mentions the HEAD/SUB pattern and task handling, it does not explain important aspects such as error handling, recovery strategies, authentication requirements, resource cleanup, or side effects. The description provides a high-level overview without sufficient depth for an agent to anticipate behavior beyond the basic workflow.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two well-structured sentences. The first sentence introduces the core functionality and the HEAD/SUB concept, while the second elaborates on the workflow. Every sentence contributes meaningfully, and there is no redundancy or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (nested parameters, coordination strategies, resource limits) and the absence of an output schema, the description is too high-level. It does not cover return value structure, failure modes, aggregation details, or how task dependencies are handled. The agent lacks sufficient context to understand the full orchestration lifecycle, which is a significant gap for such a nuanced tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal context beyond the schema; it does not explain how the parameters (e.g., tasks, coordination strategy) affect the HEAD/SUB orchestration or the execution plan. The description's value beyond the schema is limited, but the schema itself is thorough.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool orchestrates Claude Code sessions with HEAD/SUB coordination, explaining the high-level workflow of analyzing objectives, creating execution plans, spawning SUB processes, and aggregating results. The verb 'orchestrate' and resource 'multiple Claude Code sessions' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. The description implies usage for tasks requiring multi-session coordination but does not specify prerequisites, alternatives, or conditions for deferring. Since there are no sibling tools, the lack of explicit guidelines is less critical but still a missed opportunity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.1
    • First observedorchestrate

TDQS

A3.5/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion between tools. The tool's purpose is clearly defined.

Naming Consistency5/5

Single tool named with a verb ('orchestrate'), consistent with a command-style action. No pattern inconsistency possible.

Tool Count3/5

A single tool for a server that coordinates multiple sessions is borderline thin. While the tool itself is non-trivial, the server would benefit from additional tools for session management, making the count slightly low for its apparent scope.

Completeness2/5

The tool set is severely incomplete. The server's purpose implies managing multiple Claude Code sessions, but there are no tools for creating, listing, monitoring, or terminating sessions—only a single orchestration tool that attempts to handle everything.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/Zeliper/z-code-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server