The command for each task, in each harness. Pick what you are working with, then read across: commands you type in your shell or a script and commands you type inside an open session are listed separately. Commands for renaming sessions are on Thread naming and importing from another harness on Migration.
From your shell
Commands you run in a terminal or script, outside a session.
| Task | pichecked at 1.2.0 |
|---|---|
| Set up | |
| Add |
Add or replace a stdio or Streamable HTTP server in mcp.json. 1 noteWrites ~/.pi/agent/mcp.json, or .pi/mcp.json with -l. Does not connect; run pi mcp list. SSE is rejected. |
| Sign in or pair |
Sign in to an OAuth MCP server through the browser. 1 noteDefault timeout 300 seconds; a pasted redirect URL is accepted. |
| Use | |
| List | Connect to every enabled server and print its state, tools and errors. 1 noteExits 1 on an invalid entry or a server that fails to connect. |
| Remove | |
| Sign out | Delete a server's stored OAuth credentials. |
| Remove | Remove a server from mcp.json. 1 noteStored OAuth credentials are kept; use pi mcp logout. |
Inside a session
Slash commands you type into an open session.
| Task | pichecked at 1.2.0 |
|---|---|
| Set up | |
| Sign in or pair | Sign in to an OAuth MCP server from a session. 1 noteThe session uses the new credentials on its next turn. |
| Use | |
| Open the manager | List servers and inspect, reconnect, sign in or out, enable or disable one. 1 noteProvided by the built-in MCP extension; absent with --no-mcp or when another extension registers /mcp. |
| Change | |
| Reconnect | |
| Remove | |
| Sign out | Delete stored OAuth credentials from a session. |
Notes and sources
pi
- Shell MCP commands always use the built-in MCP and do not load extensions. In-session behaviour is documented, not live-probed.
- pi-1.2.0 help observation, live observation, checked 2026-10-14
- pi 1.2.0 documentation, Documentation, checked 2026-10-15