Connect Railway to Claude Code
Manage Railway projects, services, deployments, logs and variables. Add Toolspoke to Claude Code once and it can use 15 Railway actions. Your Railway credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Railway and connect it
Add Railway to a project in your Toolspoke workspace.
API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- API token
- Railway → Account Settings → Tokens → Create Token. Leave the workspace empty for an account token that reaches every workspace you belong to, or choose one workspace to limit it. Project tokens are not accepted here.
Choose what Claude Code may do
All 15 actions start on. Switch off any of the 6 actions that change something in Railway, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Railway actions that only read, so they are safe to try first.
- Return the user an account token belongs to, with the workspaces they can reach
- List projects with their id, name and workspace
- Read one project with its environments and services
- Read one service by id
What Claude Code can do in Railway
9 actions read, 3 write and 3 delete or permanently change something.
Reads
Get me
Return the user an account token belongs to, with the workspaces they can reach. A workspace token has no user, so this fails for one; use list_projects instead.
List projects
List projects with their id, name and workspace. Takes no required arguments, which is why an install tests itself with it. Pass workspace_id to list one workspace's projects.
Get project
Read one project with its environments and services. The environment and service ids here are what the deployment, log and variable actions take.
Get service
Read one service by id.
List deployments
List deployments, newest first, narrowed to a project, environment or service. Shows each one's status (SUCCESS, FAILED, CRASHED, BUILDING …) and URL.
Get deployment
Read one deployment, with its status and whether it can be redeployed or rolled back to.
Get deployment logs
Read a deployment's runtime logs. Logs can contain user data and secrets the app printed, so the response is never written to the audit log.
Get build logs
Read a deployment's build logs. The first call when a deployment FAILED before it started. Never written to the audit log.
List variables
Return the variables of a service in an environment as a name-to-value map, or the environment's shared variables when service_id is omitted. Values are secrets, so the response is never written to the audit log.
Writes
Upsert variable
Create or update one variable on a service, or a shared one when service_id is omitted. Railway redeploys the affected services unless skip_deploys is true. The value is masked in the audit log.
Redeploy service
Redeploy a service's latest deployment in an environment, with the same code. Use it to pick up changed variables.
Restart deployment
Restart a running deployment's containers without rebuilding. Requests in flight are dropped while it restarts.
Deletes or permanently changes
Delete variable
Delete one variable. Destructive because its value is gone and the next deployment runs without it.
Rollback deployment
Make an earlier deployment live again. Destructive because it changes the code serving traffic at once.
Cancel deployment
Cancel a deployment that is still building or deploying. Destructive because it cannot be resumed.
Railway in Claude Code: questions
Does Claude Code see my Railway credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Railway?
Yes. Each of the 15 actions can be switched off for a project. Turn off the 6 that change something and Claude Code can only read.
Will 15 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Railway action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Railway call does not run in a sandbox, so it bills nothing.
Railway in your other apps
More infrastructure toolkits for Claude Code
Try Railway in Claude Code
Free to start, and tool calls cost nothing on any plan.