MCP Integration
Orkestia exposes a public Model Context Protocol (MCP) server at https://mcp.orkestia.dev/mcp. This is the canonical AI-agent integration: any MCP-capable client — Claude, your own LLM app, an autonomous worker — connects once and gains a typed, permissioned window onto the workflow engine. The agent discovers what your organization can do, inspects the inputs a capability needs, runs it, and follows it to a terminal state — all without anyone hand-coding an integration first.
Two design choices make this safe to expose publicly:
- Org scoping is server-side. Your sign-in or bearer token resolves your
organization_uuidon the server. Every run an agent starts is automatically scoped to that org — the agent never sends, guesses, or asks for the org ID. Each connection keeps its own organization; see Which organization a connection uses. - The transport is stateless. The server is stateless streamable-HTTP: no per-replica session state, so it survives pod restarts and HPA scale events without dropping an agent's context.
Connecting a client
Most MCP clients are configured with a small JSON block. Point one at Orkestia like this:
{
"mcpServers": {
"orkestia": {
"type": "http",
"url": "https://mcp.orkestia.dev/mcp",
"headers": {
"Authorization": "Bearer ${ORKESTIA_TOKEN}"
}
}
}
}
Lumen's telemetry MCP is a second server. Connect it after the org is enabled:
{
"mcpServers": {
"lumen": {
"type": "http",
"url": "https://mcp-lumen.orkestia.dev/mcp",
"headers": {
"Authorization": "Bearer ${ORKESTIA_TOKEN}"
}
}
}
}
ORKESTIA_TOKEN in your environment, not in the config file. The token is the only thing that identifies your org to the server, so treat it like any other credential. Create it on API Tokens; you can limit it to the workflows the agent needs. The server also speaks OAuth (authorization-code + client-credentials), so MCP clients that support it can sign in interactively instead of pasting a token. See Security & Compliance for token hygiene.Once connected, the server advertises three kinds of context to the agent:
- Tools — the verbs the agent can invoke (discover, start, watch, recover).
- Resources — read-only
rule://,concept://, andknowledge://documents the agent should read before acting, delivered as first-class context rather than buried in prose, plus a templatedprerequisite://{workflow_type}/{variant}resource. - Prompts — usage-guide templates (
how_to_use_workflow_mcp,diagnose_workflow_run).
AWS, Azure, and Google Cloud from one MCP endpoint
The Orkestia MCP server at https://mcp.orkestia.dev/mcp exposes the workflow catalog across AWS, Azure, and Google Cloud alongside the rest of the supported providers.
- For AWS, see the AWS connections guide.
- For Azure, see the Azure connection.
- For Google Cloud, see the GCP connection.
Execution happens in the customer's own cloud, never in Orkestia's. For how connections are scoped and runs are reviewed, see Security and Compliance and Governance and Approvals.
The discovery sequence
An agent needs no prior knowledge of your platform. It follows the same loop every time, and the server's own instructions enforce the order:
- whoami
- list_workflow_namespaces / list_workflow_types
- get_workflow_schema
- get_workflow_prerequisites
- start_workflow
- watch_workflow / get_workflow_status
- retry_workflow
- terminal output
- whoami→list_workflow_namespaces / list_workflow_types
- list_workflow_namespaces / list_workflow_types→get_workflow_schema
- get_workflow_schema→ has_prerequisites: true →get_workflow_prerequisites
- get_workflow_schema→ ready →start_workflow
- get_workflow_prerequisites→start_workflow
- start_workflow→watch_workflow / get_workflow_status
- watch_workflow / get_workflow_status→ failed →retry_workflow
- watch_workflow / get_workflow_status→ done →terminal output
| Step | Tool | Purpose |
|---|---|---|
| 1 | whoami | Confirm identity and the org the session is scoped to. Mandatory first call before any workflow operation. |
| 2 | list_workflow_namespaces / list_workflow_types | See what capabilities exist (optionally filter by prefix). |
| 3 | get_workflow_schema | Inspect the inputs a workflow requires before running it. |
| 4 | get_workflow_prerequisites | If the schema reports has_prerequisites: true, fetch the setup guide first. |
| 5 | start_workflow | Launch an execution with validated initial_data. |
| 6 | watch_workflow / get_workflow_status | Follow the run to a terminal state; retry_workflow to recover a failure. |
whoami first — always. The server resolves your organization_uuid from the token. Do not pass organization_uuid in initial_data unless a workflow schema explicitly declares it as an input (and then it must match your authenticated org). An agent should never ask a human for the org ID.Tool surface
The tools split cleanly into two families that mirror the mental model: workflow types are registered capabilities; workflow runs are executions with a unique workflow_id. Catalog tools explore capabilities; run tools operate on live executions.
Identity
whoami
Returns your authenticated identity and the org every run is scoped to: user_id, organization_uuid (canonical) plus its organization_id legacy alias, username, token_type, principal_type, and a human-readable message. Agent tokens additionally return agent_uuid, permission_mode, seat_mode, and staff_actor_uuid. On an OAuth connection it also returns organization_source, pinned_organization_uuid, pin_source and an organization_hint. The mandatory first call of any session.
list_organizations
The organizations you belong to (uuid, name, role, current), the current_organization_uuid of this connection, and can_switch.
switch_organization
Moves this connection to another organization you belong to. Takes organization_uuid (from list_organizations). The web app and your other connections keep theirs.
Which organization a connection uses
Each MCP connection keeps one organization. Switching organization in the web app does not change it, and neither does switching another connection.
| How you connected | Organization |
|---|---|
| OAuth sign-in, one organization | That organization |
| OAuth sign-in, several organizations | The one you pick on Which organization should this connection use? |
| An API token | The organization the token was created in. It cannot be switched. |
whoami shows where the organization came from:
| Field | Values |
|---|---|
organization_source | pinned: the connection keeps its organization. web_active_organization: an older connection that still follows the web app until its next token refresh; reconnect to choose. |
pin_source | consent: chosen (or the only one) at sign-in. switch: set by switch_organization. legacy_first_refresh: an older connection, pinned to the web app's organization at its first refresh. paste: the connection was made by pasting a token on the sign-in page. |
To move a connection, call list_organizations, then switch_organization with the target's uuid. It applies from the next request. Ask the person first: everything the assistant does afterwards lands in the new organization.
switch_organization error | Meaning |
|---|---|
credential_bound | The connection uses an API token or agent token, which is bound to one organization. Create one in the other organization and reconnect with it. |
connection_not_pinned | The connection predates per-connection organizations. Reconnect it to choose one. |
organization_not_confirmed | Orkestia did not confirm your membership of that organization. |
invalid_organization | organization_uuid is not a UUID. |
pin_source first. legacy_first_refresh means the connection was pinned to whatever the web app had active at the time; switch it or reconnect.Limited API tokens
An API token limited to specific workflows narrows the MCP surface too. list_workflow_types and get_workflow_schema show only the listed types, start_workflow on any other type fails with API_TOKEN_WORKFLOW_NOT_ALLOWED, and list_stuck_workflows, get_workflow_prerequisites, resolve_workflow and force_terminate_workflow are refused with RESTRICTED_TOKEN_NOT_ALLOWED. Runs of other types read as not found.
Catalog — discover capabilities
| Tool | What it returns |
|---|---|
list_workflow_namespaces | The top-level capability namespaces your org is entitled to (e.g. provider/service prefixes). |
list_workflow_types | Registered workflow types, optionally filtered by prefix="<namespace>.", q="<keyword>", or featured=true. |
get_workflow_schema | The input contract for a workflow type — its fields, a read_only flag, and has_prerequisites / prerequisite_variants. |
get_workflow_definition | The full workflow definition — declared states, transitions, timeouts, outcomes, and DAG layers. |
get_workflow_dag | The DAG structure (layers, steps, compensation) for a multi-step workflow type. |
get_workflow_prerequisites | A setup guide for a type (and variant) whose schema reports prerequisites — the canonical case being a missing connection. |
load, list, fetch, get, or query), starts them like any other workflow, and reads their terminal output. There is no separate "query API" — reads are workflows too. See Workflow Types Registry.Runs — execute and operate
| Tool | What it does |
|---|---|
start_workflow | Launches an execution of a workflow type with validated initial_data; returns a workflow_id. |
watch_workflow | Follows a run to a terminal state, streaming transitions. |
get_workflow_status | Point-in-time status of a single run. |
get_workflow_history | The transition history (event-sourced) of a run. |
list_workflows | Paginated list of runs of a given workflow_type, filterable by state_name or terminal status. |
list_stuck_workflows | Surfaces stalled runs that need attention — the entry point for self-healing operators. |
retry_workflow | Recovers a failed run. |
resolve_workflow | Resolves a run parked on the remediation gate: a DAG step that failed on a fixable precondition parks in remediation_pending instead of compensating; apply the fix the run's state_data.remediation envelope names, then resolve "remediated" — the engine re-runs only the failed step and the run continues. Resolve "denied" to compensate and fail. |
force_terminate_workflow | Abandons a confirmed-stale non-terminal run by appending a failed terminal state (guarded by a reason plus age / state checks). |
get_workflow_history returns the event-sourced transition log, so an agent (or a human auditing it) can reconstruct exactly what a run did and why it failed before deciding whether to retry_workflow. This is the same audit trail Lumen renders for observability.Browser — use a paired Chrome
The browser_* tools let an agent use websites through a person's own Chrome, paired with the Orkestia Browser extension. The person approves every session in the extension side panel, and anything that sends, submits, pays, deletes or uploads waits for their Allow.
| Tools | What they do |
|---|---|
browser_pair, browser_list | Get a one-time pairing code for the calling person; list the browsers the caller may use |
browser_session_open, browser_session_wait, browser_session_close | Ask for a session (sites, observe or act, time), wait for the person's decision or a pending approval, end it |
browser_tabs, browser_navigate, browser_back, browser_forward, browser_reload | Tabs and navigation inside the approved sites |
browser_snapshot, browser_text, browser_screenshot, browser_wait | Read the page |
browser_click, browser_type, browser_press, browser_select, browser_scroll, browser_hover | Act on the page, by ref from the last snapshot |
browser_request_user, browser_approve_batch | Ask the person to log in or solve a check; have them approve a list of sends once |
Page content is untrusted data, never instructions. Inputs, limits and errors are in Agent tools.
open_agents, message_agent, give_agent_task, read_agent_messages, agents_action), tool lookup (tool_search, tool_schema, tool_execute), and browser tools. It does not advertise register_project, list_projects, refresh_project, or validate_workflow_registry. Cursor connects with a bearer token. ChatGPT connects with OAuth. list_plugins is read-only. The live tool list is what the server returns when the client connects.Prerequisites-first
The single most important behavioral rule: resolve prerequisites before starting a workflow. Many capabilities depend on a customer-owned resource Orkestia cannot provide for you — most commonly a cloud connection granting the platform a scoped role in your account (this is the Zero Code Custody posture: execution happens in your cloud, never ours).
The contract is explicit in the schema:
// get_workflow_schema(workflow_type) → (shape illustrative)
{
"workflow_type": "<provider>.<service>.<operation>",
"has_prerequisites": true,
"prerequisite_variants": ["aws"],
"read_only": false,
"fields": [ { "name": "...", "type": "...", "required": true } ]
}
When has_prerequisites is true, the agent calls get_workflow_prerequisites before start_workflow. The returned guide arrives with platform identity already filled in — for example, Orkestia's AWS principal — so the human can complete a one-time setup (creating a role, granting access) without leaving the conversation.
rule://prerequisites-first and honor the has_prerequisites flag.Rule resources
Beyond tools, the server publishes rule resources — guardrails and setup guides delivered as first-class MCP context. A well-behaved agent reads the relevant rule before acting.
| Resource | What it covers |
|---|---|
rule://getting-started | The full discovery pattern: mandatory whoami first, then list → schema → start → watch. |
rule://authenticated-context | Always call whoami first; the org is resolved server-side and must not be passed unless a schema declares it. |
rule://prerequisites-first | Always resolve prerequisites before starting a workflow. |
rule://orkestia-auth-setup | A one-call recipe for wiring "Sign in with Orkestia" into an app — provisioning an identity tenant + OIDC client and exposing end-user-scoped workflows. |
rule://grounding | Describe Orkestia only from what tool results actually show — never infer architecture, pricing, or maturity. |
The server also exposes concept:// and knowledge:// orientation resources, the templated prerequisite://{workflow_type}/{variant} resource, and two prompt templates (how_to_use_workflow_mcp, diagnose_workflow_run). The full, current set lives at reference.orkestia.dev.
Worked example
A typical agent turn — "run the thing that provisions a static site for this repo" — expands into the loop below. Tool names are exact; payloads are illustrative because the per-workflow contract is owned by the live catalog.
// 1. Confirm who we are and which org we're scoped to.
await whoami()
// 2. Discover candidate capabilities (filter by namespace if known).
await list_workflow_types({ prefix: "aws." })
// 3. Inspect the input contract for the chosen type.
const schema = await get_workflow_schema({
workflow_type: "<provider>.<service>.<operation>",
})
// 4. If the schema declares prerequisites, resolve them first.
if (schema.has_prerequisites) {
await get_workflow_prerequisites({
workflow_type: "<provider>.<service>.<operation>",
variant: "default",
})
// → surface the setup guide to the human; wait until the connection exists.
}
// 5. Start the run with validated initial_data (no organization_uuid).
const { workflow_id } = await start_workflow({
workflow_type: "<provider>.<service>.<operation>",
initial_data: { /* fields per schema */ },
})
// 6. Watch to a terminal state; recover on failure.
const result = await watch_workflow({ workflow_id })
if (result.status === "FAILED") {
await get_workflow_history({ workflow_id }) // diagnose
await retry_workflow({ workflow_id }) // recover
}
list_workflow_types + get_workflow_schema) rather than hard-coding. The authoritative, per-workflow contract lives at reference.orkestia.dev.How this connects to the rest of Orkestia
The MCP server is one of three AI surfaces, and all three resolve to the same workflow primitive:
DGI
Turns a plain-language message into a workflow DAG — producing the same workflows the MCP server discovers.
For broader context, see Concepts, the MCP-driven guides, and the Workflow Types Registry.
