Developer docs · v0.2

CLI & Overlay 0.2.0 · Schema 23step.run/v4 /docs/mcp.md

MCP server reference

https://mcp.23step.com/mcp lets any MCP client list, read, search, and annotate runs—and collaborate on Session Marketplace plugins when plugins:* scopes are granted. Client setup for Claude Code, Cursor, Codex, VS Code and others is on Getting started.

Connection and OAuth 2.1

Transport is stateless streamable HTTP: one JSON-RPC POST /mcp per call, no long-lived session. Every call is checked against your organization and visibility rules and written to an audit log.

Authenticate with MCP OAuth 2.1 (default for modern MCP clients) or a static API key (Authorization: Bearer st_...). Unauthenticated requests to /mcp or /mcp/plugins return 401 with an RFC 9728 WWW-Authenticate challenge pointing to https://mcp.23step.com/.well-known/oauth-protected-resource, which advertises authorization_servers: ["https://app.23step.com"] and supported scopes (runs:read, runs:write, plugins:read, plugins:comment, plugins:tasks, plugins:write). Insufficient scopes return 403 with error="insufficient_scope" for step-up authorization.

The authorization server on https://app.23step.com publishes GET /.well-known/oauth-authorization-server and GET /.well-known/openid-configuration, supports PKCE (S256), Client ID Metadata Documents (CIMD), constrained RFC 7591 Dynamic Client Registration (POST /oauth/register), RFC 8707 resource indicators, short-lived sto_ access tokens (1 hour) with rotating str_ refresh tokens (30 days) at POST /oauth/token, and RFC 7009 revocation at POST /oauth/revoke.

For static API keys, runs:read unlocks the read tools, runs:write unlocks the write tools (a write-only key cannot connect to /mcp), and plugins:* scopes unlock Plugin MCP.

Terminal tools/call
curl -sS https://mcp.23step.com/mcp \
  -H "Authorization: Bearer $STEP23_MCP_KEY" \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"get_run_summary","arguments":{"run_id":"https://app.23step.com/s/<share_id>"}}}'

Tools

Start with get_run_summary, a manifest under 400 tokens, then drill in. run_id takes a run id or a step link.

Read tools (runs:read)
ToolArgumentsReturns
get_run_summaryrun_id; without it: view (runs or sessions), session_id, q, kind, has_errors, offset, limitStatus, session, agent and repo metadata, exit codes, modified files, notes, and a one-line index of steps. Without run_id, a list of runs or sessions.
inspect_steprun_id, step, grep, offset, limit, fields, branchOne step in detail: cleaned logs, unified diffs of edits, DOM text, and a screenshot link.
search_run_logsq, run_id or session_id, kind, limitRegex or keyword matches across commands, logs, diffs, DOM text, and notes, in one run or all you can see.
get_step_imagerun_id, step, mode (step, sheet, preview), max_edge, format, crop, element_selector, audience, include_domA downscaled WebP or JPEG of one screenshot (or a contact sheet), optionally cropped, with DOM text.
Write tools (runs:read + runs:write)
ToolArgumentsEffect
set_run_promptprompt, session_id, previous_run, agent_name, git_repo, git_branch, …Store the user prompt and session metadata at the start of a turn.
record_commandcommand, cwd, exit_code, duration_ms, run_idRecord a shell command (no output).
annotate_runrun_id, seq, textAdd a note of up to 500 characters to a frame.

Resources and safety

Screenshots and DOM text are also resources: 23step://runs/{run_id}/steps/{step}/screenshot and .../dom, readable with resources/read. At most one image is returned per call, capped at about 1.5 MB.

Titles, URLs, logs, comments, and pixels come from the recorded screen and are untrusted. The server wraps them in <<UNTRUSTED …>> markers that cannot be forged; clients should never follow instructions inside them. There is no delete tool.