steps docs
start here Writing pipelines resourceswebhooksexprcontrol-flowagentsattempts-timeoutworkspaceinfratemplatingmcpcomplete Reference webobservabilityauthenticationagents-internalsaws-workersgcp-workersdo-workersconformance

MCP Servers

MCP (Model Context Protocol) servers are a third kind of external system, alongside LLM providers (agents:) and shell-backed resource types (resource_types:): a reusable, named connection (mcp_servers:) that an agent's tools: grant can draw tools from, and/or a resource type's check/in/out can call instead of shelling out.

Two transports: Streamable HTTP (endpoint:) or a local subprocess over stdio (command:). The agent-facing and stdio examples on this page validate but are not executed by the docs suite — they need real servers and credentials. The resource-type examples execute under the suite against an in-process MCP server standing in for the vendor's, so the endpoints they show are illustrative but the check/in/out behavior they demonstrate is tested.

Declaring a server

mcp_servers:
- name: github
  endpoint: https://api.githubcopilot.com/mcp/
  auth: { type: bearer, api_key_env: GITHUB_PAT }

- name: linear
  endpoint: https://mcp.linear.app/mcp
  auth: { type: oauth }

agents:
- name: triager
  source: { model: openrouter/qwen/qwen3.7-flash, api_key_env: OPENROUTER_API_KEY }
  tools:
  - mcp: github
    tool: search_issues

jobs:
- name: triage
  plan:
  - agent: triager
    messages:
      - "Find open issues labeled 'crash' and summarize them."

Local (stdio) servers

mcp_servers:
- name: gopls
  command: gopls          # looked up on PATH; argv, never `sh -c`
  args: [mcp]             # optional
  cwd: repo               # optional — see below

agents:
- name: coder
  source: { model: openrouter/qwen/qwen3.7-flash, api_key_env: OPENROUTER_API_KEY }
  tools:
  - read_file
  - mcp: gopls

resources:
- name: repo
  type: git
  source: { uri: https://github.com/jtarchie/ci.git }

jobs:
- name: analyze
  plan:
  - get: repo
  - agent: coder
    inputs: [repo]
    dir: repo
    messages:
      - "Find unused exported functions."

A command: server is a local subprocess steps spawns and speaks newline-delimited JSON to over stdin/stdout, instead of connecting over HTTP.

Taking inventory: steps mcp list

What servers does this pipeline configure, who uses each one, and are they working here?

steps mcp list pipeline.yml
NAME    TRANSPORT  TARGET                              AUTH                USED BY        STATUS
github  http       https://api.githubcopilot.com/mcp/  bearer $GITHUB_PAT  agent triager  ✗ $GITHUB_PAT is not set (auth.api_key_env)
linear  http       https://mcp.linear.app/mcp          oauth               (unused)       ✓ 24 tools
gopls   stdio      gopls mcp (cwd: repo)               none                agent coder    · not probed (cwd: repo resolves per step)

Discovering a server's tools: steps mcp tools

Before writing a tool reference or a resource type's mcp: block, find out what a server actually exposes — its tool names and argument schemas are not something to guess:

steps mcp tools pipeline.yml github

This connects (per the server's configured auth) and prints each tool's name, description, and argument schema. It works for any auth type — stdio included — and doubles as a connectivity/auth smoke test.

Granting MCP tools to an agent

A tools: entry can reference an MCP server in three progressively broader forms. Each grant opens one connection to the server for the step, shared by every tool it selects:

mcp_servers:
- name: github
  endpoint: https://api.githubcopilot.com/mcp/
  auth: { type: bearer, api_key_env: GITHUB_PAT }

agents:
- name: triager
  source: { model: openrouter/qwen/qwen3.7-flash, api_key_env: OPENROUTER_API_KEY }
  tools:
  - mcp: github
    tool: search_issues            # one tool — may also set description/required/max_calls
    max_calls: 5
  - mcp: github
    tools: [get_issue, list_pulls] # a named subset — each keeps its server-advertised description

jobs:
- name: triage
  plan:
  - agent: triager
    messages:
      - "Triage today's crash reports."

Pinning arguments: args:

Which tools exist is one lever; which project, database or repo they reach is the other. Written into a prompt ("project 307, never another"), that scope is a request the model is free to ignore. args: on a single-tool grant makes it a boundary:

mcp_servers:
- name: honeybadger
  endpoint: https://mcp.honeybadger.io/mcp
  auth: { type: oauth }

agents:
- name: oncall
  source: { model: openrouter/qwen/qwen3.7-flash }
  tools:
  - mcp: honeybadger
    tool: list_faults
    args:
      project_id: 307        # removed from the schema the model sees, and
                             # sent as 307 whatever the model asks for

jobs:
- name: triage
  plan:
  - agent: oncall
    messages:
      - "What is failing right now?"
    assert:
      tool_calls:
      - name: honeybadger__list_faults
        args: { q: timeout }  # only model-authored args are assertable —
                              # naming the pinned project_id is a load error
  assert:
    execution: [oncall]
    outcome: succeeded

Sharing tools with other agents: mcp_exports:

A daemon can serve some of a pipeline's tools to agents somewhere else — a teammate's Claude or Cursor — as an MCP server of its own. The calls go out with the pipeline's credentials, which the caller never sees, and every one is recorded under the name of the person who connected.

mcp_servers:
- name: github
  endpoint: https://api.githubcopilot.com/mcp/
  auth: { type: bearer, api_key_env: GITHUB_PAT }

agents:
- name: oncall
  source: { model: openrouter/qwen/qwen3.7-flash, api_key_env: OPENROUTER_API_KEY }
  tools:
  - mcp: github
    tool: search_issues
    args: { owner: acme, repo: app }

mcp_exports:
- name: support
  access: '"acme/support" in Groups'
  rate: 60/m
  image: alpine:3                       # where the commands below run, one fresh container each
  user: nobody
  network: none
  privileged: false
  container_limits: { cpu: 512, memory: 268435456 }
  tools:
  - mcp: github
    tool: search_issues
    description: Search issues in the app repository
    args: { owner: acme, repo: app }   # hidden from the caller, sent whatever it asks
    timeout: 20s
    params:                            # what the caller may send, shown to it and enforced
      query: { max_length: 200, pattern: '^[^;]*$' }
      per_page: { max: 50, default: 20 }
  - mcp: github
    tools: [get_issue]
  - agent: oncall                       # the caller gets an answer, not the tools
    description: Ask what is failing right now
  - name: lookup_owner                  # a command of the pipeline's own
    description: Who owns this service?
    run: grep -i {{ .args.service | shellquote }} OWNERS
    params:
      service: { max_length: 40, pattern: '^[a-z0-9-]+$' }

jobs:
- name: build
  plan:
  - task: say
    run: echo hi

Rules: checks on each call

params: limits what one argument may be; a rule decides about the whole call — who is asking, what they are asking for, what came back. A rule is named once at the top of the pipeline and attached by name to an export (it checks every tool in it), to one tool in it, or to a tool an agent is granted.

mcp_servers:
- name: github
  endpoint: https://api.githubcopilot.com/mcp/
  auth: { type: bearer, api_key_env: GITHUB_PAT }

agents:
- name: triage-judge
  source: { model: openrouter/qwen/qwen3.7-flash, api_key_env: OPENROUTER_API_KEY }
  system: You decide whether a call may go ahead. Reply allow or deny, then one short reason.

rules:
- name: acme-only
  when: args.owner in who.Organizations
- name: no-secrets
  accept: not (result.text matches "(?i)private key|api[_-]?key")
- name: sanity
  judged_by: triage-judge

mcp_exports:
- name: support
  access: '"acme/support" in Groups'
  rules: [no-secrets]             # every tool in the export
  tools:
  - mcp: github
    tool: search_issues
    args: { owner: acme }
    params:
      query: { max_length: 200, pattern: '^[^;]*$' }
      limit: { max: 50, default: 20 }
    rules: [acme-only, sanity]    # this tool, after the export's

jobs:
- name: build
  plan:
  - task: say
    run: echo hi

Where an export is seen

A pipeline's mcp tab lists its exports under its servers — what it shares beside what it connects to — with how many tools each offers, how many people and agents are connected, and how many calls came in today. Each export has a page of its own: its address with a copy button, how to give it to Claude Code, Claude or Cursor, its access rule as written, every tool with its fixed arguments and time limit, and its most recent calls. Nothing on it is editable: the pipeline file is where an export changes.

Connecting an agent

An export's address is <external-url>/mcp/x/<pipeline>/<export>. Give it to an agent that speaks MCP over HTTP with OAuth — Claude, Claude Code, Cursor — and it does the rest: it finds the daemon's sign-in through the address's protected-resource metadata, registers itself, and sends you to the daemon to sign in and agree.

The daemon asks every time, on a page that says plainly what is being agreed to:

Deny has the focus. Nothing is issued until you press Allow: a site that registered itself cannot collect a token by sending your signed-in browser to the daemon, because all that browser gets is this page.

What a connected agent can do

Disconnecting an agent

connections, in the menu under your name, lists every agent you have let connect: the name it gave itself (unverified), where it sends people back, which export, when you agreed, when it last called and how many times. Revoke asks once more, then ends every token the agent holds for that export — its next call fails, and it cannot refresh its way back. An admin can switch the page to everyone and disconnect anybody's agent. Both are recorded in the activity log as mcp disconnect.

Backing a resource type with MCP

mcp_servers:
- name: linear
  endpoint: https://mcp.linear.app/mcp
  auth: { type: oauth }

resource_types:
- name: linear-issues
  config:
    mcp:
      server: linear
      check:
        tool: list_issues    # called with the source below as its arguments;
                             # must return an oldest-first JSON array of
                             # version objects
      out:
        tool: create_issue   # optional — enables `put`; called with the put's params:

resources:
- name: eng-bugs
  type: linear-issues
  source:                    # IS list_issues' argument object (see args: below)
    team: ENG
    label: bug

jobs:
- name: react
  plan:
  - get: eng-bugs
    trigger: true
  - task: record
    inputs: [eng-bugs]
    run: cat eng-bugs/version.json
    assert:
      stdout: ENG-204        # the suite's server reports ENG-101 then ENG-204,
                             # oldest first — so the get took the LATEST
  assert:
    execution: [eng-bugs, record]
    outcome: succeeded

Naming the arguments: args:

source: and params: only work as arguments when their keys already match the tool's parameters. When they don't — or when the value the tool needs lives on the version a check produced, which is the usual shape for in: — name the mapping instead. Every string in it is a template over exactly what that stage has, the same as a shell check/in/out command: check renders against {source, version}, in against {source, version, params}, out against {source, params}.

check's version is the check cursor — the version the last successful check reported — and args: is the only way to reach it. A check with no args: still sends the source: alone: that payload is the tool's own published schema, and no third-party server declares a parameter steps invented.

mcp_servers:
- name: slack
  endpoint: https://mcp.slack.com/mcp
  auth: { type: oauth }

resource_types:
- name: slack-thread
  config:
    mcp:
      server: slack
      check:
        tool: slack_search_public_and_private   # source: is already {query: ...}
      in:
        tool: slack_read_thread                 # needs the version's fields
        args:
          channel_id: "{{ .version.channel }}"
          message_ts: "{{ .version.ts }}"
      out:
        tool: slack_send_message
        args:
          channel_id: "{{ .params.channel }}"
          thread_ts: "{{ .params.thread_ts }}"
          message: "{{ .params.text }}"         # the tool calls it `message`

resources:
- name: mentions
  type: slack-thread
  source:
    query: "to:me is:thread"

jobs:
- name: answer
  plan:
  - get: mentions
    trigger: true
  - task: read
    inputs: [mentions]
    run: cat mentions/content-0.txt   # slack_read_thread's text result
    assert:
      stdout: C0123456789 at 1717171717.000100   # the version's own fields,
                                                 # delivered through in.args:
  - put: mentions                     # answer in the thread the check found
    params:
      channel: C0123456789
      thread_ts: "1717171717.000100"
      text: on it
  assert:
    execution: [mentions, read, mentions]
    outcome: succeeded

When a tool returns prose: detect over HTTP, act over MCP

A check needs a machine-readable list, and not every MCP tool has one to give. Many vendor servers answer with Markdown written for a model to read — Slack's search returns {"results": "# Search Results for: …", …}, with no structuredContent and no published outputSchema. There is no list in there to select, at any nesting depth, so no mapping can make that tool a check. (This is not a niche accident: until SEP-2106 structuredContent was required to be a JSON object, so an array-returning tool was not even legal.)

The split that does work: let the vendor's HTTP API do the detecting, where the response is JSON with stable ids, and let MCP do the acting, where prose in the response costs nothing. Two resource types, one of each style:

mcp_servers:
- name: slack
  endpoint: https://mcp.slack.com/mcp
  auth: { type: oauth }

resource_types:
- name: slack-mentions          # DETECT: real JSON, stable {channel, ts}
  env: [SLACK_BOT_TOKEN]
  config:
    check: |
      channel={{ .source.channel | shellquote }}
      curl -sS -H "Authorization: Bearer $SLACK_BOT_TOKEN" \
        "https://slack.com/api/conversations.history?channel=$channel&limit=20" |
      jq -c --arg ch "$channel" '[.messages[] | {channel: $ch, ts: .ts}] | reverse'

- name: slack-reply             # ACT: publish-only, no check: to write
  config:
    mcp:
      server: slack
      out:
        tool: slack_send_message
        args:
          channel_id: "{{ .params.channel }}"
          message: "{{ .params.text }}"

resources:
- name: mentions
  type: slack-mentions
  source: { channel: C0123456789 }
- name: reply
  type: slack-reply
  source: {}

jobs:
- name: answer
  plan:
  - get: mentions
    trigger: true
  - task: compose
    inputs: [mentions]
    outputs: [msg]
    run: echo "on it" > msg/body
  - put: reply
    inputs: [msg]
    params:
      channel: C0123456789
      text: { file: msg/body }

The rule of thumb: a tool whose output a model was meant to read is an agent's tool, not a resource's. Grant it to an agent: step, where prose is exactly right, and keep check: on something that returns ids.

Preflight checks this before anything runs

Both ways an MCP call is wrong — a tool the server doesn't expose, and required arguments the call will never send — are answerable from the server's published tool list, without calling anything. So they are: steps run checks the resources its job touches before the first step, steps validate --live asks the same question on demand, and steps web checks every trigger: resource of a pipeline before polling it, and leaves the pipeline unpolled if one can't work — logged as trigger.unpollable, until a steps pipeline set changes the configuration. That last one is the point: a poll loop's reaction to a permanent misconfiguration is to log it and try again on the next interval, forever, with nothing enqueued and nothing red. A problem that waiting can fix — a server that did not answer, a token a refresh would renew — is logged once as a warning and left to the poll loop.

trigger preflight failed, nothing was polled:
  resource "mentions": check tool "slack_search_public_and_private" requires [query], which this call does not send (it sends: [to])
    (the resource's source: IS the argument object when mcp.check.args: is unset — name it there, or map it in mcp.check.args:)

--no-preflight skips it, as it does for models.

A shallower check runs earlier still, needs no network at all, and cannot be skipped: an mcp_servers: entry whose stdio command: is not on this machine's PATH, or whose auth.api_key_env names a variable that is unset or empty, is a preflight problem — the same treatment an agent's api_key_env gets. steps validate reports it, and steps pipeline set REFUSES a pipeline that has one, so a daemon never serves a pipeline whose tooling is already known to be broken. An auth: {type: oauth} server is deliberately not checked this way: its credential is a token file, and refusing the set would leave nothing to log in against.

Sending a file's contents: {file: ...} in params:

A shell out: runs with the put's read view as its working directory and reads what it needs. An MCP out: is a tool call with no working directory, so a value a previous step wrote needs a way in — otherwise the payload could only ever be text the pipeline author typed, which rules out publishing anything an agent produced.

A params: mapping whose only key is file is replaced by that file's contents:

mcp_servers:
- name: linear
  endpoint: https://mcp.linear.app/mcp
  auth: { type: oauth }

resource_types:
- name: linear-issues
  config:
    mcp:
      server: linear
      check: { tool: list_issues }
      out: { tool: create_issue }

resources:
- name: eng-bugs
  type: linear-issues
  source: { team: ENG }

jobs:
- name: file-a-bug
  plan:
  - task: investigate
    outputs: [report]
    run: echo 'the retry loop never backs off' > report/body.md
    assert:
      files: [report/body.md]
  - put: eng-bugs
    inputs: [report]
    params:
      title: Retry loop spins
      description: { file: report/body.md }   # <- contents, not the literal map
  assert:
    execution: [investigate, eng-bugs]
    outcome: succeeded

Authorizing an oauth server: steps mcp login

A bearer-configured server needs no login step — it reads its token from the environment at run time. An oauth-configured server needs a one-time interactive authorization:

steps mcp login linear -c pipeline.yml                                  # authorize THIS machine
steps mcp login linear -p app --target https://ops:[email protected]   # authorize a daemon

Either one runs the OAuth 2.1 authorization-code + PKCE flow: discovers the server's metadata, dynamically registers a client, opens your browser, and prints where the token was saved. Which machine ends up holding the token is the whole difference, and it is chosen by which pipeline you name — a file here (-c), or one a daemon serves (-p). See Authorizing a daemon for the second.

Authorizing a daemon

A token belongs on the machine that spends it, and for a pipeline set into steps web that is the daemon — often a machine with no browser, which therefore cannot be the loopback address a redirect comes back to. So the daemon runs the flow, and your terminal plays only the browser's half:

steps mcp login linear -p app --target https://ops:[email protected]
  1. The daemon resolves linear from the configuration it is serving for app — not from a file on your disk — so the token is bound to the endpoint that pipeline will actually dial.
  2. It discovers, registers a client whose redirect URI is <target>/mcp/callback, and hands the authorization URL back; the CLI prints it and opens your browser.
  3. The authorization server redirects the browser to the daemon, which exchanges the code and saves the token on its own disk. The PKCE verifier and the token never leave it.
  4. The CLI reports the outcome in the flow's own words — including "authorized, but this token cannot be renewed" — and the daemon's next poll or run uses the token. Nothing restarts.

What this means for the daemon. It now holds refresh tokens for third-party services, on whatever address it listens on. steps pipeline set already makes that machine one that runs arbitrary commands, so it was never less than fully trusted — but a token for your issue tracker is a way off the box that command execution on it is not. Generated credentials and TLS (authentication.md) stop being good practice and become the thing standing in front of those tokens.

Authorizing from the browser: the mcp tab

A daemon's web UI has an mcp tab for every pipeline that declares mcp_servers: — the same inventory steps mcp list prints, and, on an oauth server, a Connect button that finishes the login in the browser you are already looking at.

It is a strictly shorter path than the CLI rather than a second one. steps mcp login --target exists to get an authorization URL out of a daemon and into a browser that can reach that daemon: it starts the login over HTTP, polls until the daemon produces the URL, prints it, and shells out to $BROWSER. On the daemon's own page that problem is already solved — you are in a browser, talking to the daemon, authenticated — so what is left is a redirect:

  1. Connect posts to the daemon, which starts the same login steps mcp login starts. The redirect URI is built from your browser's own Origin, so a daemon behind a TLS proxy registers the https:// address you actually reached it on.
  2. The daemon waits out discovery and registration (up to 10 seconds) and answers 303 straight to the provider's consent screen.
  3. The provider redirects back to GET /mcp/callback, which saves nothing you can see and sends you back to the tab.
  4. The token exchange finishes after that redirect, so the tab is what reports the outcome — including a login that authorized and then failed. The page reads the same status the CLI polls.

A red run links here. A job that died on an mcp server — an unauthorized token, a server that did not answer — carries a line under its job error naming that server and linking straight at its row on this tab. That is the direction the question is actually asked from: nobody opens the mcp tab speculatively, they get a red run and want to know why the agent's tools failed. The line appears only for a failure that names a server, and only while the pipeline still declares one.

The tab leads with what cannot be used. Servers needing attention — a missing credential, a login in flight, a server that did not answer — sort above the rest with a count, each keeping the file's own order inside its group. One server is one row: status first, what the server IS on a dimmed second line (http · oauth · mcp.linear.app/mcp, full endpoint on hover), and the action in the row it acts on.

The status column answers "is this pipeline's tooling wired up?" without running a job, and it is never probed on page load: it comes from the configuration, this machine's environment and PATH, and the saved token file. A per-server Test button is the only thing that connects to anything, and it runs detached — the click returns at once, the row says testing…, and the result arrives on the page's own refresh, carrying the tool names the server answered with.

Test is offered only where a connection could succeed, and the daemon refuses one that could not, the same way steps mcp list declines to dial a server whose credential is already missing. A probe of an unauthorized server answers with the problem the status cell has just stated, in the words of whatever refused it — one problem in two vocabularies, the second long enough to set the width of the page. A probe that fails outranks the static answer: the static check only ever said a request could be made, and the probe is the request, so the row reads ✗ did not answer rather than keeping a tick beside a red failure.

Three things worth knowing:

A missing bearer variable or a stdio command that is not installed is refused by steps pipeline set before a daemon will serve the pipeline at all (see Preflight checks this before anything runs), so on a served pipeline those cells normally read ✓ — they turn ✗ when the machine changes underneath a running daemon.

Servers without dynamic client registration

The flow above discovers the authorization server, then registers a client with it on the fly. Some servers don't offer that — Slack's, for one, requires every client to be backed by a pre-registered app with a fixed ID. Against those, login fails during discovery, before your browser ever opens:

steps: error: mcp server "slack": authorization server does not support dynamic
  client registration; register an application with it and set auth.client_id
  (plus auth.client_secret_env if it issued a secret)

Register the application yourself, then name its credentials:

mcp_servers:
- name: slack
  endpoint: https://mcp.slack.com/mcp
  auth:
    type: oauth
    client_id: "1234567890.9876543210"   # public app identifier
    client_secret_env: SLACK_CLIENT_SECRET
    callback_port: 3118                  # register http://127.0.0.1:3118/callback
                                         # (and https://<daemon>/mcp/callback, to
                                         # authorize a daemon — callback_port is
                                         # the loopback login's alone)

agents:
- name: responder
  source: { model: openrouter/qwen/qwen3.7-flash, api_key_env: OPENROUTER_API_KEY }
  tools:
  - mcp: slack

jobs:
- name: respond
  plan:
  - agent: responder
    messages:
      - "Summarize today's mentions."