Pi Durabletask MCP

io.github.Nyarlathotepppppv0.4.3Updated Oct 4, 2026

Delegate Claude/Codex tasks to configured Pi, with steering and optional SQLite restart recovery.

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Lets an assistant delegate coding tasks to a separate Pi Coding Agent session, with steering, follow-ups, and optional SQLite recovery.

What it does
This bridge lets a main agent such as Claude Code or Codex hand work to Pi Coding Agent in its own context. Tools include spawn and spawn_batch to start tasks (optionally with different models), wait with until: "settled" to collect results, steer to redirect running work, follow_up to continue in the same session, and answer to reply to Pi's questions. It also offers handoff notes for the next client window, nativeMcp to select servers and tool permissions, and optional durable checkpoints in SQLite.
When to use it
Use it when you want a second agent to read, search, or review a repository without consuming the main agent's context, or when you need long-running delegated tasks that can be steered and resumed across client windows.
Requirements
Runs locally over stdio as the npm package pi-durabletask-mcp. Requires Node.js 22.19+ and a globally installed Pi Coding Agent, configured with your own provider credentials and quota. Search needs ripgrep (rg) on PATH. No environment variables or headers are declared.
Before you install
Model calls use your own provider credentials and quota, so delegated work consumes your usage. Tasks default to read-only tools and memory storage, but durable: true writes checkpoints to SQLite and enables recovery after a restart; after recovery, tools with unknown outcomes are not replayed automatically, so verify external state before retrying. Handoff notes are stored and readable by later sessions.

Installation

In SourceWeft

  1. Open Pi Durabletask MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

[npm] [CI] [Node.js] [License: MIT]

Quick start · Reference

Example workflow

text
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: trueWhile running: Focus on tenant isolation; skip style issues.  → steerAfter the review: Suggest a regression test for the most serious finding.  → follow_up in the same sessionSwitching windows: Save findings and next steps → handoff saveNew window: Read this repo's handoff → handoff read; follow resumeHint

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_batch starts tasks with individually selected models.
  • Live steering: steer redirects work after the current tool call.
  • Follow-ups: follow_up keeps context in the same long-lived session; turns accumulate.
  • Recovery: explicit durable: true saves checkpoints to SQLite.
  • Handoff: leave a note for the next Claude/Codex window.
  • Native MCP: nativeMcp explicitly 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:

bash
npm install -g pi-durabletask-mcp
Install and configure Pi first

The bridge links to the global Pi SDK, so install Pi before the bridge:

bash
npm install -g @earendil-works/[email protected]pi  # configure a provider or use /login

Search uses Pi's downloaded rg or ripgrep on PATH. Authentication →

Install from source

Global Pi is still required.

bash
git clone https://github.com/Nyarlathoteppppp/pi-durabletask-mcp.gitcd pi-durabletask-mcpnpm cinpm run build

Connect with node /absolute/path/pi-durabletask-mcp/dist/index.js instead of the installed command.

2 · Connect

Claude Code
bash
claude mcp add --scope user pi -- pi-durabletask-mcp
Codex

Add to ~/.codex/config.toml:

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.

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:

bash
dir="$HOME/.claude/skills/pi-durabletask-mcp" # Claude Code# dir="$HOME/.agents/skills/pi-durabletask-mcp" # Codex: use insteadmkdir -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.

Source: README.md at commit 63427da

Tools

0
Tool metadata has not been indexed yet.

Version history

1
  1. v0.4.3LatestOct 4, 2026