Railway MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Railway MCP or direct API to create projects and services, inspect environments and variables, trigger deployments, and manage deployment rollbacks through natural language.

Railway MCP logoRailway MCP
Oauth2

Railway MCP is Railway's hosted MCP server for managing projects, services, environments, variables, and deployments. Use it to automate deployments, inspect environments, and manage runtime configuration from AI agents.

46 Tools

Try Railway MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Railway MCP
Try asking
TOOLS

Supported Tools

Every Railway MCP action and event your agent gets out of the box.

Accept-deploy

DESTRUCTIVE: Commits all staged changes in a Railway environment and triggers a deploy.

Connect-service-source

Attach a source to an existing service: a GitHub repository (deploys on push, builds immediately) or a Docker image.

Create-bucket

Create an S3-compatible object storage bucket in a project and provision it in an environment.

Create-deployment

Create a new service from a GitHub repository and trigger its first deployment.

Create-project

Create a new Railway project

Create-service

Create a new service in a project from a Docker image, or an empty service to configure later (e.

Create-tcp-proxy

Expose a service on the public internet over a raw TCP port (e.

Create-volume

Create a persistent volume in a project and optionally attach it to a service at a mount path.

Delete-bucket

Permanently delete an object storage bucket and its contents.

Delete-feature-flag

Delete a project-scoped feature flag.

Delete-service

Permanently delete a service: its deployments stop and are removed, along with its domains, variables and deployment triggers.

Delete-tcp-proxy

Remove a service's TCP proxy, taking its public endpoint offline.

Delete-volume

Permanently delete a volume and its data.

Describe-environment

Inventory of everything in a Railway environment — services, volumes, buckets, shared variable names — with staged changes applied.

Describe-service

Everything about one service in an environment: its config with staged changes applied (source, build, deploy, networking, volume mounts), the per-field staged changes pending on it, mounted volumes, live domains and TCP proxies, and the latest deployment.

Domain-status

Get detailed status for one domain on a service, by hostname, URL, or domain ID: required DNS records and whether they currently match, ownership verification, certificate status, and any certificate error.

Environment-status

Health overview of every service in an environment in one call: current LIVE (settled) deployment state, replica status, recent failures, unresolved warnings/criticals, and cron execution results.

Fetch-docs

Fetch the full markdown content of a Railway documentation page by URL or slug (e.

Generate-domain

Expose a service publicly.

Get-deployment-diagnosis

Get the AI-generated diagnosis for a failed deployment: root cause category, analysis, and suggested fixes, along with deployment context (service config, source repo, branch, commit, PR, failure stage and error).

Get-feature-flag

Get a Railway feature flag (Signal) by name for a project or its parent workspace scope.

Get-logs

Get logs from Railway for a deployment — covers deploy (runtime), build, and http (proxy request) contexts.

Get-service-config

Prefer describe-service: it applies the staged diff onto the live config for you and adds mounted volumes, domains, TCP proxies and the latest deployment.

Get-service-metrics

Get resource usage metrics (CPU, memory, disk, network) for a service, summarized as current/average/min/max over a time window.

Get-staged-changes

Show the changes staged in a Railway environment that accept-deploy would commit: per resource (service, volume, bucket, group) the action — create, delete, update — and each changed field with its live and staged value.

Get-status

Prefer describe-environment: it also lists services that exist only in the staged patch, unattached volumes, and each resource's staged state.

Http-error-rate

Get the HTTP error rate for a service over time — the share of requests answered with a 5xx.

Http-requests

Get HTTP request counts for a service, bucketed over time and split by response status class (2xx/3xx/4xx/5xx).

Http-response-time

Get HTTP latency percentiles (p50, p90, p95, p99) for a service, bucketed over time, in milliseconds.

List-deployments

List recent deployments for a Railway project, optionally filtered by environment, service, or status.

List-domains

List all domains (Railway-generated service domains and custom domains) for a service in an environment.

List-feature-flags

List Railway feature flags (Signals) for a project and optionally the parent workspace.

List-projects

List all Railway projects accessible to the authenticated user

List-services

List the ids and names of all services and environments in a Railway project.

List-tcp-proxies

List the TCP proxies exposing a service over the public internet on a raw TCP port (e.

List-variables

List all environment variables for a service, fully rendered (reference variables like ${{Postgres.

List-workspaces

List the Railway workspaces the current user belongs to.

Railway-agent

Send a message to Railway's AI agent for complex infrastructure operations.

Redeploy

Re-run the most recent deployment of a service in a given environment, reusing that deployment's existing build.

Restart-service

Restart a service's running deployment in place — the containers restart without rebuilding the image, and no new deployment is created (use redeploy for a fresh build copy).

Search-docs

Search the Railway documentation (docs.

Set-feature-flag

Create a project-scoped feature flag or update its default value.

Set-variables

Set one or more environment variables on a service (or environment-wide shared variables when serviceId is omitted).

Update-service

Update a service's configuration: build/start/pre-deploy commands, healthcheck, sleep mode, root directory, cron schedule, Dockerfile path, restart policy, config file path, and watch patterns.

Update-volume

Update a volume's name and/or mount path.

Whoami

Get the current authenticated Railway user's profile information

SETUP GUIDE

Connect Railway MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["railway_mcp"],
  mcp: true,
});
Create a session scoped to Railway MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Deploy latest commit to production service",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Railway MCP request
SETUP GUIDE

Connect Railway MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["railway_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Railway MCP
3

Run Railway MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Deploy latest commit to production service" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Railway MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native Railway MCP Integration

  • Supports both Railway MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Railway MCP data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Railway MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Railway MCP
  • Scoped, least privilege access to Railway MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use Railway MCP with any AI Agent Framework

Choose a Framework you want to connect Railway MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Railway requires connections to go through your own OAuth app. You register it once with Railway, add its client ID and secret in the Composio dashboard, and from then on everyone connects by signing in to Railway as usual. Composio handles the rest of the flow and the token refresh.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Railway connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a Railway account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Railway as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Exactly the ones Railway lists on its consent screen when you connect. Review that screen before approving. If you connect a work account, your Railway administrator may need to approve the app first, and you can revoke the access inside Railway whenever you want.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Railway connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio refreshes Railway tokens automatically, so day to day you do nothing. If you revoke access inside Railway, or Railway invalidates the session, the connection shows as expired in Composio and the agent stops acting on that account until you reconnect it, which is a single sign-in.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Railway use. Paid plans add higher limits and team features. Your Railway plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Railway accounts).

With Composio, you connect Railway once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Railway MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Railway MCP tool your agent needs.Free to start.

Start building