MCP Server

An MCP server embedded in the TUI. Any MCP-compatible client can observe and steer your agent fleet.

What It Enables

The MCP server exposes every initech primitive as an MCP tool over HTTP. This means any MCP-compatible client can:

Use cases: drive your agent fleet from a separate Claude Code session, connect Cursor or VS Code Copilot to your running initech instance, build custom orchestration on top of the MCP API, or coordinate agents from CI/CD pipelines.

Configuration

Add MCP fields to your initech.yaml:

mcp_port: 9200           # Enable on port 9200 (omit to disable)
mcp_token: your-token    # Bearer token (auto-generated if omitted)
mcp_bind: 0.0.0.0       # Bind address (default: 0.0.0.0)

When the TUI starts, the MCP server starts alongside it. The banner prints the connection details:

MCP: http://192.168.1.100:9200/mcp (token: a3f2dd8e...)

If you omit mcp_token, a random 32-byte token is generated on each startup. For a stable token across restarts, set mcp_token in the config or use the INITECH_MCP_TOKEN environment variable.

Connecting a Client

Claude Code

$ claude mcp add --transport http \
    --header "Authorization: Bearer your-token" \
    initech http://localhost:9200/mcp

After connecting, Claude can call initech tools directly. Ask it to "peek at eng1's output" or "tell eng1 to run make test" and it maps to the appropriate MCP tool.

MCP Setup Modal

Inside the TUI, press ` then type mcp to open the MCP Setup Modal. It shows:

Press c to copy the Claude Code connection command to your clipboard.

Available Tools

Observation

ToolParametersReturns
initech_peekagent (required), lines (optional, default 50)Terminal content as plain text
initech_patrollines (optional, default 20)JSON object keyed by agent name
initech_statusnoneJSON array: name, activity, alive, bead_id, memory

Actions

ToolParametersReturns
initech_sendagent, message (required), enter (optional, default true)Confirmation
initech_atagent, message, delay (required, e.g. "5m")Schedule confirmation
initech_restartagent (required)Confirmation
initech_stopagent (required)Confirmation
initech_startagent (required)Confirmation

Roster

ToolParametersReturns
initech_addrole (required)Confirmation with new agent name
initech_removeagent (required)Confirmation

All tools return text on success or an error message on failure. Tool descriptions instruct the LLM to call initech_status first to discover available agents.

Claude Code Plugin

For Claude Code users, the initech plugin bundles a skill that teaches Claude how to drive an agent fleet, plus auto-configuration for the MCP connection:

$ claude plugin install initech

After installation, Claude automatically knows how to coordinate initech agents. The plugin's skill activates when you reference agent coordination, dispatching work, or checking agent status. Use it with /initech:fleet-coordinator or let it activate automatically from context.

Set the MCP token so the plugin can connect:

$ export INITECH_MCP_TOKEN=your-token

Security

The MCP server uses bearer token authentication on every HTTP request. Unauthenticated requests receive a 401 response.

The server binds to 0.0.0.0 by default, making it accessible on the LAN. For local-only access, set mcp_bind: 127.0.0.1.

No TLS in the current version. For remote connections over untrusted networks, use Tailscale/WireGuard (traffic is already encrypted) or SSH tunneling. The MCP server has the same capabilities as initech send and initech peek: it can read pane output and inject text, but cannot modify TUI configuration, layout, or beads.

Transport

Streamable HTTP on a single /mcp endpoint. Accepts JSON-RPC 2.0 POST requests, upgradable to Server-Sent Events (SSE) for server-initiated messages. This is the standard MCP transport (spec version 2025-03-26+).

Last updated: April 2026