Pi Durabletask MCP logo

Pi Durabletask MCP

Delegate Claude Code or Codex tasks to Pi agents with parallel runs, steering, budgets, and optional restart recovery.

Install Pi Durabletask MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "pi-durabletask-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "pi-durateam"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Pi Durabletask MCP connects Claude Code and Codex to Pi agents running on providers such as Gemini, Grok, GPT, or DeepSeek. It supports background delegation, parallel batches, steering, follow-up questions, file-based reports, and model or cost usage reporting. Optional controls add per-run turn and time limits, tool-call caps, provider fallback, coordinator workflows, and SQLite-backed recovery after a restart. Reach for it when a coding agent should distribute research or review work across several Pi models instead of handling every task in its own session.

Use cases

  • Review a code diff with several models in parallel
  • Compare independent reports on a repository or module
  • Delegate read-only research to Pi agents
  • Continue a finished investigation with follow-up questions

Key features

  • Parallel and background task delegation
  • Steering, follow-ups, and session forking
  • Turn, duration, and tool-call budgets
  • Optional SQLite restart recovery
  • Per-delegate MCP tool selection
  • Token and cost reporting

Tools13

What Pi Durabletask MCP lets your agent do. Expand a tool for its parameters.

Self-reported~29 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 48d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · pi-durateam (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars21Stargazers on the source repository.
npm downloads412Package downloads in the last 30 days.
Last commit8d agoMost recent push to the default branch.
Tools exposed13Callable tools this server registers over MCP.

How Pi Durabletask MCP works

What Pi Durabletask MCP does

Pi Durabletask MCP lets Claude Code and Codex delegate coding, research, and review tasks to Pi agents. Pi supplies the model provider connection, so delegates can use providers supported by Pi, including Gemini, Grok, GPT, and DeepSeek. The main agent remains responsible for choosing the work, selecting models, and evaluating the returned reports.

Delegation can run as a single task, a batch of independent tasks, or several questions forked from a completed session. Reports can be returned directly or written to files when they are long. The server also reports token usage and cost for completed work.

How it works

Install the package globally, then register its command as an MCP server. Claude Code can add it with claude mcp add; Codex uses an entry in ~/.codex/config.toml. The server requires macOS or Linux, Node.js 22.19 or newer, and Pi with provider credentials configured.

A spawn call starts one background delegate and returns a session ID. spawn_batch starts multiple tasks, up to the configured batch limit, while run waits for a short task to finish. Use wait to collect background results. Running delegates can be redirected with steer, queried with status, answered with answer, or stopped with abort. Finished sessions support follow_up and forkFrom workflows.

Each run has turn and duration budgets. The delegate receives instructions to wrap up before its budget expires, and its final turn is reserved for an answer without tools. Optional settings provide a maximum tool-call count, a soft deadline, model fallback after provider errors, and sessions that survive a server restart through stored state.

Setup and configuration

Install the published package with:

Terminal
npm install -g pi-durateam@latest

The project can also be built from source with npm ci followed by npm run build, then started through dist/index.js. The package was renamed from pi-durabletask-mcp; the older command remains available, and existing configuration, stored state, tool names, and PI_DELEGATE_* variables are retained.

Pi must be installed separately and authenticated with a provider. Use init to inspect available models, credentials, and settings, and models to list models that delegates can use. Codex desktop may require absolute paths for both Node and the installed package because its MCP process has a minimal PATH.

Tools and capabilities

  • Start one delegate with spawn, several with spawn_batch, or a blocking task with run.
  • Collect results with wait and inspect progress, phase, and idle time with status.
  • Guide active sessions using steer, respond to delegate questions with answer, and stop work with abort.
  • Continue completed sessions with follow_up, or create fresh tasks from an existing transcript with forkFrom.
  • Pass absolute-path attachments and save reports with saveTo or saveDir.
  • Grant selected Pi MCP tools to a delegate through mcpServers, tools, and PI_DELEGATE_ALLOW_TOOLS.
  • Optionally use a Pi coordinator to dispatch members and produce a cited synthesis; this requires codemode to be allowed.

Limitations and notes

The server does not provide model credentials; provider authentication is configured in Pi. Delegates do not receive MCP servers or tools by default. When external MCP tools are granted, those tools may write or act outside the delegate's working directory, so permissions should be selected deliberately.

The default limits are 30 turns and 10 minutes for spawn and spawn_batch, and 12 turns and 5 minutes for run. The documented ceilings are controlled by PI_DELEGATE_MAX_TURNS and PI_DELEGATE_MAX_DURATION_MS, with a default maximum of 50 turns and 15 minutes. A run can report a missing or partial answer when it ends without completing its final response.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Pi Durabletask MCP

Pi Durabletask MCP is an MCP server that connects Claude Code and Codex to Pi agents on configured model providers. Its main tools start individual or parallel tasks, collect results, steer running delegates, continue finished sessions, inspect status, and save reports to files.

Install it globally with `npm install -g pi-durateam@latest`, then register `pi-durateam` as an MCP server in Claude Code or Codex. Pi must be installed separately, and its provider credentials must be configured before delegates can make model calls.

Add the desired server to Pi's `mcp.json`, list the exact tool names in `PI_DELEGATE_ALLOW_TOOLS`, and select them with `mcpServers` and `tools` in the delegation call. MCP access is not enabled by default, and selecting a server alone does not grant all of its tools.

Enable the server's optional persistent-session recovery so stored state can survive a restart. Runs also retain their configured budgets and can be continued with follow-up operations when the session remains available.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPi Durabletask MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/pi-durabletask-mcp?style=directory)](https://allmcps.com/mcp/pi-durabletask-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/pi-durabletask-mcp"><img src="https://allmcps.com/api/badge/pi-durabletask-mcp?style=directory" alt="Pi Durabletask MCP on AllMCPs" /></a>