
Turns Claude Code into an orchestratable sub-agent by spawning and controlling headless sessions through the claude-wrap library. You get eight tools: spawn sessions in a working directory, send prompts with claude_ask and wait for parsed state, fire raw input with claude_send for long tasks, poll status for busy/mode/tokens/permissions, grab transcript snapshots, list all sessions, and approve or deny permission prompts explicitly instead of bypassing them. Built on node-pty, requires the claude CLI on your PATH. The primary use case is letting one Claude instance manage a fleet of other Claude Code sessions as workers, with full lifecycle control and state parsing for each.
An MCP server that lets an agent spawn and
drive real Claude Code sessions, so Claude Code can run a fleet of Claude Code
sub-agents. Built on claude-wrap.
Needs Node ≥ 18 and the claude CLI on your PATH. Headless sessions work
everywhere; attaching to visible terminal windows is Windows-first.
npm install -g claude-wrap-mcp
claude mcp add claude-wrap -- claude-wrap-mcp
Or in .mcp.json / claude_desktop_config.json:
{
"mcpServers": {
"claude-wrap": { "command": "npx", "args": ["-y", "claude-wrap-mcp"] }
}
}
| Tool | What it does |
|---|---|
claude_spawn | Start a session in an absolute cwd. Returns a sessionId. |
claude_ask | Send a prompt, wait for idle, return the transcript tail + parsed state. |
claude_send | Send raw input (text / line / key) without waiting — for long tasks. |
claude_status | Busy, mode, tokens, pending permission prompt, todos, last 5 tool names. |
claude_tool_calls | Page through the session's tool calls. Ids + names by default. |
claude_tool_result | One tool call by id: its args and result. |
claude_snapshot | The rendered transcript lines. |
claude_list | Every session — spawned here or discovered. |
claude_resolve_permission | approve / deny a pending permission prompt. |
claude_stop | Shut down a session this server spawned. |
There is a second family, claudep_*, that drives non-interactive claude -p
sessions and returns structured JSON, tool calls, usage and cost.
Two things worth knowing:
claude_ask or
claude_status reports a permissionPrompt, answer it with
claude_resolve_permission.claude_tool_calls lists the rest and
claude_tool_result fetches one call's output by id.pnpm install
pnpm --filter claude-wrap-mcp build
pnpm --filter claude-wrap-mcp test
MIT © Alex Kaffetzakis