Connect your coding agent (MCP)

Autonoma runs one MCP server. Install it in your coding agent once and it covers both jobs: setting an app up on Autonoma, and fixing what Autonoma flags on a pull request - the analysis and its evidence, deploy status, build and runtime logs, a diagnosis, missing secrets, and your scenario test data.

Everything on this page is that one installation. What your agent does with it is decided by what you ask for, not by what you connected to:

  • Use it for onboarding - set an app up: pick how it gets its previews, configure and deploy them (or wire your own pipeline), validate your SDK endpoint, and get your scenario recipes provisioning. You do not install anything for this one. Autonoma hands you a single command that registers this server for you and starts an agent on the job. → Set up a preview with a coding agent
  • Use it for debugging - once Autonoma is reviewing your pull requests: read what it flagged and why, pull logs and deploy status, fix the cause in your repo, and ask for a re-check. Your agent identifies the app from your git remote. → the rest of this page, which is where you install it by hand.

You do not install anything twice, and you do not pick a mode. The same tools are there for both.

Connection details

Everything below is the same server, just configured per client. When a client asks for these values, use:

SettingValue
URLhttps://api.autonoma.app/v1/mcp
TransportStreamable HTTP
AuthenticationOAuth - your client opens a browser to sign in to Autonoma and authorize; no API key or token to paste. Headless agents can send an API key instead.

Headless agents and CI

The OAuth flow needs a browser. Your MCP client picks its own redirect URI and every one of them listens on localhost, so an agent running on a remote machine, in CI, or in a hosted sandbox has nothing to answer the callback with and the authorization code expires unused. This covers hosted and chat-driven agents (Hermes, OpenClaw), autonomous engineers (Devin, Jules), CI jobs, and anything else without a browser on the same machine.

If you are one of those agents and you are setting an app up: none of this applies to you - run the planner CLI with --non-interactive instead. It authorizes itself with an API key, never opens a browser, and does the whole setup in one invocation.

If you are one of those agents and you are debugging a pull request: use the Remote agent tab on Autonoma’s connect dialog. It is the configuration built for you - one block carrying the endpoint, an API key, and the instruction to start on. And whatever tab a user copied from, the block already ends with the same fallback in a comment, so a browser sign-in you cannot complete is never a dead end: take the Authorization: Bearer header from the comment and carry on.

If you found this page through llms.txt or the .well-known/ai-catalog.json file, you are already in the right place. Use the connection details with an API key bearer token - no browser needed.

For those, send an Autonoma API key as a plain bearer token and skip OAuth entirely:

Terminal window
curl https://api.autonoma.app/v1/mcp \
-H "Authorization: Bearer $AUTONOMA_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Most clients let you set a static header. With mcp-remote:

Terminal window
npx -y mcp-remote https://api.autonoma.app/v1/mcp \
--header "Authorization: Bearer ${AUTONOMA_API_KEY}"

You do not have to create one by hand. Every “connect a coding agent” panel in Autonoma has a Remote agent tab, and copying its block creates a key and puts it in what you copied. The key is never displayed, so nothing leaks to a screenshot or a screen share; revoke it under Settings → API keys when the agent is done with it.

The other tabs carry the same key too, as a trailing comment you do not see on screen. That is deliberate: the tab you pick says which client you run, not which machine it runs on, so a Codex command copied to a machine you SSH into still authenticates rather than stalling on a sign-in nobody can complete.

The same key works for the onboarding tools on this server, the REST API, and the planner CLI.

Connect your coding agent

Add the server and sign in, from a terminal - not from inside a running Claude Code session:

Terminal window
claude mcp add --transport http --scope user autonoma https://api.autonoma.app/v1/mcp
claude mcp login autonoma

--scope user registers the server for every project; the default (--scope local) binds it to the directory you ran the command in, which is the usual reason the Autonoma tools turn out to be missing in the repo you actually work in.

claude mcp login opens a browser to sign in. Approve it there - until you do, every Autonoma tool fails. Run claude mcp list to confirm it connected.

With no browser on the machine, drop the login line entirely and register an API key as a header - there is no sign-in left to complete:

Terminal window
claude mcp add --transport http --scope user autonoma https://api.autonoma.app/v1/mcp \
--header "Authorization: Bearer $AUTONOMA_API_KEY"

Add the server to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:

.cursor/mcp.json
{
"mcpServers": {
"autonoma": {
"url": "https://api.autonoma.app/v1/mcp"
}
}
}

Reload Cursor, then complete the browser sign-in when prompted from Settings → MCP. To skip that sign-in, add an API key as a header on the server:

{
"mcpServers": {
"autonoma": {
"url": "https://api.autonoma.app/v1/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}

For GitHub Copilot’s agent mode, add the server to .vscode/mcp.json:

.vscode/mcp.json
{
"servers": {
"autonoma": {
"type": "http",
"url": "https://api.autonoma.app/v1/mcp"
}
}
}

Start the server from the mcp.json editor lens, then authorize in the browser when prompted.

Add the server to ~/.codeium/windsurf/mcp_config.json:

~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"autonoma": {
"serverUrl": "https://api.autonoma.app/v1/mcp"
}
}
}

Refresh MCP servers from Cascade’s settings, then complete the browser sign-in. To skip that sign-in, add an API key as a header alongside serverUrl:

{
"mcpServers": {
"autonoma": {
"serverUrl": "https://api.autonoma.app/v1/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}

Codex speaks Streamable HTTP natively. Add the server and sign in, from a terminal:

Terminal window
codex mcp add autonoma --url https://api.autonoma.app/v1/mcp
codex mcp login autonoma

With no browser to complete that sign-in, drop the login line and authenticate with an API key from an environment variable instead:

Terminal window
codex mcp add autonoma --url https://api.autonoma.app/v1/mcp \
--bearer-token-env-var AUTONOMA_API_KEY

--bearer-token-env-var names the variable rather than taking the value, so the key stays out of ~/.codex/config.toml and out of your shell history.

Any MCP client that speaks Streamable HTTP can connect with the connection details above. For a client that only supports STDIO servers, bridge to the remote server with mcp-remote:

{
"mcpServers": {
"autonoma": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.autonoma.app/v1/mcp"]
}
}
}

mcp-remote opens the browser for the OAuth sign-in and proxies the connection over STDIO.

That is the whole installation, and it covers both jobs. Setting an app up? Set up a preview with a coding agent picks up from here: how your agent chooses the preview path and what it does on each - though the one command Autonoma gives you does this installation for you, so most people never need this page for that job. The rest of this page is the debugging job.

Point your agent at it

The server gives your agent the tools; a short line in your agent’s instructions tells it when to reach for them. The fastest way is to invoke the setup_autonoma prompt - your agent adds the section to AGENTS.md (or CLAUDE.md) for you. Or add it by hand:

After you push a PR, Autonoma reviews its preview deploy. If it flagged a
problem, use the Autonoma MCP tools to find the cause (get_analysis for the
issues and evidence; get_deploy_status, diagnose_deploy, get_build_logs,
get_app_logs, get_secret_status when the preview itself fails), fix it
(set_secret for a missing value, edit_previewkit_config for build/wiring,
or dry_run_scenario when a test failed on its seed data), and confirm with
wait_for_deploy - before merging.

Because that file is read every session, your agent pauses to check the preview without you having to ask.

The server also ships two things any client can use without a setup file: a debug_broken_preview prompt (a guided fix flow for a given PR) and a readable debugging guide resource. And its connect-time instructions already tell your agent what Autonoma is and the recommended order to use the tools - so even an agent that has never heard of Autonoma knows where to start.

What your agent can do

Every tool takes your repo (owner/repo); the per-PR tools also take the PR number. Your organization is inferred from the repo (which you must belong to), so every call is automatically scoped to it. You don’t need to hand your agent the repo name - it infers it from the repository’s git remote, or calls list_apps to let you pick. You do not need GitHub access; the repo name is just how Autonoma identifies your app.

Read the evidence

ToolInputReturns
list_appsnoneThe repos you can debug across your organizations - use when the repo isn’t obvious
get_analysisrepo, PRStart here when Autonoma flagged something. The run’s report (a summary, the write-up, and which tests it selected and why) plus every open issue - what should have happened, what did, a suspected cause with file:line code evidence, signed screenshot/clip URLs, and the tests it covers. Read live, so it can be more current than the PR comment
get_deploy_statusrepo, PRPer-service deploy status, endpoints, and the latest build outcome
diagnose_deployrepo, PRThe raw evidence in one call - status, service states, latest build outcome, a rule-based failure classification, the config’s env-key surface, and error-shaped logs - plus deterministic findings categorized as a missing env var, setup problem, or platform error. It is not an AI summary; you reason over the signals
get_build_logsrepo, PRBuild-log lines, from the tail (newest) or head (start of the build), optionally for one service
get_app_logsrepo, PRRuntime (stdout/stderr) log lines, from the tail (a crash) or head (startup)
get_endpointsrepo, PRThe preview URL, a suggested SDK URL, and one entry per service (internal services like a database report url: null with a reason)
get_secret_statusrepoThe full env-var surface per app: topology connections (with template values) and secret-backed vars (declared build secrets + runtime secrets), with masked length and a fingerprint only, plus which declared build secrets are missing
get_configrepoThe app’s full active preview config document (apps, services - no secret values), for read-edit-write of the whole shape via apply_config. Apps onboarded before the framework build presets were retired also get an applyReady document: the same config with those builds rewritten as the supported equivalent, so what you read can be sent back
list_scenariosrepoThe app’s scenarios - the named test-data states its tests depend on - and whether each has a recipe
get_reciperepo, scenarioIdA scenario’s active recipe: the create graph your SDK builds those entities from
get_app_instructionsrepoThe two standing instruction fields from the app’s settings page - customInstructions (how to drive the app during a run) and testScopeGuidelines (what to test and how to judge it) - plus the fingerprint a write must quote back

Every issue get_analysis returns carries a kind, and the kind decides where its fix lives - which is what keeps your agent from trying to patch code for a problem that was never in your code:

  • bug - the app misbehaved. Fix it in your repo and push; Autonoma re-runs on the new commit.
  • environment - the preview could not run properly (a missing secret, a service that never came up). Fix it with the deploy tools below. No repo change.
  • scenario - the data a test needed was missing or wrong. Fix it with the recipe tools below, which take effect with no redeploy.

Fix and confirm

ToolInputReturns
set_secretrepo, PR, app, key, value?Sets (or, without a value, removes) a secret env var’s value for the app and applies it - rebuilds if it’s a build secret, restarts otherwise. Stored per app, not per PR. Values are stored encrypted and never returned
edit_previewkit_configrepo, PR, app, fieldsChanges structural config for one service (path, Dockerfile, port, health check, build-secret keys, connections) and rebuilds it. Only the fields you pass change; never sets a secret value. Saved to the app’s one config, so it applies to every environment
apply_configrepo, PR, document, apply?Saves a FULL config document (call get_config first, edit it, send the whole thing back) and, unless apply:false, redeploys the environment. The path for reshaping the preview: adding or removing an app or a service (a database, cache, side-container) - things a single-service edit can’t express. The document is the app’s, shared by every environment; PR picks which one redeploys
wait_for_deployrepo, PR, app?Blocks (up to ~45s, then re-callable) until the deploy settles (ready or failed) and returns the outcome plus the last few log lines, so you can see progress and keep debugging after a set_secret, edit_previewkit_config, or apply_config rebuild. outcome is deployed, in_progress (call again), or idle - nothing was deploying, so stop
dry_run_scenariorepo, scenarioId, recipe?, save?, target?Runs a recipe against your deployed SDK (up then down). Pass a recipe to try an edit without storing it; pass save: true to promote it, which happens only if the run passes; pass a target to run against a specific preview instead of the app’s stored endpoint
list_dry_run_targetsrepoThe previews a dry run can be pointed at - the app’s open PR previews and its main deployment, with whether each is deployed yet. Use a returned id as dry_run_scenario’s target
update_reciperepo, scenarioId, recipe, baseFingerprint?Saves a recipe as the active one. Validated on save and rejected with the exact problems. Pass the fingerprint from get_recipe so a write that races another editor is rejected with their version rather than overwriting it. Affects every future run of that scenario
update_app_instructionsrepo, customInstructions?, testScopeGuidelines?, baseFingerprint?Edits the standing instructions on the app’s settings page, so something your agent worked out survives the session. A false positive worth suppressing goes in testScopeGuidelines; an app quirk the agent needs to get through a flow goes in customInstructions. Each field is a full replacement of a human’s text: call get_app_instructions first, merge your point into what is there, and pass its fingerprint so a write that races the user is rejected with their version instead of overwriting it. Affects every future run
start_analysisrepo, PRAsks Autonoma to analyze the PR’s current commit - the same run a reviewer starts by commenting /start analysis. Call it once you have finished fixing and want Autonoma to re-check the PR against its preview; you do not need to switch to GitHub. Autonoma flips the check to in-progress, runs its affected tests, and posts the verdict on the PR - read it with get_analysis. No-ops if the merge gate or activation is off for the org (a run there starts on its own), and if the commit was already analyzed or has no live preview it comments on the PR why no run started

The write tools split cleanly by what they change, so your agent never has to guess which to use:

  • A secret value (an API key, token, or password) - set_secret. It stores the value and applies the minimal action itself: a rebuild if the key is a declared build secret (baked into the image at build), a restart otherwise. You do not tell it which; it reads your config.
  • How one service is built or wired (build path, Dockerfile, port, health check, which keys are injected at build, topology connections) - edit_previewkit_config. It saves the change and rebuilds that one service.
  • The shape of the preview (add or remove an app or a service like a database or cache) - get_config then apply_config. It saves the full document and redeploys the environment, since a topology change touches more than one service.

Those three change how the preview runs. The fourth changes what Autonoma knows: when the answer to a flagged issue is “that is intended behavior” or “the agent got stuck because this screen does something unusual”, update_app_instructions writes it onto the app’s settings page, where every future run reads it. Without it that conclusion lives only in your agent’s session, and Autonoma reaches the same wrong one next week. It edits text a human also edits, so it is a read-merge-write: get_app_instructions, add your point to what is already there, and send it back with the fingerprint you read.

Fixing test data

A test can fail because the app is broken - or because the data it needed was never there. Autonoma seeds that data before each run by asking your deployed SDK to build a named scenario (“logged-in admin with one open invoice”); the JSON describing those entities is the scenario’s recipe, and it lives on Autonoma rather than in your repo, so changing one takes effect with no redeploy.

That makes recipes the fastest thing to fix, and the tools are built for iterating rather than committing:

get_recipe(scenarioId) read what is stored
dry_run_scenario(scenarioId, recipe) try an edit - provisioned, then torn down, never stored
...read the SDK's error, edit, repeat...
dry_run_scenario(scenarioId, recipe, save) promote the one that passed

Passing a recipe runs that candidate instead of the stored one and persists nothing, so the recipe your test runs use keeps working while your agent experiments, and a wrong guess costs nothing. save: true promotes a candidate only after a clean up/down, so a recipe nobody has seen work cannot become the active one.

Two different things can be wrong, and they iterate at very different speeds. The recipe (wrong fields, a missing entity, a _ref pointing at nothing) is fixed here, in seconds. Your SDK handler code (a missing factory for a model, a broken insert) lives in your repo and only changes when the app is rebuilt and redeployed.

By default a dry run hits the SDK endpoint the app currently has configured, which is not necessarily the preview for the PR you are working on. When your handler change is already deployed to its own PR preview, list_dry_run_targets plus dry_run_scenario’s target runs against that preview directly - so you can test a handler change without waiting for it to become the app’s configured endpoint.

They all apply asynchronously, so the loop is: fix with set_secret / edit_previewkit_config / apply_config, confirm with wait_for_deploy (which streams a short log tail and returns outcome: "in_progress" while the rebuild is still running, so you call it again - or outcome: "idle" when nothing was deploying at all, so you stop), then re-read if it failed. Once the preview is healthy and your fix is on the PR, start_analysis asks Autonoma to re-run its tests against the new commit and post a fresh verdict - read it with get_analysis.

Troubleshooting

The tools do not show up. Confirm the client connected (e.g. claude mcp list) and that you completed the browser sign-in. A client that only supports STDIO needs the mcp-remote bridge shown under Other clients.

A tool says no live preview environment was found. Autonoma tears the preview down after testing, so the live-surface tools (get_deploy_status, get_endpoints, wait_for_deploy) return unavailable once it is gone. This does not mean there is nothing to inspect: get_build_logs and get_app_logs still work for a post-mortem (see below). Open the PR and let a new preview deploy if you need the live surface again.

Logs from a torn-down or old preview. Build and app logs are retained for about 30 days and stay readable after the preview is torn down - so you can debug why a past deploy failed without redeploying. If the logs come back empty, the preview may never have deployed, or its logs have aged out; re-run the preview to get fresh ones.

A preview URL you hit directly 503s or times out on the first request. This is only when you curl a preview URL (e.g. one from get_endpoints) - the debug tools themselves read platform state and are unaffected. Previews scale to zero when idle, so the first request wakes the pod and can 503 or time out in the meantime. That is a cold start, not a crash: wait a few seconds and retry. If it keeps failing after it has had time to wake, check get_app_logs - a real crash shows up there, a cold start does not.

Which pull requests can I use? Any PR in a repo you have connected to Autonoma, in an organization you belong to.

Link copied