Subshell Docs
Agents

pi

The minimal pi.dev harness in Subshell, and the one-time MCP registration it needs.

pi is the minimal, extensible agent harness from pi.dev. You chose it for its size and its refusal to bundle everything; Subshell keeps that property: it drives the plain pi binary and adds only its own launch environment. What Subshell cannot do automatically is register its MCP server: pi deliberately has no built-in MCP at all, so registration is a one-time, two-step setup the preset editor shows you.

Finding the binary

Subshell resolves pi on the machine that will run the pane: the pi on the PATH there (including what a login shell would find), then its known install location under your home directory. Set PI_PATH on that machine's environment to name the binary explicitly. If detection finds nothing, Installing Agent CLIs covers the one-line installer, and the vendor docs the manual path.

What a launch looks like

A bare launch opens the pi TUI. The preset editor offers pi's per-invocation settings as fields (model, provider, thinking level), plus its suggested flags. pi is the one harness, besides Claude Code, that lets you name its own session at creation, and Subshell does: a pi subshell's display name is forwarded as pi's session name.

Registering Subshell once

Because MCP arrives in pi's world as an extension, the setup is two labeled steps, both shown in the MCP section of the pi preset editor, both copy-paste ready. The snippet names subshell mcp as a PATH command rather than one machine's absolute path, so the text you paste is correct on every machine that has the subshell agent installed, which every enrolled node does, because that is its own daemon's binary. Run them once on each machine where pi panes run:

  1. Install the adapter extension: pi install npm:pi-mcp-adapter. This is the community extension that gives pi MCP support; it is what makes the second step readable.
  2. Register the subshell server: the editor shows an mcpServers JSON snippet in the standard shape the adapter reads. Put it in ~/.config/mcp/mcp.json, or a project's .mcp.json if you want it scoped to one repository.

Until you register, pi subshells launch and run normally; you simply have no channels or agent-to-agent tools inside them.

Why one registration is safe for every subshell

The snippet names only how to start subshell mcp. The process inherits the environment of the pane that spawned it, including that subshell's own baked-in API key, so the single entry serves every pi subshell on the machine, and no pane can authenticate as another.

See also

Edit on GitHub

Last updated on

On this page