Runnable

Automate

Connect an MCP client

Runnable exposes a stateless Streamable HTTP MCP endpoint for organization-scoped CI observation and tightly controlled run operations.

Entitlement and scopes

MCP is included with every Runnable plan and requires an active trial or subscription. Every request revalidates subscription status, token expiry, revocation, organization, and scopes.

AccessScopesTools
Readmcp:readlist_runs, get_run, get_job_logs, wait_for_run, list_workflows.
Operatormcp:read + mcp:writeAll read tools plus rerun_run, cancel_run, and dispatch_workflow. No access to secrets.
Operator + secretsmcp:read + mcp:write + mcp:secretsAll operator tools plus list_secrets and set_secret. Grant only when an agent needs to configure a repository: this token can replace the credentials your builds run with. Values are write-only — no tool returns one, and a replaced value cannot be recovered.

Default to read access

Issue an operator token only when the agent must change run state. A read token can fully diagnose status, steps, logs, and workflow availability without mutation authority.

Issue a token

Organization owners and administrators create credentials from Organization settings. The cleartext credential is returned once.

  1. 1

    Open AI agent access

    In Organization settings, find the MCP token manager. Confirm the active organization and plan before issuing.
  2. 2

    Name the owner and purpose

    Use a specific name such as release-agent-production, not default. The name appears in run actor and audit metadata.
  3. 3

    Choose access and expiry

    Select Read, Operator, or Operator + secrets, and 1–365 days. The default expiry is 90 days. Grant secrets only when the agent must configure a repository.
  4. 4

    Copy once

    Store the rnmcp_… credential in the client’s secret store or environment. Runnable retains only a SHA-256 hash and display prefix.

The token is an organization credential

It is not tied to the dashboard’s current organization after issuance. Anyone holding it receives the token’s organization and scopes until expiry or revocation.

Connect supported clients

The endpoint is https://runnable.cloud/api/mcp and uses Streamable HTTP with Authorization: Bearer rnmcp_… on every request.

Codex CLI, IDE extension, and ChatGPT desktop app

These clients share Codex MCP configuration. Put the token in RUNNABLE_MCP_TOKEN, then add the server to ~/.codex/config.toml or a trusted project’s .codex/config.toml.

.codex/config.tomlTOML
[mcp_servers.runnable]
url = "https://runnable.cloud/api/mcp"
bearer_token_env_var = "RUNNABLE_MCP_TOKEN"
default_tools_approval_mode = "writes"
tool_timeout_sec = 35

In the desktop app or IDE, open Settings → MCP servers → Add server, choose Streamable HTTP, enter the endpoint, and configure bearer authentication. Restart the client, then use /mcp or the server list to confirm the connection. See the official Codex MCP configuration reference.

URL-and-header JSON clients

For clients whose MCP file accepts a remote URL and static headers, use this shape. Prefer the client’s environment interpolation or secret store over committing the credential.

mcp.jsonJSON
{
  "mcpServers": {
    "runnable": {
      "url": "https://runnable.cloud/api/mcp",
      "headers": {
        "Authorization": "Bearer rnmcp_REPLACE_ME"
      }
    }
  }
}

Do not commit the header

If the client cannot read an environment variable or secret store, keep its local MCP configuration outside the repository and restrict filesystem access.

Use a safe agent workflow

Runnable’s tool annotations distinguish read-only, destructive, and non-idempotent operations, but the agent still needs an explicit operational pattern.

  1. 1

    Find, then inspect

    Use list_runs with a repository/status filter, then get_run. Do not mutate from a list summary alone.
  2. 2

    Read the smallest useful log tail

    Start with the failed job’s default 400 lines / 100,000 bytes. Expand only if the failure context is missing.
  3. 3

    Choose the correct mutation

    Rerun failed-only for a diagnosed transient result at the same source revision. Dispatch after a newer fix. Cancel only obsolete unfinished work.
  4. 4

    Wait without rapid polling

    Call wait_for_run, pass its returned cursor into the next call, and stop when terminal is true.
  5. 5

    Inspect the final state

    Call get_run after terminal to capture full job, attempt, and step evidence.

Audited operations

MCP log reads and mutations write organization audit events with the token ID/name. Masked logs are still operational data; grant access accordingly.

Rotate and revoke tokens

MCP token replacement supports a safe overlap: create the new token, verify it, then revoke the old token.

  1. 1

    Create a replacement

    Match or narrow the old token’s scope and choose a new expiry. Give the replacement a versioned name.
  2. 2

    Update one client

    Replace the secret, restart/reload the MCP client, and verify list_workflows or list_runs.
  3. 3

    Update remaining clients

    Use the token’s last-used timestamp and owner inventory to find consumers. Do not share one token across unrelated agents.
  4. 4

    Revoke the old token

    Revocation is immediate. An already-revoked token returns not found if revocation is repeated through the customer API.

Authentication and transport errors

HTTP errors happen before tool invocation. Tool failures are valid MCP responses with isError: true and a human-readable text message.

SignalCauseRecovery
401 Missing MCP bearer tokenAuthorization header absent or not Bearer.Configure the header/token environment and restart the client.
401 Invalid MCP bearer tokenBad prefix/length or unknown hash.Copy the complete rnmcp_ credential; issue a replacement if lost.
401 invalid or expiredToken expired or was revoked.Issue a new token and remove the stale client secret.
403 subscription requiredThe token’s organization has no active or trialing subscription.Activate or restore any Runnable plan.
403 missing read scopeCredential record is malformed or scope was removed.Reissue a correctly scoped token.
Host/origin rejectionClient sends an origin/host outside the deployment allowlist.Use the production endpoint or ask the operator to add a trusted MCP origin.
Tool is unavailableRead token requested an operator-only tool.Use a separately authorized operator credential only if the workflow requires it.
isError: Run/Job/Workflow not foundWrong ID, wrong organization, expired object, or stale workflow ID.List within this token’s organization and retry with the returned ID.
NextMCP tool referenceSee exact inputs, returned structures, annotations, and examples for all eight tools.