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.
| Access | Scopes | Tools |
|---|---|---|
| Read | mcp:read | list_runs, get_run, get_job_logs, wait_for_run, list_workflows. |
| Operator | mcp:read + mcp:write | All read tools plus rerun_run, cancel_run, and dispatch_workflow. No access to secrets. |
| Operator + secrets | mcp:read + mcp:write + mcp:secrets | All 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 a token
Organization owners and administrators create credentials from Organization settings. The cleartext credential is returned once.
- 1
Open AI agent access
In Organization settings, find the MCP token manager. Confirm the active organization and plan before issuing. - 2
Name the owner and purpose
Use a specific name such asrelease-agent-production, notdefault. The name appears in run actor and audit metadata. - 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
Copy once
Store thernmcp_…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
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.
[mcp_servers.runnable]
url = "https://runnable.cloud/api/mcp"
bearer_token_env_var = "RUNNABLE_MCP_TOKEN"
default_tools_approval_mode = "writes"
tool_timeout_sec = 35In 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.
{
"mcpServers": {
"runnable": {
"url": "https://runnable.cloud/api/mcp",
"headers": {
"Authorization": "Bearer rnmcp_REPLACE_ME"
}
}
}
}Do not commit the header
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
Find, then inspect
Uselist_runswith a repository/status filter, thenget_run. Do not mutate from a list summary alone. - 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
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
Wait without rapid polling
Callwait_for_run, pass its returned cursor into the next call, and stop whenterminalis true. - 5
Inspect the final state
Callget_runafter terminal to capture full job, attempt, and step evidence.
Audited operations
Rotate and revoke tokens
MCP token replacement supports a safe overlap: create the new token, verify it, then revoke the old token.
- 1
Create a replacement
Match or narrow the old token’s scope and choose a new expiry. Give the replacement a versioned name. - 2
Update one client
Replace the secret, restart/reload the MCP client, and verifylist_workflowsorlist_runs. - 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
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.
| Signal | Cause | Recovery |
|---|---|---|
| 401 Missing MCP bearer token | Authorization header absent or not Bearer. | Configure the header/token environment and restart the client. |
| 401 Invalid MCP bearer token | Bad prefix/length or unknown hash. | Copy the complete rnmcp_ credential; issue a replacement if lost. |
| 401 invalid or expired | Token expired or was revoked. | Issue a new token and remove the stale client secret. |
| 403 subscription required | The token’s organization has no active or trialing subscription. | Activate or restore any Runnable plan. |
| 403 missing read scope | Credential record is malformed or scope was removed. | Reissue a correctly scoped token. |
| Host/origin rejection | Client sends an origin/host outside the deployment allowlist. | Use the production endpoint or ask the operator to add a trusted MCP origin. |
| Tool is unavailable | Read token requested an operator-only tool. | Use a separately authorized operator credential only if the workflow requires it. |
| isError: Run/Job/Workflow not found | Wrong ID, wrong organization, expired object, or stale workflow ID. | List within this token’s organization and retry with the returned ID. |

