
Pi Durabletask MCP
io.github.Nyarlathotepppppv0.4.3更新于 Oct 4, 2026
Delegate Claude/Codex tasks to configured Pi, with steering and optional SQLite restart recovery.
概览
让助手把编码任务委派给独立的 Pi Coding Agent 会话,支持实时引导、追问,以及可选的 SQLite 恢复。
- 功能
- 该桥接让主代理(如 Claude Code 或 Codex)在独立上下文中把工作交给 Pi Coding Agent。工具包括 spawn 与 spawn_batch 启动任务(可为每个任务选择不同模型)、用 wait 配合 until: "settled" 收集结果、steer 在运行中调整方向、follow_up 在同一会话中继续,以及 answer 回答 Pi 的提问。还提供供下一个客户端窗口读取的 handoff 备注、用于选择服务器与工具权限的 nativeMcp,以及可选的 SQLite 持久化检查点。
- 适用场景
- 当你希望由第二个代理读取、搜索或审查代码库而不占用主代理上下文时,或需要可引导、可跨客户端窗口继续的长时间委派任务时,适合使用。
- 运行要求
- 以 npm 包 pi-durabletask-mcp 通过 stdio 在本地运行。需要 Node.js 22.19+ 以及全局安装并已配置好自有服务商凭据与配额的 Pi Coding Agent。搜索需要 PATH 中有 ripgrep(rg)。未声明任何环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Pi Durabletask MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[pi-durabletask-mcp — Delegate. Steer. Recover.]
English · 简体中文
pi-durabletask-mcp
Delegate work from Claude Code, Codex, or another MCP client to Pi Coding Agent, in its own context.
Example workflow
To collect results, the main agent loops wait with until: "settled". If Pi asks a question, use answer with the question ID, then wait again.
What you can do
- Separate context: Pi reads and searches; your main agent collects findings.
- Multiple models:
spawn_batchstarts tasks with individually selected models. - Live steering:
steerredirects work after the current tool call. - Follow-ups:
follow_upkeeps context in the same long-lived session; turns accumulate. - Recovery: explicit
durable: truesaves checkpoints to SQLite. - Handoff: leave a note for the next Claude/Codex window.
- Native MCP:
nativeMcpexplicitly selects servers and tool permissions; third-party extensions are enabled separately.
Quick start
Requires Node.js 22.19+ and global Pi. CI-tested with Pi 1.0.0 and 1.0.2. Model calls use your own provider credentials and quota.
1 · Install
Already configured Pi? Install the bridge:
Install and configure Pi first
The bridge links to the global Pi SDK, so install Pi before the bridge:
Search uses Pi's downloaded rg or ripgrep on PATH. Authentication →
Install from source
Global Pi is still required.
Connect with node /absolute/path/pi-durabletask-mcp/dist/index.js instead of the installed command.
2 · Connect
Claude Code
Codex
Add to ~/.codex/config.toml:
Already connected? Update the existing entry and reconnect. Other clients →
3 · Try a review
Use Pi to review authentication for missing permission checks. Don't edit files. Report file locations and suggested regression tests.
The agent uses spawn → wait(until: "settled"), answering questions with answer. Try the steering and follow-up prompts above. init is optional diagnostics; models lists available models.
Optional: install the Agent Skill
Connect the MCP server first; this skill only guides tool use. Choose your client's user-level directory and download just SKILL.md:
Start a new client session after installing.
Defaults & recovery
Tasks use your configured model, read-only tools and memory storage by default; memory sessions disappear when their MCP process exits.
With explicit durable: true, recovery happens after a bridge restart: per-run time limits include downtime, and tools with unknown outcomes are not blindly replayed—verify external state before retrying.
handoff stores notes written by the main agent; reading them does not take over execution.
Cross-window continuation requires a durable task with its original history and note still retained; a live owner must release the task before another process can continue it.
Documentation
- Agent instructions · Tools · Configuration
- Handoff · Native MCP
- Recovery, ownership & retention
- Development · Changelog · Issues
MIT · Built on howznguyen/pi-delegate-mcp and Pi Durable.
来源:README.md,提交 63427da
工具
0版本历史
1- v0.4.3最新Oct 4, 2026

