pi-subagent
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-subagentRefactor the login component and update tests."
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.
Pi-Team
Delegate tasks to the Pi CLI through MCP, with named sessions, sync/async execution and a read-only transcript window on Windows.
Based on guyiicn/pi-subagent.
Install
Requires Node.js, npm and Pi configured with access to a model provider.
npm install -g @earendil-works/pi-coding-agent
git clone https://github.com/TouHousand-Years/Pi-Team.git
cd Pi-Team
npm ci
npm run buildEnsure pi is on the MCP server's PATH. Run npm run build again after updating the checkout.
Related MCP server: pi-delegate-mcp
Configure
Add this to your MCP host configuration, using the absolute path to dist/server.js:
{
"mcpServers": {
"pi-subagent": {
"command": "node",
"args": ["/absolute/path/to/Pi-Team/dist/server.js"]
}
}
}On Windows, use a path such as C:/Projects/Pi-Team/dist/server.js. The MCP server keeps the name pi-subagent for compatibility.
Adapted skills
This repository includes five skills under skills/ that turn the two MCP tools into reusable, checkable workflows. The skills do not add new server tools: they define how the host scopes work, delegates it to Pi, verifies the result and stops safely.
Skill | Use it for | Main boundary |
The shared delegation contract used by the other Pi skills: model selection, prompt composition, file ownership, result collection, concurrency and failure handling. | It supplies transport rules only; the active specialized skill still defines the task, outputs and acceptance criteria. | |
Evidence-backed repository investigation, including architecture, tests, recent commits, caches, frontends, concurrency, networking and reproducible failures. | It keeps product files read-only and returns conclusions with paths, line references, commands and explicit evidence gaps. | |
Bounded implementation or repository work with a closed baseline-execute-verify-correct loop. It fits coding, bulk edits, experiments, log analysis and tasks with observable checks. | Pi owns the declared output files; the host reviews them read-only and sends corrections back through another bounded delegation. | |
Long or consequential translations that require complete coverage, stable terminology and preservation of headings, tables, citations, code and formulas. | It translates from explicit source files, uses a glossary when needed and marks unresolved wording instead of silently guessing or omitting content. | |
High-leverage implementation plans, trade-off decisions and recovery plans after exploration or experiments have produced a compact evidence brief. | The planner receives text only: it has no tools, network access or write permission, and it never performs the implementation. |
The usual composition is pi-explorer for facts, pi-ultra-planner for a difficult decision, and pi-worker for execution. pi-translator is a separate document workflow. All four specialized skills delegate through pi-team, which uses only pi_delegate and pi_status.
Delegate a task
Call pi_delegate:
{
"prompt": "Review the parser and write findings to review.md.",
"session": "review-parser",
"cwd": "C:/Projects/example",
"goal": "Review parser correctness",
"mode": "sync",
"runTimeoutMs": 240000
}promptandsessionare required. New sessions also requiregoaland an existingcwddirectory.Reuse
sessionto continue a conversation after its current Run finishes. You may omitcwdandgoal; an explicitcwdmust match the original.mode: "sync"waits for completion.mode: "async"(default) returns arunIdto collect later.runTimeoutMsdefaults to600000(10 minutes). Keep synchronous calls within your host's tool-call timeout.Up to four Runs can execute at once, with one per session. Runs stop after 5 minutes without recorded tool-result progress.
Optional constraints configure each call independently:
{
"model": "<model identifier configured in Pi>",
"thinking": "high",
"tools": ["read", "bash", "edit", "write"]
}Place this object under constraints in pi_delegate. excludeTools is also supported. Thinking levels are off, minimal, low, medium, high and xhigh. For tool names beyond those shown, set allowUnknownTools: true. Resend constraints when continuing a session if needed.
Collect results
Call pi_status with the returned runId:
{
"runId": "<runId>",
"waitTimeoutMs": 25000
}The call waits until completion or the wait timeout (default: 25 seconds). waitTimeoutMs: 0 returns immediately. If status is still running, wait again using the same runId. Terminal states are completed, error, killed and timeout; inspect result or error as appropriate.
A host timeout does not necessarily stop the Run. If you have its runId, collect that Run before starting another. Old Run IDs are unavailable after a server restart, though session metadata and transcripts remain on disk.
Windows viewer
Each Run automatically opens a read-only transcript window on Windows. Closing it does not stop the Run. To reopen it, call pi_status with "openWindow": true.
Set PI_SUBAGENT_VIEWER=off to disable windows. Delegation and transcript capture work without the viewer.
Environment variables
Variable | Purpose / default |
| Pi executable override. |
|
|
| Viewer executable; |
| Override |
| Session metadata; |
| Full transcripts; |
Transcripts include prompts and tool output. Inactive completed bundles are cleaned after 7 days, with oldest-first cleanup targeting a 2 GiB quota.
Available Tools
2 toolspi_delegateC
委派任务给 Pi 子代理(默认 async)
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| goal | No | ||
| mode | No | ||
| prompt | Yes | ||
| session | Yes | ||
| constraints | No | ||
| runTimeoutMs | No | ||
| allowUnknownTools | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits but only mentions 'default async'. It does not explain side effects, how results are returned, or whether the tool is idempotent. Critical details are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, but it is overly terse for a tool with 8 parameters. While front-loaded, it lacks structure and does not fully utilize the space to convey necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (8 parameters, nested objects, no output schema, no annotations), the description is severely incomplete. It fails to cover usage patterns, return values, or async/sync behavior beyond the default.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain any of the 8 parameters, not even the required 'prompt' and 'session'. The enum for 'mode' is mentioned only implicitly as 'default async' but no details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool delegates tasks to a Pi sub-agent with a default async mode. However, it does not differentiate from sibling tools like pi_plan or pi_session_fork, which could have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor are there any preconditions or exclusions mentioned. The description is too brief to inform decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_statusC
取 run 结果(long-poll);openWindow 可重开该 Run 的只读窗口
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | ||
| openWindow | No | ||
| waitTimeoutMs | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions long-polling and the openWindow action, but does not disclose timeout behavior, error handling, side effects, or any authentication or rate-limit considerations. This is minimal for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of one line that front-loads the primary action. While efficient, it may be overly terse, omitting critical details, but the structure itself is clean and non-redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with three parameters, no output schema, and no annotations, the description is too sparse. It does not explain the return format, what happens on timeout, error conditions, or how openWindow interacts with the polling. An agent would lack essential information for correct invocation and interpretation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It implicitly covers runId (the run) and explains openWindow, but it does not mention waitTimeoutMs at all, nor does it clarify the format or constraints of runId. The parameter documentation is incomplete and fails to compensate for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool retrieves run results via long-polling and can reopen a read-only window. The purpose is specific and distinct from the sibling pi_delegate, though it does not explicitly name the alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus pi_delegate. There is no mention of conditions, exclusions, or alternative tools, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
pi_delegate - First observed
pi_status
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: pi_delegate initiates a task delegation, while pi_status retrieves the result of a run. There is no overlap or ambiguity between them.
Both tools follow a consistent pi_ prefix and use a verb_noun pattern (delegate, status). The naming is predictable, though the set is too small to fully demonstrate a broader convention.
Two tools is on the thin side for a subagent delegation server, but it may be sufficient for a minimal async task lifecycle. The count is borderline but not unreasonable.
The pair covers the basic delegate-and-poll lifecycle, but there is no explicit cancel, list, or error-handling tool. Agents can work around this by waiting for status, but the surface feels minimal.
Maintenance
Related MCP Connectors
Remote MCP server for Tandem docs, install guides, SDKs, workflows, and agent setup help.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Hosted MCP messaging across owners, tools, and machines, with readable transcripts.
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables MCP hosts to delegate coding tasks to Pi CLI as a programmable sub-agent with session tracking and process management.73MIT
- 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
- FlicenseBqualityBmaintenanceEnables AI clients to execute Windows commands, manage files, query system information, and perform code checks via MCP protocol.241-
- AlicenseNot gradedqualityBmaintenanceAn MCP bridge for the Pi coding agent running in WSL, enabling task execution, research, review, and session management through MCP.MIT