Pi MCP Adapter is a proxy that lets the Pi coding agent use MCP servers without loading all of their tool definitions into its context at once. MCP servers provide connected tools such as databases, browsers, and APIs, and the adapter discovers and starts them only when needed. Its catalogue skill supplies the workflow for using this adapter with Pi.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add nicobailon/pi-mcp-adapter --skill mcp-scriptinggit clone --depth 1 https://github.com/nicobailon/pi-mcp-adapterWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nicobailon/pi-mcp-adapter/mcp-scripting)<a href="https://agentmods.dev/skills/nicobailon/pi-mcp-adapter/mcp-scripting"><img src="https://agentmods.dev/badge/skills/nicobailon/pi-mcp-adapter/mcp-scripting/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nicobailon/pi-mcp-adapter/mcp-scripting"><img src="https://agentmods.dev/badge/skills/nicobailon/pi-mcp-adapter/mcp-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.01060 |
| Opus 5 | $0.00010 | $0.00530 |
| Sonnet 5 | $0.00004 | $0.00212 |
| Haiku 4.5 | $0.00002 | $0.00106 |
Grade A, and why
mcp-scripting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP scripting
For multi-call MCP work, write ordinary JavaScript with loops, filtering, chaining, fan-out, or other logic between calls. Run that source with mcpScript; it is the primary MCP orchestration surface. For a single MCP search, describe, status check, auth action, or tool call, use mcp instead.
Write the source naturally, then pass it as mcpScript's code argument:
const { items } = await tools.search({ query: "search issues", server: "github" });
const candidate = items[0];
if (!candidate) return { error: "No matching tool" };
const details = await tools.describe({ path: candidate.path });
if (details.error) return details;
const result = await tools.call(details.path, { query: "is:open label:bug" });
if (!result.ok) return result;
emit({ tool: details.path, completed: true });
return result.data;
Workflow
- Find candidate tools with
await tools.search({ query, server?, limit?, offset? }). - Inspect the exact returned path with
await tools.describe({ path }). - Call it with
tools.call(path, args).
Descriptors include inputTypeScript (a compact parameter shape, or formatted schema fallback). When a compact shape would omit documented fields, inputGuidance preserves their descriptions, including formats and units. Undocumented inputs stay compact.
When advertised by the server, outputSchema is the original JSON Schema and outputSchemaTarget is "data.structuredContent": it describes structured output inside the successful { ok: true, data } call envelope, not the envelope itself. Inspect this schema for result fields and constraints; unsupported constructs remain intact rather than being presented as an approximate TypeScript type. Both output fields are absent when no output schema is advertised. Discovery and cache refresh preserve these optional schemas; old cache entries gain them on the next server metadata refresh. Ordinary search results do not include schemas.
Calls resolve to { ok: true, data } or { ok: false, error }; handle failed calls instead of expecting them to stop the script. emit(value) adds user-visible output before the final return value. console output is captured too.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago Changed · +8 lines d70b732e0ea2
- 4d ago Changed · +2 lines b926892cde18
- 7d ago Changed · +1 lines 99484966a21d
- 10d ago First seen · 39 lines · 21 tokens per session scan A d33016aeb01d
mcp-scripting is a skill published in the GitHub repository nicobailon/pi-mcp-adapter (1,435 stars, last pushed 3d ago), licensed MIT. It adds 21 tokens to every session and 1,060 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pi
Use when needing a minimal, extensible terminal AI coding agent harness in TypeScript with plugin architecture. Pi: minimalist terminal AI coding agent emphasizing simplicity and composability.
ask-user
Use askuser as a decision, research, and requirements gate before ambiguous or high-stakes choices.
optimization
Use when improving performance, latency, throughput, memory usage, or general efficiency. Start by defining target metrics, measuring comprehensively, attributing bottlenecks, validating with static analysis, and prioritizing macro-optimizations before micro-optimizations.
tmux-manual-qa
Run a single manual tmux-based QA scenario for the todo continuation feature against the real CLI (./pi-test.sh) in an interactive TUI. Captures scrollback, asserts deterministic pass/fail count markers, and cleans up test fixtures. Use only for the manual-qa milestone features.
coding-agent-extension-worker
Implements a single feature in the pi-mono todotools builtin extension work. Use for refactoring, continuation runtime, config resolver, prompt builder, test authoring, golden snapshots, CHANGELOG entries, and harness helpers. Does NOT do manual tmux QA.
gpt-image-gen
MUST read before generating images. Detailed prompt-crafting guide for gpt-image models, covering tool routing (native imagegeneration server tool vs the generateimage tool), prompt structure from subject to background, verbatim text rendering, anti-patterns, and the revisedprompt feedback loop for iteration.