# Pi Durabletask MCP [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/Nyarlathoteppppp/pi-durabletask-mcp  
**GitHub Stars:** 21  
**npm Downloads (last month):** 412  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pi-durabletask-mcp

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

## Tools
Capabilities this server exposes over MCP:

- **mcpServers**
- **tools**
- **PI_DELEGATE_ALLOW_TOOLS**
- **codemode**
- **tool_search**
- **mcp.json**
- **exposure**
- **deferred**
- **hidden**
- **extensions**
- **false**
- **nativeMcp**
- **cwd**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "pi-durabletask-mcp": {
    "command": "npx",
    "args": ["-y","pi-durateam"]
  }
}
```

## Documentation

## 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:

```bash
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.

_Full upstream README: https://allmcps.com/mcp/pi-durabletask-mcp/readme_

