Harness Notes

Commands

Updated 2026-11-25,

On this page

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.

Taskpichecked at 1.2.0
Set up
Add

pi mcp add <server> [options] (-- <command> [args...] | --url <url>)

Add or replace a stdio or Streamable HTTP server in mcp.json.

1 note

Writes ~/.pi/agent/mcp.json, or .pi/mcp.json with -l. Does not connect; run pi mcp list. SSE is rejected.

Sign in or pair

pi mcp login <server> [--timeout <seconds>]

Sign in to an OAuth MCP server through the browser.

1 note

Default timeout 300 seconds; a pasted redirect URL is accepted.

Use
List

pi mcp list [--json]

Connect to every enabled server and print its state, tools and errors.

1 note

Exits 1 on an invalid entry or a server that fails to connect.

Remove
Sign out

pi mcp logout <server>

Delete a server's stored OAuth credentials.

Remove

pi mcp remove <server> [-l]

Remove a server from mcp.json.

1 note

Stored OAuth credentials are kept; use pi mcp logout.

Inside a session

Slash commands you type into an open session.

Taskpichecked at 1.2.0
Set up
Sign in or pair

/mcp login <server>

Sign in to an OAuth MCP server from a session.

1 note

The session uses the new credentials on its next turn.

Use
Open the manager

/mcp

List servers and inspect, reconnect, sign in or out, enable or disable one.

1 note

Provided by the built-in MCP extension; absent with --no-mcp or when another extension registers /mcp.

Change
Reconnect

/mcp reconnect <server>

Reconnect an enabled MCP server.

1 note

No shell equivalent.

Remove
Sign out

/mcp logout <server>

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