Claude Wrap Mcp

io.github.Alex-Kaff由 GitHub 账号 Alex-Kaff 发布v0.1.0更新于 Oct 24, 2026

MCP server that spawns and drives Claude Code sessions via claude-wrap.

发布方自己的服务:Claude Platform Docs

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

通过 claude-wrap 启动并驱动真实 Claude Code 会话的 MCP 服务器,让助手运行并管理一组 Claude Code 子代理。

可以做什么
  • 启动、列出和停止 Claude Code 会话,包括已发现的和 tmux 后端的会话
  • 发送提示并等待空闲,或不等待地推送原始文本、行和按键
  • 查看会话状态:忙碌情况、模式、token、待处理的权限提示、待办事项
  • 分页浏览会话的工具调用,并按 id 获取单次调用的参数与结果
  • 读取渲染后的对话记录快照,批准或拒绝待处理的权限提示
  • 驱动非交互式 claude -p 会话,返回结构化 JSON、用量与费用
适用场景
适合让助手并行编排多个 Claude Code 代理、把耗时的编码任务交给独立会话,或由监督代理监控并回应权限提示的场景。
运行要求
以 npm 包 claude-wrap-mcp 形式通过 stdio 在本机运行。需要 Node 18 或更高版本,且 claude CLI 位于 PATH 中。可选环境变量 CLAUDE_WRAP_BACKEND=tmux、CLAUDE_WRAP_TMUX_ON_EXIT 和 CLAUDE_WRAP_REGISTRY 用于配置 tmux 后端;附加到可见终端窗口以 Windows 为主。
安装前请注意
启动的会话会运行真实的 Claude Code 代理,可能在指定工作目录中修改文件并执行命令,而 claude_resolve_permission 可以批准这些操作。claude_stop 会终止 tmux 会话。使用 tmux 后端时,除非设置 CLAUDE_WRAP_TMUX_ON_EXIT=kill,会话会在服务器关闭后继续运行,且任何服务器都可接管它们。会话会消耗 Claude 用量并产生费用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Claude Wrap Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

claude-wrap-mcp

[npm version] [license]

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.

Install

sh
npm install -g claude-wrap-mcpclaude mcp add claude-wrap -- claude-wrap-mcp

Or in .mcp.json / claude_desktop_config.json:

json
{  "mcpServers": {    "claude-wrap": { "command": "npx", "args": ["-y", "claude-wrap-mcp"] }  }}

Tools

ToolWhat it does
claude_spawnStart a session in an absolute cwd. Returns a sessionId.
claude_askSend a prompt, wait for idle, return the transcript tail + parsed state.
claude_sendSend raw input (text / line / key) without waiting — for long tasks.
claude_statusBusy, mode, tokens, pending permission prompt, todos, last 5 tool names.
claude_tool_callsPage through the session's tool calls. Ids + names by default.
claude_tool_resultOne tool call by id: its args and result.
claude_snapshotThe rendered transcript lines.
claude_listEvery session, spawned here or discovered, with its backend, tmux attach command and lineage.
claude_resolve_permissionapprove / deny a pending permission prompt.
claude_stopShut down a session this server spawned or adopted (kills a tmux session).

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:

  • Permission prompts are surfaced, not bypassed. When claude_ask or claude_status reports a permissionPrompt, answer it with claude_resolve_permission.
  • Tool calls are paged, not dumped. A status poll stays cheap because it carries only names; claude_tool_calls lists the rest and claude_tool_result fetches one call's output by id.

Sessions in tmux (Linux/macOS)

Set CLAUDE_WRAP_BACKEND=tmux in the server's environment (e.g. box-wide). claude_* sessions then run in tmux sessions, with no change to the MCP config:

  • they outlive this server: on shutdown it leaves them running, and anyone can tmux attach (the command is in claude_spawn / claude_list). Set CLAUDE_WRAP_TMUX_ON_EXIT=kill to stop them with the server instead;
  • any server adopts them: pass a tmux session name (as listed) as sessionId and the session is attached in-process, with full parsed state;
  • lineage: a session spawned from inside an agent that has TASK_ID / AGENT_ID set records that task and parent. claude_list shows it, and the registry entry (CLAUDE_WRAP_REGISTRY, one file per session when it's a directory) carries it for a supervisor.

See claude-wrap's README ("tmux backend") for the knobs and the entry format.

Develop

sh
pnpm installpnpm --filter claude-wrap-mcp buildpnpm --filter claude-wrap-mcp test

License

MIT © Alex Kaffetzakis

来源:README.md,提交 a883d9e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Claude 集成