pi-durabletask-mcp
Provides opt-in durable task storage in a local SQLite database: tasks marked durable: true have their history, tool results and pending steering persisted so unfinished work recovers after a bridge restart and finished results stay readable from any session. Includes per-task ownership via a kernel-released lock, configurable per-task history retention (seven days by default) and automatic removal of expired history.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pi-durabletask-mcpUse Pi to review this repository and report the findings."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
English · 简体中文
pi-durabletask-mcp
Delegate work from Claude Code, Codex, or another MCP client to Pi Coding Agent, in its own context.
Example workflow
You: Use Pi to review authentication for missing permission checks. Don't edit files.
Explicitly set durable: true so we can continue in another window.
→ spawn with the absolute repo cwd and durable: true
While running: Focus on tenant isolation; skip style issues.
→ steer
After the review: Suggest a regression test for the most serious finding.
→ follow_up in the same session
Switching windows: Save findings and next steps → handoff save
New window: Read this repo's handoff → handoff read; follow resumeHintTo collect results, the main agent loops wait with until: "settled". If Pi asks a question, use answer with the question ID, then wait again.
Related MCP server: codex-router
What you can do
Separate context: Pi reads and searches; your main agent collects findings.
Attachments: pass a diff or notes by file path with
attachments, instead of pasting them into the prompt.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.Final-turn wrap-up: tools are disabled on the last turn and the model is asked to provide a final answer; results include token usage and cost.
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:
npm install -g pi-durabletask-mcpThe bridge links to the global Pi SDK, so install Pi before the bridge:
npm install -g @earendil-works/pi-coding-agent@1.0.0
pi # configure a provider or use /loginSearch uses Pi's downloaded rg or ripgrep on PATH. Authentication →
Global Pi is still required.
git clone https://github.com/Nyarlathoteppppp/pi-durabletask-mcp.git
cd pi-durabletask-mcp
npm ci
npm run buildConnect with node /absolute/path/pi-durabletask-mcp/dist/index.js instead of the installed command.
2 · Connect
claude mcp add --scope user pi -- pi-durabletask-mcpAdd to ~/.codex/config.toml:
[mcp_servers.pi]
command = "pi-durabletask-mcp"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.
Connect the MCP server first; this skill only guides tool use. Choose your client's user-level directory and download just SKILL.md:
dir="$HOME/.claude/skills/pi-durabletask-mcp" # Claude Code
# dir="$HOME/.agents/skills/pi-durabletask-mcp" # Codex: use instead
mkdir -p "$dir"
curl -fsSL https://raw.githubusercontent.com/Nyarlathoteppppp/pi-durabletask-mcp/main/skills/pi-durabletask-mcp/SKILL.md \
-o "$dir/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
MIT · Built on howznguyen/pi-delegate-mcp and Pi Durable.
This server cannot be deployed
Maintenance
Related MCP Connectors
Project management MCP for AI agents with safe task reads and writes.
- DazbenchOAuthapp.dazbench
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
- projectsOAuthcloud.tri2b
Task tracking built for coding agents. Work is leased, so two agents never take the same SubTask.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceDelegates bounded coding tasks from MCP clients to the Pi Coding Agent over stdio. Supports review, verification, implementation, and batch operations with long-running task polling.MIT
- AlicenseNot gradedqualityBmaintenanceA durable MCP control plane for starting, observing, steering, continuing, cancelling, and handing off long-running coding agents, with bounded MCP calls and persistent worktrees.10 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP hosts like Claude Code and Codex to spawn, manage, and interact with persistent, reusable Pi coding-agent sessions, supporting task dispatch, status checks, and session lifecycle control.2 npm-
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate coding implementation and testing to a local pi agent via MCP tools, including dispatching task books, monitoring status, steering or aborting runs mid-execution, and retrieving results and transcripts.36 npm4MIT