Atlas / MCP servers / nicobailon / pi-mcp-adapter

pi-mcp-adapterCAUTION

mcp/nicobailon/pi-mcp-adapter

Token-efficient MCP adapter for Pi coding agent

Verdict
CAUTION
Grade
C
Trust score
76 /100
Exposed tools
68 65r · 3w · 0d
Transport
stdio · streamable-http
License
MIT
Stars
1,588
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

Use MCP servers with Pi without burning your context window.

https://github.com/user-attachments/assets/4b7c66ff-e27e-4639-b195-22c3db406a5a

Why This Exists

Mario wrote about why you might not need MCP. The problem: tool definitions are verbose. A single MCP server can burn 10k+ tokens, and you're paying that cost whether you use those tools or not. Connect a few servers and you've burned half your context window before the conversation starts.

His take: skip MCP entirely, write simple CLI tools instead.

But the MCP ecosystem has useful stuff - databases, browsers, APIs. This adapter gives you access without the bloat. One proxy tool (~200 tokens) instead of hundreds. The agent discovers what it needs on-demand. Servers only start when you actually use them.

pi-mcp-adapter vs Pi's built-in MCP

Since then, Pi 0.99 added MCP support of its own, which also keeps tool definitions out of context. Installing the adapter replaces it in Pi sessions. What you get by switching:

  • Install many servers without paying for idle ones. The built-in starts every enabled server in every Pi session and keeps it running until the session ends. By default, the adapter starts a server when the model first calls it and stops it after 10 idle minutes.
  • Fewer tokens on everyday calls. By default, the built-in runs every MCP call as a codemode script, even a single lookup. The adapter's scripts are off by default, so a lookup is one small JSON call to the mcp tool, which cost 10–33% less in our tests. For bulk work across many records, turn scripts on with settings.scriptMode; then it costs about the same as codemode.
  • More servers work fully. Servers can ask you questions through forms, show interactive UIs, and offer prompt templates as slash commands. The bui
Read from source at commit 393ccd3364d6OBSERVED · 2026-10-12
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add pi-mcp-adapter --env CHILD_SECRET=${CHILD_SECRET} --env MCP_AUTH_URL=${MCP_AUTH_URL} --env MCP_HASH_TOKEN=${MCP_HASH_TOKEN} --env MCP_OAUTH_CALLBACK_PORT=${MCP_OAUTH_CALLBACK_PORT} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "pi-mcp-adapter": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "CHILD_SECRET": "${CHILD_SECRET}",
        "MCP_AUTH_URL": "${MCP_AUTH_URL}",
        "MCP_HASH_TOKEN": "${MCP_HASH_TOKEN}",
        "MCP_OAUTH_CALLBACK_PORT": "${MCP_OAUTH_CALLBACK_PORT}"
      }
    }
  }
}
03

Exposed tools (68)

65 read · 3 write · 0 destructive.

ToolRiskDescription
abort_pendingreadWaits for a pending input handler
add_commentwriteAdd a comment to an issue.
add_labelwriteAdd a label to an issue.
alphareadExpanded alpha description
appreadApp
app_onlyreadApp
bothreadBoth
briefreadDaily brief on a topic
classic_initialize_reachedreadClassic initialize completed
close_appreadClose the demo app
close_issuereadClose an issue, optionally posting a comment first.
create_notewriteCreate a note.
datereadOptional ISO date
demo_lookupreadNew lookup
demo_read_guidereadLive guide
demo_searchreadSearch demo v2
do-thingreadCurrent
do_thingreadDo thing
echoreadEcho a value and record receipt
failreadReturn an MCP tool error
fallback_read_manualreadCached manual
findreadFind
find_recordsreadFind records
fixture_controlreadControls the modern listen fixture
freshreadFresh tool
fresh_promptreadFresh prompt
fresh_toolreadFresh tool
get_issuereadGet one issue by number.
get_nodesreadNodes
get_nodes_secretreadSecret nodes
get_pullreadGet one pull request by number.
get_screenshotreadScreenshot
get_transcriptreadGet a meeting transcript as plain text.
haikureadCompose a haiku
hangreadNever resolves
launch_appreadLaunch the demo app
legacy_after_sibling_probereadClassic initialize completed after disposable probe exit
legacy_completereadLegacy result without a resultType
listreadList things
list_issuesreadList issues in the repository. Results are paginated; request further pages until fewer than per_page items are returned.
list_labelsreadList repository labels.
list_projectsreadList projects
list_pullsreadList pull requests. Paginated like list_issues.
list_transcriptsreadList meeting transcripts.
lookupreadLookup from disk
mcp__team_docsreadTeam docs
modern_discovery_reachedreadMCP 2026-07-28 negotiation completed
namespace.toolreadNamespaced tool
namespace_toolreadUnderscored
needs_uireadNeeds an input handler
oldreadOld tool
one_roundreadOne input-required round
otherreadOther
other_toolreadAnother tool
readreadRead a file
read_namespace.toolreadTool before colliding resource
searchreadSearch
search-recordsreadSearch
search_docsreadSearch product documentation. Returns matching sections as markdown.
search_recordsreadFailed
show_chartread
sizedreadReturn an exact-sized UTF-8 JSON result
stalereadStale
stream_adventureread
topicreadTopic to summarize
two_roundsreadTwo input-required rounds
unselectedreadNot selected
visiblereadVisible
04

Trust audit

CAUTIONgrade C · trust 76/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
found

Findings (25)

MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
dist/mcp-auth-flow.js:958
console.log(`MCP Auth: Token expired for ${serverName}, attempting refresh`);
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
mcp-auth-flow.ts:1157
console.log(`MCP Auth: Token expired for ${serverName}, attempting refresh`)
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
__tests__/host-managed.test.ts:19
const SECRET = "sk-host-managed-sentinel-7f3a";
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
__tests__/secure-keyring-recovery.test.ts:30
const token = "synthetic-secret-never-real";
MEDIUMHard-coded secrets · secret.private_key · CWE-798, CWE-321
__tests__/fixtures/ca/server-key.pem:1
-----BEGIN PRIVATE KEY-----
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
__tests__/config.test.ts:363
writeJson(join(home, ".pi", "agent", "settings.json"), { packages: ["git:../../outside-package"] });
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
__tests__/fixtures/mcp-code-fd-runner.ts:1
import { runMcpScript } from "../../mcp-code.ts";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
__tests__/fixtures/mcp-code-fd-runner.ts:2
import type { McpExtensionState } from "../../state.ts";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
__tests__/fixtures/request-headers-stream.ts:4
import { createRequestHeadersCommandFetch } from "../../request-headers-command.ts";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
__tests__/mcp-install.test.ts:35
serverName: "../../server",
LOWNetwork egress · net.beacon_words · CWE-200, CWE-319
__tests__/config.test.ts:1460
it("does not exfiltrate the baked VK when a url-only override repoints the server", async () => {
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
CHANGELOG.md:35
- `SYSTEMONE_ENDPOINT` can point at a System One server on your own machine, such as `http://127.0.0.1:8080/v1/systemone`. Plain `http` is accepted only on `localhost`, `127.0.0.0/8`, and `[::1]`; eve
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
CHANGELOG.md:129
- `/mcp-adapter setup` offers Figma (desktop) when the Figma app is installed. It adds the app's local server at `http://127.0.0.1:3845/mcp` and, if nothing answers there yet, says how to turn it on i
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
CHANGELOG.md:205
- OAuth callbacks now default to `http://127.0.0.1:<port>/callback` instead of `localhost`, as RFC 8252 recommends. Servers that reject `localhost`, such as Lovable, now work without extra setup. If a
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
__tests__/agent-plugin-conformance.test.ts:109
url: `http://127.0.0.1:${address.port}/mcp`,
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
__tests__/agent-plugin-conformance.test.ts:131
url: `http://127.0.0.1:${address.port}/mcp`,
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
examples/interactive-visualizer/package.json
@modelcontextprotocol/ext-apps, @modelcontextprotocol/sdk, chart.js, mermaid, zod, esbuild, typescript
Why it matters. 7 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/ext-tasks, @napi-rs/keyring, ajv, ajv-formats, cross-spawn, open, smol-toml, strip-json-comments
Why it matters. 14 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
CHANGELOG.md:86
- HTTP servers accept `"auth": { "provider": "<name>" }`, in adapter config and Pi's `mcp.json`, to send the token of a provider you signed in to with Pi's `/login` (Pi 0.99.2 or later). The token is
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
CHANGELOG.md:308
- Jev can send System One requests to any HTTPS provider endpoint set in `SYSTEMONE_ENDPOINT`. TypeSafe stays the default. API keys are stored per endpoint, and an invalid endpoint turns Jev off inste
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
README.md:173
- Each Pi session runs its own server processes; [rmcp-mux](https://github.com/nicobailon/pi-mcp-adapter/blob/main/docs/servers.md#shared-mcp-processes-with-rmcp-mux) can share one across sessions
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/configuration.md:114
Servers defined or changed by project-scoped MCP files (`.mcp.json`, `.pi/mcp-adapter.json`, and opted-in ancestor project files) do not run merely because a repository was opened. This includes serve
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/configuration.md:120
`pi-mcp-adapter doctor` loads the config a session in the current directory would (including Pi's own `mcp.json` files when `pi --version` reports 0.99 or later), gives each enabled server 15 seconds
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
INFOInventory / provenance · inv.oversize · CWE-1104
banner.png
banner.png
Why it matters. 1154589 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
pi-mcp.mp4
pi-mcp.mp4
Why it matters. 3003412 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-10-12 · audit v0.4.1 · source sha 393ccd3364d6full audit observations/trust-audit/mcp-server/nicobailon__pi-mcp-adapter.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-12393ccd3364d6CAUTIONC76first audit
06

Questions

What is the pi-mcp-adapter MCP server?

Token-efficient MCP adapter for Pi coding agent

What tools does pi-mcp-adapter expose?

68 in total: 65 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is pi-mcp-adapter safe to connect to an agent?

With care. The audit graded it C (76/100) and found 25 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does pi-mcp-adapter need?

It reads CHILD_SECRET, MCP_AUTH_URL, MCP_HASH_TOKEN, MCP_OAUTH_CALLBACK_PORT, MCP_OAUTH_DIR, MCP_TEST_BEARER_TOKEN, MCP_TEST_BEARER_TOKEN_ENV, MCP_TEST_MALFORMED_TOKEN, OPENROUTER_API_KEY, PI_MCP_ADAPTER_DISABLE_AUTH_CACHE, PI_MCP_ADAPTER_DISABLE_KEYRING_RECOVERY and PI_MCP_ADAPTER_FAKE_KEYRING_STORE from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does pi-mcp-adapter run?

It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as pi-mcp-adapter at 5.2.0.

How current is this page?

The grade is for one exact copy of the source (393ccd3364d6), read on 2026-10-12. The repository is watched and re-audited when it changes.

Advertisement