Railway MCP server for AI agents

Live

OAUTH 2.1

CLOUD HOSTING

Developer Tools

Railway MCP gives your agent cloud hosting access to your Railway projects through Railway's own MCP server: inspect environments, deployments, logs, and metrics, manage services, variables, domains, volumes, and webhooks, and hand work to Railway's agent.

  • Per-user credentials: each call uses the actual user's token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Railway MCP
agent · Acme Q3
Run
Why did the last deploy of the api service fail?
S
railwaymcp_get_deployment_diagnosis
138ms
DevOps agent
The last deploy of api failed during build. The diagnosis points to a missing environment variable, DATABASE_URL.
Sources: Railway deployment, 1 diagnosis
railwaymcp
1 deployment
18:29
Message Claude...

Tools your DevOps agent reaches for on Railway, scoped per user.

CALL ANY TOOL
78 tools for cloud hosting in Railway: inspect environments, deployments, logs, metrics, and traces, manage services, variables, domains, volumes, buckets, and webhooks, and run Railway cloud agent tasks.
railwaymcp_accept_deploy
Accept deploy
DESTRUCTIVE: Commits all staged changes in a Railway environment and triggers a deploy. Only use this when the user has explicitly confirmed they want to deploy.
Parameters
Name
Type
Required
Description
environmentId
string
Required
The environment ID to commit staged changes for
commitMessage
string
Optional
Optional commit message for the deploy
railwaymcp_cancel_cloud_agent_task
Cancel cloud agent task
railwaymcp_create_bucket
Create bucket
railwaymcp_create_function
Create function
railwaymcp_create_tcp_proxy
Create tcp proxy
railwaymcp_delete_bucket
Delete bucket
railwaymcp_delete_feature_flag
Delete feature flag
railwaymcp_delete_tcp_proxy
Delete tcp proxy
railwaymcp_deploy_template
Deploy template
railwaymcp_domain_status
Domain status
railwaymcp_fetch_docs
Fetch docs
railwaymcp_get_bucket_credentials
Get bucket credentials
railwaymcp_get_deployment_diagnosis
Get deployment diagnosis
railwaymcp_get_logs
Get logs
railwaymcp_get_service_metrics
Get service metrics
railwaymcp_get_trace
Get trace
railwaymcp_http_requests
Http requests
railwaymcp_list_beta_features
List beta features
railwaymcp_list_cloud_agent_tasks
List cloud agent tasks
railwaymcp_list_feature_flags
List feature flags
railwaymcp_list_services
List services
railwaymcp_list_variables
List variables
railwaymcp_railway_agent
Railway agent
railwaymcp_restart_service
Restart service
railwaymcp_run_cloud_agent_task
Run cloud agent task
railwaymcp_search_docs
Search docs
railwaymcp_set_beta_feature
Set beta feature
railwaymcp_set_service_tracing
Set service tracing
railwaymcp_update_bucket
Update bucket
railwaymcp_update_service
Update service

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Railway tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["railwaymcp"], toolNames: [
    "railwaymcp_list_deployments",
    "railwaymcp_get_deployment_diagnosis",
    "railwaymcp_redeploy"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Find the failed deployment for the api service, read its diagnosis, and redeploy it" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["railwaymcp"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Find the failed deployment for the api service, read its diagnosis, and redeploy it" }],
  tools,
});

// Execute the tool call with the user's vaulted Railway OAuth token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["railwaymcp"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Find the failed deployment for the api service, read its diagnosis, and redeploy it" }],
  tools,
});

// Tool call runs with the user's vaulted Railway OAuth token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["railwaymcp"] }, pageSize: 100,
});

const agent = new Agent({
  name: "devops_agent",
  model: "gemini-2.5-pro",
  instruction: "Railway tools scoped to this user",
  tools,
});

await agent.run("Find the failed deployment for the api service, read its diagnosis, and redeploy it");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Railway MCP tool. Click to copy, paste into your agent, done.
Projects and deployments
Copy the prompt
Copied
List my Railway projects.
Copy the prompt
Copied
Show the recent deployments of the api service.
Copy the prompt
Copied
Redeploy the api service in production.
Logs and metrics
Copy the prompt
Copied
Show the last 100 build logs for the web service.
Copy the prompt
Copied
Show the HTTP error rate for the api service.
Copy the prompt
Copied
Show CPU and memory usage for the worker service.
Services and configuration
Copy the prompt
Copied
List the variables on the api service.
Copy the prompt
Copied
Generate a public domain for the web service.
Copy the prompt
Copied
Create a volume and attach it to the database service.
SEE HOW AUTH WORKS
Each user signs in to Railway once, and Scalekit stores and refreshes their tokens. Credentials stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Railway MCP
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Railway MCP
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
Railway MCP
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Railway MCP
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other developer tools connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Engineering Teams
Auto release notes agent
Reads merged GitHub PRs, groups them into structured release notes, publishes the page to Notion, and announces the release in Slack. Every call runs on the engineer's own delegated OAuth.
Test other agents
See the same per-user auth pattern across other developer tools connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
ENGINEERING
Auto-release notes agent
Group merged GitHub PRs into structured release notes, publish the page to Notion, and announce the release in Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Railway token looks fine in a demo. In production every deploy looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Railway today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Railway as the user or through a shared service account?
As the user. Each user signs in to Railway once, and Scalekit stores and refreshes their tokens. Audit logs attribute every deploy and service change to that user, not a shared service account.
Where is the Railway OAuth token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. Refresh is automatic. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Railway?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the list, describe, logs, and metrics tools without railwaymcp_delete_service, which permanently deletes a service, or railwaymcp_accept_deploy, which commits all staged changes and triggers a deploy. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Railway access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
What is railwaymcp_railway_agent?
It hands a multi-step task in one project environment to Railway's own AI agent, for work too open-ended for the direct tools, such as investigating a failing deploy across services. That agent can also change the environment as the calling user, so leave it out of toolNames if you want the agent limited to reads.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""railwaymcp"": {
""url"": ""https://mcp.scalekit.com/railwaymcp"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.railwaymcp]
url = ""https://mcp.scalekit.com/railwaymcp""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""railwaymcp"": {
""url"": ""https://mcp.scalekit.com/railwaymcp"",
""type"": ""http""
}
}
}