Connect coding agents to your platform with MCP
The orun MCP server gives a coding agent the same view of your platform that your team has. Instead of inferring ownership, conventions, and deployment state from whichever files it happens to open, the agent asks: who owns this service, why did the last production run fail, what does this task allow me to touch. It then opens its pull request with the lineage your review checks expect.
It is a local Model Context Protocol server built into
the orun binary, so there is nothing else to install. This page sets it up; the
orun mcp reference lists every tool and flag.
What an agent can do with it
| The agent asks | What answers it |
|---|---|
"Who owns billing-worker, and what depends on it?" | The service catalog, derived from your component.yaml files and CODEOWNERS |
| "Why did the last production run fail?" | Run history, the plan's job statuses, and the failing job's logs |
"What does task AC-3 require, and is it done?" | The task's contract and its derived status |
| "Which feature flags are on in staging?" | Configuration at the project and environment scope |
| "Open the PR for what I just built." | pr_open, which names the branch, pushes it, and writes the manifest block into the body |
Every answer comes from the platform's record, not from the agent's guess, and every call runs with your own credentials.
What you need
- The
orunbinary on yourPATH. See installation. - An Orunbase account for the platform tools (catalog, runs, logs, tasks, config). Orunbase is the hosted control plane for orun, and the MCP server is included on every plan, the free one too.
- A repository checkout for
pr_open. It needs git, not an Orunbase account.
Without an Orunbase sign-in the server still starts. Inside a repository it serves
pr_open, and it always serves connection_info, which tells the agent what is missing
and how to fix it.
Set it up
1. Install orun and sign in
curl -fsSL https://orun.dev/install.sh | bash
orun auth login
orun auth login signs you in through your browser, or with a device code if you add
--device. The MCP server reuses that session; there is no separate MCP credential.
2. Register the server with your agent
Claude Code
claude mcp add orun -- orun mcp serve
Cursor: add this to .cursor/mcp.json in the project, or ~/.cursor/mcp.json for
every project.
{
"mcpServers": {
"orun": { "command": "orun", "args": ["mcp", "serve"] }
}
}
VS Code: add this to .vscode/mcp.json.
{
"servers": {
"orun": { "type": "stdio", "command": "orun", "args": ["mcp", "serve"] }
}
}
Any other MCP client: a stdio server whose command is orun and whose arguments are
mcp serve.
3. Check it
orun mcp doctor
orun mcp tools
orun mcp doctor checks the binary your client will launch, your session, which workspace
resolves, and whether the backend answers. It ends with the exact registration line to
paste, using the binary's absolute path. orun mcp tools prints every tool the server will
advertise.
Then ask your agent something only your platform knows, such as "which services in this workspace have no owner?"
Choose a workspace
Platform tools take a workspace argument, so one server reaches every workspace you
belong to. When the server can work out a default, the agent can leave the argument out.
The default comes from, in order: --workspace, the ORUN_WORKSPACE variable, the
repository's intent.yaml, the workspace the repository is linked to, and finally the one
chosen with orun workspace use. To pin one for the server:
claude mcp add orun -- orun mcp serve --workspace ws_123
Keep it safe
- Your permissions, not more. Every platform tool calls the Orunbase API as you, so role-based access, rate limits, and the audit log apply exactly as they do to you. Each call is marked as coming from MCP in the audit log.
- Read-only when you want it.
orun mcp serve --read-onlyremoves every platform write from the tool list and blocks them if called.pr_openstays, because opening a pull request is how an agent delivers its work. - Secrets stay secret. Agents can list secret names, versions, and rotation state. Values are never returned.
- Retries do not duplicate. Every write carries an idempotency key, so a retried call replays instead of creating a second project or invitation.
Hosted agents and CI
For clients that cannot run a local binary, such as hosted agents or CI jobs, Orunbase serves the same platform tools over Streamable HTTP, read-only for now. The names, schemas, and behaviour are identical, so prompts work against either. See Orunbase's MCP docs.
Give the agent your conventions too
The MCP server answers questions about the platform's state. Two other commands give an agent the platform's conventions:
orun skills pull --client claude-codeinstalls the hosted playbooks agents follow for tasks, branches, and pull requests.orun agent contextprints the base literacy every orun agent type starts from.
Agents in orun repositories explains how the pieces fit together.
Troubleshooting
| Symptom | Fix |
|---|---|
| The client lists no orun tools | Run orun mcp doctor. A different orun earlier on the client's PATH is the most common cause; register the absolute path doctor prints. |
Only connection_info appears | You are not signed in, or the server started outside a repository. Call connection_info or run orun mcp doctor to see which. |
Tools ask for a workspace every time | No default resolved. Link the repository with orun cloud link, choose one with orun workspace use, or pass --workspace. |
A tool returns forbidden | Your role in that workspace does not allow the call. access_explain shows your effective permissions. |
Related
orun mcp: every tool, flag, and subcommand- The task plane: contracts and derived status
- The agent runtime: sandboxed agents and tool policies
- What is platform discipline as code?