Migrations Migrating from Heroku, Render, Hatchbox or Cloud 66? We move your production app within 48 hours →
MCP for AI agents

MCP for AI agents

Connect Claude, Claude Code, Cursor or any MCP client to Railyard. 42 tools to deploy, roll back, read logs, query databases, manage domains and backups. OAuth, scoped, audited; destructive actions wait for a human.

MCP (Model Context Protocol) is an open standard that lets AI assistants call tools on external systems. Railyard runs an MCP server, so Claude, Claude Code, Cursor or any other MCP client can work with your Railyard team on your behalf. It can deploy and roll back, read logs and traffic, run commands, query your database, and manage domains, backups and servers.

Everything the agent does runs with the access you grant, on the team you pick, and shows up in that team’s activity log. Anything that removes or overwrites data waits for a person to approve it.

Quick start

  1. Add Railyard to your client. In Claude, open Customize → Connectors, search for Railyard and choose Connect. For other clients, see Connect your client.
  2. Approve access. A Railyard page opens in your browser. Pick the team and the access level (read, deploy or write), then approve.
  3. Ask. For example: “Which of my apps failed their last deploy, and why?”

There’s nothing to install and no token to copy. The client discovers Railyard’s sign-in on its own.

Endpoint

URLhttps://app.railyard.run/api/mcp
TransportStreamable HTTP (POST)
ProtocolMCP 2026-07-28 (stateless) and the earlier 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05 revisions
Sign-inOAuth 2.1 with PKCE, or a Railyard API token as a Bearer header
CapabilitiesTools (42) and prompts (3)

On a self-hosted Railyard, the endpoint is /api/mcp on your own dashboard’s address.

Connect your client

Claude (web, desktop and mobile)

Open Customize → Connectors, search for Railyard, choose Connect and approve access on the Railyard page that opens. On Team and Enterprise plans, an organization owner adds the connector first, then each member connects with their own Railyard account.

Claude Code

claude mcp add --transport http railyard https://app.railyard.run/api/mcp

Run /mcp inside Claude Code and choose Authenticate to sign in through your browser.

Cursor

In .cursor/mcp.json:

{ "mcpServers": { "railyard": { "url": "https://app.railyard.run/api/mcp" } } }

VS Code, Windsurf and other clients

Add https://app.railyard.run/api/mcp as a remote (streamable HTTP) MCP server. Clients that support MCP authorization sign in through your browser.

With an API token instead of OAuth

For a client that can’t do OAuth, or for scripts and CI, create a token under Settings → Access & tokens and send it as a header:

claude mcp add --transport http railyard https://app.railyard.run/api/mcp --header "Authorization: Bearer rly_..."
{ "mcpServers": { "railyard": { "url": "https://app.railyard.run/api/mcp", "headers": { "Authorization": "Bearer rly_..." } } } }

Access levels

You choose the level on the consent screen, or when you create a token.

LevelWhat it allows
readList and inspect apps, servers, deploys, domains, backups, processes and scheduled tasks; read logs, traffic, alerts and activity. Nothing that changes anything.
deployEverything in read, plus deploy, roll back, cancel deploys, restart, scale workers and toggle maintenance mode.
writeEverything in deploy, plus create apps and environments, launch templates, change variables and domains, start backups, run commands and scheduled tasks, read variable values, list tables and run read-only SQL.

The level can never go beyond your own role on the team: a viewer can grant read, a deployer up to deploy, and an admin or owner up to write. If your role changes later, the agent’s access follows it. A tool the connection isn’t allowed to use returns an error that names the access it needs.

Tools reference

Tools marked approval never act directly. Each call creates a request on the Approvals page, and nothing changes until a team admin approves it.

Account and templates

ToolAccessWhat it does
whoamireadThe team, its plan and limits, app and server counts, and this connection’s access level
list_templatesreadSearch the one-click app templates and multi-service stacks, by words or category (up to 50 results)
launch_templatewriteCreate an app or stack from a template key and start its first deploy, on a server you name or the first online one

Apps

ToolAccessWhat it does
list_appsreadEvery app with status, URL, server and environment
get_appreadOne app: status, URL, repository and branch, domains, processes, variable names (not values) and the last 5 deploys
create_appwriteCreate an app from an https:// Git repository URL, detect how to build it, and start its first deploy
create_environmentwriteCopy an app’s settings and variables into a new environment of it, such as staging, optionally on another branch. It doesn’t deploy until asked
clone_appwriteCopy an app into a new app with the next free name. It doesn’t deploy until asked
promote_appwritePromote an environment to the app it came from: copy its settings across and deploy the same commit there
scale_appdeploySet how many containers a worker process runs, then redeploy. The web process scales with autoscaling
set_maintenancedeployTurn maintenance mode on or off and redeploy the current release to apply it
delete_appwrite · approvalDelete an app and its data

Deploys

ToolAccessWhat it does
deploy_appdeployDeploy the latest commit, or an exact commit SHA, tag or branch passed as ref, with the same approval rule and rate limit as the dashboard
list_deploysreadRecent deploys of the team or one app, filtered by status (up to 50)
get_deployreadOne deploy: commit, trigger, who started it, timing and the error if it failed
deploy_logsreadThe build and release log of a deploy, the last 200 lines by default (up to 500)
rollback_appdeployRedeploy an earlier successful deploy. It also restores that deploy’s variables unless restore_config is false
cancel_deploydeployCancel a queued, scheduled or running deploy

Runtime

ToolAccessWhat it does
app_logsreadRuntime log lines, 100 by default (up to 500), filtered by text or /regex/, level, process and time range (1h, 24h, 7d, 30d)
list_processesreadRunning containers with state, health, restarts, crash looping, CPU and memory
restart_appdeployRestart all of an app’s containers, or one process’s
run_commandwriteRun a one-off command inside the app’s container, in the background
get_commandreadStatus, exit code and output of a command started with run_command
list_scheduled_tasksreadThe app’s scheduled tasks with schedule, command and last run
run_scheduled_taskwriteRun a scheduled task now, outside its schedule

Variables

ToolAccessWhat it does
get_envwriteVariables with their values. Sealed variables show as (sealed)
set_envwriteSet a variable, applied on the next deploy. Sealed variables can’t be changed here
unset_envwrite · approvalRemove a variable

Domains

ToolAccessWhat it does
list_domainsreadCustom domains with verification and certificate state, and the DNS records still to create
add_domainwriteAdd a domain (or a redirect) and return the DNS records to create. Railyard verifies them and issues the certificate
remove_domainwrite · approvalRemove a domain

Databases

ToolAccessWhat it does
list_backupsreadThe app database’s 50 most recent backups
create_backupwriteStart a backup now (Postgres, MySQL and ClickHouse)
restore_backupwrite · approvalRestore the database from a completed backup, replacing the current data
list_tableswriteTables with approximate row counts and sizes, largest first
query_databasewriteRun one read-only SQL statement. It runs in a read-only transaction with a time limit and returns at most 200 rows

Servers

ToolAccessWhat it does
list_serversreadServers with status, provider, load and pending security updates
get_serverreadOne server: status, agent version, load, security updates and the apps it runs
reboot_serverwrite · approvalReboot a server; its apps are briefly down

Monitoring

ToolAccessWhat it does
app_trafficreadRequests, status classes, error rate, latency percentiles and busiest paths over live, 1h, 6h, 24h, 7d or 30d, compared with the window before
list_alertsreadThe app’s metric alerts, whether they’re firing, and the last 50 incidents
list_activityreadThe audit trail, newest first, for the team or one app (up to 50 entries)

Prompts

Clients that show MCP prompts (for example as slash commands) get three ready-made ones:

PromptArgumentsWhat it does
debug_failed_deployappFinds the app’s latest failed deploy, reads its error and logs, and explains the cause and the fix
app_health_reportappSummarizes the app’s status, processes, traffic, errors and alerts
fleet_overview—Reviews every server and app on the team and flags what needs attention

Example requests

  • “Why did the last deploy of my API fail? Fix the variable it needs and redeploy.”
  • “Roll the shop back to yesterday’s release.”
  • “Which apps returned 5xx errors in the last hour?”
  • “Create a staging environment of the web app on the develop branch and deploy it.”
  • “How many users signed up this week? Query the database.”
  • “Add shop.example.com to the storefront and tell me which DNS records to create.”
  • “Launch Plausible from the templates on my second server.”

Approving sensitive actions

Five tools never act straight from an agent: delete_app, unset_env, remove_domain, restore_backup and reboot_server. Each call creates a request on the Approvals page, which also shows on the dashboard. A team admin approves it to run the action and record the result, or rejects it to drop it. This happens on every call, whatever the access level. Agents can’t approve anything, including deploys that are waiting for approval.

Security and privacy

  • Your password never reaches the agent. Sign-in happens in your browser, against Railyard, with OAuth 2.1 and PKCE.
  • One team per connection. Every call is limited to the team you authorized. Anything else returns “not found”.
  • Secrets stay protected. read and deploy access see variable names only. Values need write access, and sealed variables stay masked. write access can also run commands inside your app’s container, so give it only to agents you trust.
  • Read-only SQL. query_database can’t change data. Each query runs in a read-only transaction with a time limit.
  • A suspended or past-due team stays readable. Read tools keep working; nothing can be changed until the team is back in good standing.
  • Full audit. Every tool call is written to the activity log with a source of mcp, the tool and the token, including calls that were refused. Variable values, SQL and command text are never stored in that entry.
  • Revoke any time. Authorized clients and their tokens are listed under Settings → Access & tokens.

Limits

LimitValue
Requestsone JSON-RPC request per HTTP POST
App log lines100 by default, 500 maximum
Deploy log lines200 by default, 500 maximum
SQL rows returned200
Command output returnedthe last 20,000 characters
Deploys and activity entries20 by default, 50 maximum
Deploy ratethe same per-hour limit as the dashboard
Authorization code10 minutes, single use, bound to the client and PKCE challenge

Troubleshooting

“This API token can’t …” The connection’s access level is too low for that tool. Reconnect and choose deploy or write (your role has to allow it), or create a token with that scope.

“No app named …” App names are the name values from list_apps.

“Waiting for approval” That tool needs an admin to approve it. Open Approvals in Railyard.

“This team is suspended” or “Payment is overdue” Read tools still work. Changes resume once the team is back in good standing.

The client keeps asking to sign in. Remove the Railyard connector and add it again. If you revoked its token under Settings → Access & tokens, the client needs a new sign-in.

Guides and deep dives

Next steps

  • Connect your agent with the quick start.
  • Pick the access level: read for agents that only answer questions, deploy for ones that ship, write for full control.
  • Watch approvals for the five approval-only tools.
  • Go further with the REST API and the CLI, which cover everything in the dashboard.
Found an issue or have a question?
Theme
Colors