Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the Railway in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
Let your AI look after your Railway apps: list projects, environments and services, check deployments and read their build and runtime logs, see which environment variables are set (names only), estimate usage, and redeploy or restart a service after confirming with you.
Try asking
Example prompts for Railway
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Railway, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Railway + Gemini
Let your AI look after your Railway apps: list projects, environments and services, check deployments and read their build and runtime logs, see which environment variables are set (names only), estimate usage, and redeploy or restart a service after confirming with you.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
RAILWAY_API_TOKEN
Step 1 — Get credentials
- In Railway open Account Settings → Tokens (
https://railway.com/account/tokens) and create a token. Choose No workspace for an account token that reaches all your workspaces, or pick a workspace for a workspace token limited to that workspace, which is the better choice for a team. - Paste the token into
RAILWAY_API_TOKENas Railway shows it, without the word Bearer, and install the connector. - Check the setup with
railway_list_projects.
Project tokens do not work: a project token (project settings, Tokens) reaches only one environment of one project, goes in a different header and cannot list projects. Use an account or workspace token. railway_get_me works only with an account token; with a workspace token Railway answers Not Authorized.
What it does: projects with their environments and services, how each service runs (builder, start command, health check, region, replicas, domains), deployments with their build and runtime logs, the names of environment variables, and usage. A FAILED deployment usually broke while building, so the AI reads railway_get_build_logs; a CRASHED one broke while running, so it reads railway_get_deployment_logs.
Redeploy and restart ask first: railway_redeploy_deployment builds the service again and replaces the running deployment, which counts as billed usage; railway_restart_deployment stops and starts its containers without a new build. Both can briefly interrupt the service, so the AI tells you the service and environment and waits for your yes. Nothing here deletes or stops a service.
Variable values stay in Railway: railway_list_variable_names shows only which variables are set. railway_get_variable_values returns the values (passwords, keys, connection strings) and is switched off at install; turn it on only if the AI may see them. Runtime logs show whatever your app prints, so treat them as sensitive too.
Usage, not dollars: railway_get_estimated_usage and railway_get_usage return CPU in vCPU minutes, memory and volumes in GB minutes and egress in GB. The AI converts them with Railway's list prices (for example CPU at 20 dollars per vCPU per month); plan credits and discounts are not included.
Any other read: railway_graphql_query runs any query of the Railway API. Railway publishes no schema file, so railway_graphql_schema and railway_graphql_schema_url cannot load it; the AI looks types up with an introspection query instead. railway_graphql_mutation could change and delete anything the token reaches, so it is switched off at install, like railway_graphql_subscription. An admin can turn them on deliberately.
Common errors: Railway answers most problems with HTTP 200 and a message, which the connector reports as an error. Not Authorized: the token is wrong, revoked or has no access to that project (or railway_get_me was called with a workspace token). Project not found or Deployment not found: wrong id or no access. HTTP 429: the hourly request limit of your plan is used up (100 on Free, 1,000 on Hobby, 10,000 on Pro); wait.
The connector does not create, change or delete projects, services, environments, variables, domains or volumes, and it does not roll back deployments or draw metrics charts.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Gemini
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart
gemini. - Run
/mcpinside Gemini CLI (orgemini mcp listin your shell):anythingmcpshould show as connected. - Start prompting: Gemini CLI can now call the
Railwaytools.
Available tools
| Tool | What it does |
|---|---|
railway_get_me | Read the Railway account behind an account token: id, name, email, username and its workspaces (id, name) |
railway_list_projects | List the projects the token can see, most recently updated first: id, name, description, workspace and created and updated dates |
railway_get_project | Read one project with its environments and services, and per service and environment: region, replicas, start command, public domains and… |
railway_get_service_instance | Read how one service runs in one environment: builder, build and start commands, root directory, health check, region, replicas, restart… |
railway_list_deployments | List the deployments of a project, environment or service, newest first: id, status (SUCCESS, FAILED, CRASHED, BUILDING, DEPLOYING… |
railway_get_deployment | Read one deployment: status and when it last changed, service and environment, URL, whether it can be redeployed or rolled back, whether it… |
railway_get_deployment_logs | Read the runtime logs of a deployment (what the running app printed): timestamp, severity and message per line |
railway_get_build_logs | Read the build logs of a deployment (installing dependencies, building the image): timestamp, severity and message per line |
railway_redeploy_deployment | Redeploy a deployment: Railway builds it again from the same source (or reuses the image with use_previous_image_tag) and replaces the… |
railway_restart_deployment | Restart a running deployment without building it again: its containers stop and start, so the service is briefly unavailable |
railway_list_variable_names | List the names of the environment variables of a service (or the shared variables of an environment), without their values, which are often… |
railway_get_variable_values | Read the environment variables of a service with their values |
railway_get_estimated_usage | Estimate the usage of the current billing period up to its end for a project or a workspace, per measurement (CPU in vCPU minutes, memory… |
railway_get_usage | Read the measured usage of a project or workspace over a period, per measurement and, with group_by, per service or environment (CPU in… |
railway_graphql_schema_url | Return the URL of the GraphQL schema (SDL); Railway publishes no SDL file, so use an introspection query with railway_graphql_query |
railway_graphql_schema | Fetch the GraphQL schema; Railway publishes no SDL file, so the AI looks types up with an introspection query instead |
railway_graphql_query | Run any GraphQL query against the Railway API, for reads the ready-made tools do not cover |
railway_graphql_mutation | Run any GraphQL mutation; switched off at install because it can change and delete anything the token reaches |
railway_graphql_subscription | Run a GraphQL subscription; switched off at install |
Example prompts
- "Which of my Railway services has a failed or crashed latest deployment? Show me the log lines that explain why."
- "Read the build logs of the last deployment of the api service in production and tell me why the build failed."
- "Is DATABASE_URL set on the worker service in staging? Check only the variable names."
- "Estimate this month's Railway usage for the shop project and roughly what it will cost."
- "Restart the api service in production. Tell me which deployment you will restart and wait for my OK."
FAQ
Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.
Next steps
Was this guide helpful?