Harness Notes

Commands

Updated 2026-10-21

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.

TaskCodex CLIchecked at 0.162.1Claude Codechecked at 2.1.296Cursor Agentchecked at 2026.10.12-d47ca18OpenCode 2.xchecked at 2.0.28pichecked at 1.2.0
Set up
Add

codex mcp add <NAME> (--url <URL> | -- <COMMAND>...)

Register a stdio or streamable-HTTP MCP server.

1 note

--env is stdio-only; --bearer-token-env-var, --oauth-client-id, --oauth-client-secret, --oauth-client-registration and --oauth-resource are HTTP-only.

claude mcp add [options] <name> <commandOrUrl> [args...]

Add a stdio, SSE or HTTP MCP server.

1 note

WebSocket servers can only be added with add-json or .mcp.json.

claude mcp add-json [options] <name> <json>

Add a stdio, SSE, HTTP or WebSocket MCP server from a JSON string.

—

opencode mcp add <name> [--url <url>] [--header name=value] [--env name=value] [--global] [-- <command...>]

Add an MCP server to the project config, or the global config with --global.

1 note

The name is now required.

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.

Import—

claude mcp add-from-claude-desktop [-s <scope>]

Import MCP servers from Claude Desktop on macOS or WSL.

———
Sign in or pair

codex mcp login <NAME>

Start an OAuth login for a configured streamable-HTTP MCP server.

1 note

--no-browser prints the URL to paste the callback by hand; --scopes; --oauth-client-registration.

claude mcp login [--no-browser] <name>

Sign in to an HTTP, SSE or claude.ai connector MCP server.

agent mcp login <identifier>

Sign in to an MCP server configured in .cursor/mcp.json or ~/.cursor/mcp.json.

opencode mcp auth [<name>]

Sign in to an OAuth-capable remote MCP server.

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

codex mcp list [--json]

List configured MCP servers.

claude mcp list

List configured MCP servers and their health.

1 note

Unapproved .mcp.json servers show as pending and are not connected.

agent mcp list

also cursor-agent mcp list

List configured MCP servers and their status.

opencode mcp list

List configured MCP servers and their status.

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.

Show details

codex mcp get <NAME> [--json]

Show one MCP server's configuration.

1 note

--json prints the raw config entry.

claude mcp get <name>

Show an MCP server and its approval or health state.

1 note

Hides the command, arguments and environment of plugin-provided stdio servers.

agent mcp list-tools <identifier>

List the tools an MCP server exposes and their argument names.

——
Start or run—

claude mcp serve

Run Claude Code as a stdio MCP server.

———
Change
Enable——

agent mcp enable <identifier>

Add an MCP server to the local approved list.

1 note

--approve-mcps approves every server for one run.

——
Disable——

agent mcp disable <identifier>

Disable an MCP server so it is neither loaded nor offered for approval.

——
Reset approvals—

claude mcp reset-project-choices

Reset approved and rejected .mcp.json server choices.

———
Remove
Sign out

codex mcp logout <NAME>

Remove stored OAuth credentials for an MCP server.

claude mcp logout <name>

Clear stored OAuth credentials for an MCP server.

—

opencode mcp logout <name>

Remove stored OAuth credentials for an MCP server.

pi mcp logout <server>

Delete a server's stored OAuth credentials.

Remove

codex mcp remove <NAME>

Delete a stored MCP server definition.

claude mcp remove [-s <scope>] <name>

Remove an MCP server from a chosen or detected scope.

1 note

Also deletes a remote server's stored OAuth tokens.

——

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.

TaskCodex CLIchecked at 0.162.1Claude Codechecked at 2.1.296Cursor Agentchecked at 2026.10.12-d47ca18OpenCode 2.xchecked at 2.0.28pichecked at 1.2.0
Set up
Sign in or pair

/mcp login <name>

Sign in to a configured MCP server from the active session.

1 note

Added in 0.161.0.

———

/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

Open the MCP status and sign-in panel.

1 note

With -p it prints a text status summary.

/mcp

Open the MCP pager to browse tools, sign in or out, enable or disable servers.

/mcps

View, connect, disconnect or sign in to MCP servers.

1 note

Removing a server means editing the config.

/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.

List

/mcp

also /mcp verbose

List the MCP servers and tools available in the session.

1 note

/mcp verbose adds server diagnostics.

————
Show details———

/status

Show MCP server connection status.

—
Change
Enable—

/mcp enable [<server>|all]

Re-enable a disabled MCP server, or all of them.

———
Disable—

/mcp disable [<server>|all]

Stop connecting to an MCP server while keeping its configuration.

1 note

Recorded per project in ~/.claude.json.

———
Reconnect—

/mcp reconnect (<server>|all)

Reconnect one MCP server, or retry every failed one.

——

/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

Codex CLI
  • The shell CLI installs and removes plugins but has no enable, disable, update or validate command; the /plugins browser can switch plugins on or off.
  • --worktree starts new sessions in a managed Git worktree and works with codex fork given an explicit session; resume, queue, archive, unarchive and delete reject it at run time.
  • MCP protocol capabilities are recorded in mcp.json; these records cover the operator commands.
  • codex-cli-0.162.1 help observation, live observation, checked 2026-10-14
  • Codex developer commands, Documentation, checked 2026-10-15
Claude Code
  • Some plugin authoring and evaluation commands are newer than the public reference, so each command keeps its live help evidence.
  • Plugin installs that run a marketplace-declared command need --accept-command <sha256> without a TTY.
  • Interactive commands are recorded separately from their shell equivalents.
  • 2.1.304 adds /auto-mode-setup across Bedrock, Vertex, Foundry, Claude apps gateway and telemetry-disabled sessions; help output was corrected for several flags, and plugin validate no longer predicts where mod hooks run. Existing command help observations retain their versions.
  • claude plugin can also be written claude plugins.
Cursor Agent
  • Nested --help at this version prints the top-level help, so subcommand syntax for plugin marketplaces and in-session commands comes from the docs and changelog.
  • agent env, agent cloud and agent automations exist behind feature flags and are not recorded.
OpenCode 2.x
  • @opencode/cli 2.x runs one shared background service per user, managed with opencode service. Session sharing is not supported yet.
  • 2.1 restores archiving through client.session.update({ sessionID, archived: true|false }) and archive filtering in client.session.list. These are SDK/HTTP operations, not newly claimed shell subcommands.
  • 2.1 adds editable saved-grant action/resource patterns through client.permission.saved.update / PATCH /api/permission/saved/:id. Action is a tool/action name, not an allow/deny effect.
  • 2.1.1 fixes provider reasoning variant generation after package normalization; other command observations retain their earlier help/source versions.
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