Connector guide6-minute read19 MCP tools7 languages

How to Connect Railway to Cursor via MCP

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.

HCBy HelpCode teamUpdated 6 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Railway

Railway

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.

tools

19

Region

INTL

Category

Infrastructure

Authentication

Bearer Token

Required env vars

RAILWAY_API_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

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.

Start free trial

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.

Railway · live via MCP
Share
Opus 4.7

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 + Cursor

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

  1. 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.
  2. Paste the token into RAILWAY_API_TOKEN as Railway shows it, without the word Bearer, and install the connector.
  3. 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 Cursor

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 shows YOUR_SERVER_ID.

Cursor reads MCP servers from ~/.cursor/mcp.json. Add this entry:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart Cursor.
  3. Open Cursor → Settings → MCP and check that anythingmcp is listed and connected.
  4. Start chatting: the agent can now call the Railway tools.

Available tools

ToolWhat it does
railway_get_meRead the Railway account behind an account token: id, name, email, username and its workspaces (id, name)
railway_list_projectsList the projects the token can see, most recently updated first: id, name, description, workspace and created and updated dates
railway_get_projectRead one project with its environments and services, and per service and environment: region, replicas, start command, public domains and…
railway_get_service_instanceRead how one service runs in one environment: builder, build and start commands, root directory, health check, region, replicas, restart…
railway_list_deploymentsList the deployments of a project, environment or service, newest first: id, status (SUCCESS, FAILED, CRASHED, BUILDING, DEPLOYING…
railway_get_deploymentRead 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_logsRead the runtime logs of a deployment (what the running app printed): timestamp, severity and message per line
railway_get_build_logsRead the build logs of a deployment (installing dependencies, building the image): timestamp, severity and message per line
railway_redeploy_deploymentRedeploy a deployment: Railway builds it again from the same source (or reuses the image with use_previous_image_tag) and replaces the…
railway_restart_deploymentRestart a running deployment without building it again: its containers stop and start, so the service is briefly unavailable
railway_list_variable_namesList 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_valuesRead the environment variables of a service with their values
railway_get_estimated_usageEstimate 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_usageRead 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_urlReturn the URL of the GraphQL schema (SDL); Railway publishes no SDL file, so use an introspection query with railway_graphql_query
railway_graphql_schemaFetch the GraphQL schema; Railway publishes no SDL file, so the AI looks types up with an introspection query instead
railway_graphql_queryRun any GraphQL query against the Railway API, for reads the ready-made tools do not cover
railway_graphql_mutationRun any GraphQL mutation; switched off at install because it can change and delete anything the token reaches
railway_graphql_subscriptionRun 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

Does Cursor support custom MCP servers on the free tier? Yes, MCP is available on Hobby, Pro and Business plans.

Next steps

Was this guide helpful?

Your Railway agent is one click away.

Install the connector, paste the key, prompt Cursor. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Railway to ChatGPT via MCP

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.

Connectors

How to Connect Railway to Claude via MCP

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.

Connectors

How to Connect Railway to Gemini via MCP

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.

Connectors

How to Connect Railway to Meta Muse via MCP

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.

Connectors

Railway to MCP: Deployments, Logs and Usage in any AI Agent

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.

Connectors

How to Connect Avito to Cursor via MCP

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.