On this page
Railway MCP Server: Setup, Claude Code and Moving Off @railway/mcp-server (Nov 2026)

The Railway MCP server is now part of the Railway CLI. Install the CLI (5.44.0 or later), run railway login, then run railway mcp install. That adds Railway to Claude Code, Cursor and other tools it finds. The old @railway/mcp-server npm package is deprecated. TrustedMCP grades it A.

Which Railway MCP server?

Search "railway mcp" and you will find two things.

  • The current one: railway mcp, a command in the Railway CLI. By default it is a small local bridge to Railway's hosted server at mcp.railway.com. Railway's CLI MCP docs are the reference.
  • The old one: @railway/mcp-server, from the railway-mcp-server repo. That repo is archived. Its README says the package "no longer contains the standalone TypeScript MCP server" and is now "a compatibility shim that launches railway mcp". If the CLI is missing, it just exits with migration steps.

So whichever one your config uses, the Railway CLI is now doing the work.

Set up Railway MCP in Claude Code

  1. Install the Railway CLI. Railway's CLI docs list brew install railway (macOS), npm i -g @railway/cli (Node.js 16 or higher), scoop install railway (Windows) and bash <(curl -fsSL railway.com/install.sh).
  2. Sign in: railway login (or railway login --browserless on a machine with no browser).
  3. Add the server to Claude Code:
railway mcp install --agent claude-code

Leave out --agent to set up every supported tool it detects: Claude Code, Cursor, GitHub Copilot, OpenAI Codex, OpenCode, Factory Droid, Pi and Google Antigravity. Railway says the command "merges the Railway server entry into existing configs without removing other MCP servers."

Want the Railway skill too? railway setup agent installs Railway's use-railway skill and sets up MCP in one go. (New to skills? See our Claude Code skills guide.)

Prefer to edit the config yourself? The old package's README gives this entry for a local MCP client:

{
  "mcpServers": {
    "railway": {
      "command": "railway",
      "args": ["mcp"]
    }
  }
}

In Claude Code the same thing is claude mcp add railway -- railway mcp (the -- form is covered in our Claude Code MCP setup guide).

Three ways to connect

Mode Set up with How it signs in Use it when
CLI connection (default) railway mcp install Your railway login, refreshed by the CLI Most people, on your own machine
OAuth, direct railway mcp install --oauth, or add the URL yourself Your MCP client does OAuth with https://mcp.railway.com You want to limit it to some workspaces or projects, or don't want the CLI
Local server railway mcp install --local Your railway login Your machine can't reach mcp.railway.com

A few details from Railway's docs:

  • "The CLI connection keeps credentials out of editor configuration." If a tool says you aren't signed in, run railway login again. The next tool call picks it up without restarting your editor.
  • With OAuth, "you choose which workspaces and projects the client can access." Tokens are short-lived and can be revoked in your Railway account settings.
  • Project tokens don't work. The server needs a user identity.
  • --remote still exists, but it now just means the default CLI connection.

For OAuth in Claude Code, the plain remote form is claude mcp add --transport http railway https://mcp.railway.com; then sign in through /mcp.

Migrate from @railway/mcp-server

If your config still runs npx -y @railway/mcp-server:

  1. Install or upgrade the Railway CLI (step 1 above) and run railway login.
  2. Run railway mcp install (add --agent claude-code to target one tool).
  3. Remove the old entry that runs npx -y @railway/mcp-server, as the archived README tells you to.
  4. Restart your client, or run /mcp in Claude Code, and check that Railway is connected.

Nothing breaks if you wait, since the shim still launches railway mcp. But the shim needs the CLI installed anyway, so the old entry only adds an extra npm package between your client and Railway.

What the tools can do

Railway's MCP server reference lists these tools on the hosted server:

  • Account: whoami
  • Projects: list-projects, create-project, list-services
  • Feature flags: list-feature-flags, get-feature-flag, set-feature-flag, delete-feature-flag
  • Deployments: redeploy, accept-deploy
  • Agent: railway-agent

The local server has a different set, including deploy, remove_service, delete_domain and remove_volume. Removing a volume deletes data.

Railway marks destructive tools "at the protocol level", so clients that respect those hints ask you first. The local server shows a preview and only acts when the call sends confirm: true. Don't rely on that alone: keep tool approval on in your client and read what the agent wants to do.

Is Railway MCP safe? Our grade

TrustedMCP grades the Railway MCP listing A (see how we score servers):

  • Auth (lost points): the default connection uses your full Railway login. OAuth lets you pick workspaces and projects, but there is no read-only mode. This is the biggest deduction.
  • Maintenance (full marks): the CLI is open source (MIT) with 82 contributors; v5.71.0 shipped on 2026-10-19 and MCP fixes landed in November.
  • Known CVEs (full marks): no GitHub, npm or OSV advisories for the CLI or the old package.
  • Transport (full marks): the hosted server is HTTPS, and the CLI bridge refuses to send your credentials to a non-HTTPS RAILWAY_MCP_URL. We found no shelling out in the CLI's MCP code.

One thing we can't check: the hosted server's own code is not public. The CLI side, including the local server, is.

Our advice: use the default CLI connection on your own machine, use OAuth and pick only the projects you need when you can, and never give it a production project you aren't ready to see redeployed. For more, see MCP security best practices.

Need an MCP server for your own platform, with scoped access built in? Tell us about it.

Frequently asked questions

Is there an official Railway MCP server?

Yes. Railway's official server is the railway mcp command in the Railway CLI, plus the hosted server at mcp.railway.com that it connects to. The older @railway/mcp-server package was also Railway's, but it is now deprecated.

How do I add Railway MCP to Claude Code?

Install the Railway CLI, run railway login, then run railway mcp install --agent claude-code. Or add it by hand with claude mcp add railway -- railway mcp.

Is @railway/mcp-server deprecated?

Yes. Its npm page says "Railway MCP is now bundled into the Railway CLI. Use 'railway mcp'." The repo is archived, and the package now just launches railway mcp.

Do I need the Railway CLI?

Not for OAuth. Railway says OAuth doesn't need the CLI: point your client straight at https://mcp.railway.com and sign in there. The default CLI connection needs CLI 5.44.0 or later, and the local server runs inside the CLI too.

Can I use a Railway project token?

No. Railway's docs say project tokens are not accepted, because the server needs a user identity for billing and audit trails.

How do I add Railway MCP to Cursor?

Run railway mcp install after railway login. With no --agent flag it sets up every supported tool it detects, Cursor included, and merges the Railway entry into your existing config without removing other MCP servers.

Is the Railway MCP server safe to use?

TrustedMCP grades it A. The CLI is open source, has no known advisories and the hosted server uses HTTPS. The main deduction is auth: the default connection uses your full Railway login and there is no read-only mode, so use OAuth to limit it to the projects you need and keep tool approval on.