Railway for Agents
Railway exposes a CLI, a local MCP server, a hosted remote MCP server, and an open agent skills format. AI coding agents can use any of them to deploy services, manage environments, and operate Railway on behalf of a user.
Get set up
Install the Railway CLI and configure agent support — skills, MCP, and authentication — in one command. Toggle the options to tailor the command to what you want set up:
curl -fsSL agents.railway.com | sh
If you already have the Railway CLI installed:
railway setup agentChoose your integration
Railway CLI
Deploys, environments, services, logs, and local development from the terminal.
Railway MCP
Local stdio or hosted OAuth — toggle between modes on a single page. Works with Cursor, Claude Code, VS Code, Codex, Copilot, Droid, OpenCode, Windsurf, and more.
Agent Skills
The use-railway skill teaches AI coding agents how to operate Railway. Works with Claude Code, Cursor, Codex, OpenCode, Copilot, and Factory Droid.
Cloud agents
Run Claude Code, Codex, or Grok CLI on a persistent Railway VM with your own credentials. Launch from the terminal and reconnect to sessions later.
When to use each
- Railway MCP (Local) — preferred for agent-native operations on a logged-in machine: project and service discovery, deployment status, bounded logs, variables, domains, templates, metrics, and scoped mutations.
- Railway MCP (Remote) — preferred when the user wants hosted OAuth MCP, or when local CLI configuration is unavailable. Also exposes the powerful
railway-agenttool for multi-step operations. - Railway CLI — preferred when the task depends on local machine state: current-directory deploys,
railway up,railway run, SSH, and local linking. - Agent Skills — install alongside any of the above so agents arrive with Railway-specific procedural knowledge instead of guessing.
- Cloud agents are preferred when the work should outlive the local terminal: a persistent VM running the coding agent, with sessions you can leave and reattach to.