Railway MCP Server

Railway MCP Server

A Model Context Protocol (MCP) server that gives Claude (and other MCP-compatible AI tools) full access to your Railway.app infrastructure. Deploy, manage services, check logs, configure environment variables — all through natural conversation.

Category
访问服务器

README

Railway MCP Server

A Model Context Protocol (MCP) server that gives Claude (and other MCP-compatible AI tools) full access to your Railway.app infrastructure. Deploy, manage services, check logs, configure environment variables — all through natural conversation.

Supports multiple workspaces — use one token per workspace and the server merges results across all of them.

Quick Start

1. Get Railway API Tokens

Go to railway.com/account/tokens and create a workspace-scoped token for each workspace you want to access. Tokens scoped to "No workspace" can only see account-level info, not projects.

2. Install & Build

cd railway-mcp-server
npm install
npm run build

3. Configure in Claude Desktop

Open your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Multiple workspaces (recommended)

Use named env vars — one per workspace:

{
  "mcpServers": {
    "railway": {
      "command": "node",
      "args": ["/FULL/PATH/TO/railway-mcp-server/build/index.js"],
      "env": {
        "RAILWAY_TOKEN_MYCOMPANY": "token-scoped-to-company-workspace",
        "RAILWAY_TOKEN_PERSONAL": "token-scoped-to-personal-workspace"
      }
    }
  }
}

The label after RAILWAY_TOKEN_ becomes the workspace name in results (e.g. mycompany, personal).

Single workspace

If you only need one workspace, you can use the simpler format:

{
  "mcpServers": {
    "railway": {
      "command": "node",
      "args": ["/FULL/PATH/TO/railway-mcp-server/build/index.js"],
      "env": {
        "RAILWAY_API_TOKEN": "your-token-here"
      }
    }
  }
}

All token formats supported

Env var Behavior
RAILWAY_TOKEN_<LABEL> Named tokens — one per workspace (recommended)
RAILWAY_API_TOKENS Comma-separated list of tokens
RAILWAY_API_TOKEN Single token (backwards compatible)

4. Restart Claude Desktop

The Railway tools will appear automatically.

Available Tools (30 total)

Teams

Tool Description
list_teams List all teams/organizations you belong to

Projects

Tool Description
list_projects List ALL projects across all workspaces
list_personal_projects List only your personal projects
list_team_projects List projects for a specific team
get_project Get project details (services, environments)
create_project Create a new project
delete_project Delete a project

Services

Tool Description
list_services List services in a project
create_service Create from GitHub repo or Docker image
delete_service Remove a service

Deployments

Tool Description
list_deployments List deployments for a service
get_deployment Get deployment status and details
deploy_service Trigger a new deployment
redeploy_service Redeploy the latest version
restart_deployment Restart a running deployment
remove_deployment Cancel/remove a deployment

Environments

Tool Description
list_environments List environments (production, staging, etc.)
create_environment Create a new environment
delete_environment Remove an environment

Variables

Tool Description
get_variables Read environment variables
set_variables Set one or more variables (upsert)
delete_variable Delete a variable

Domains

Tool Description
create_service_domain Generate a *.up.railway.app domain
create_custom_domain Attach your own domain
delete_service_domain Remove the Railway domain

Logs

Tool Description
get_deployment_logs Runtime/application logs
get_build_logs Build output logs

Volumes

Tool Description
create_volume Create persistent storage for a service

Advanced

Tool Description
raw_graphql Run any GraphQL query/mutation directly
introspect_schema Discover all available API operations

How Multi-Workspace Works

When you configure multiple tokens, the server handles routing automatically:

  • Listing projects: Queries all workspaces in parallel and merges results, labeled by workspace name.
  • ID-based lookups (get project, deploy, check logs, etc.): Tries each token until one succeeds. Since Railway IDs are globally unique, it finds the right workspace automatically.
  • Create operations: Uses the first configured token by default.

Example Usage (in Claude)

"List my Railway projects"

"Deploy my-app service to production"

"Show me the logs for the latest deployment of api-server"

"Set DATABASE_URL on my backend service in staging"

"Create a new project called 'my-saas' with a Postgres database"

Development

npm run dev    # Watch mode — recompiles on changes
npm run build  # One-time build
npm start      # Run the server

How It Works

This server communicates with Railway's public GraphQL API at backboard.railway.com/graphql/v2. It runs locally on your machine via STDIO transport, so your API tokens never leave your computer.

The raw_graphql tool is an escape hatch — if Railway adds new API operations before this server is updated, you (or Claude) can still access them by writing the GraphQL directly.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选