# Railway — how to use (mcp.ai)

Connect your Railway account and use 18 tools for developer tools straight from your AI agent. Connect with your own API key. Railway is a deployment platform for building and shipping applications with instant deployments, automatic scaling, and managed infrastructure.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_railway?ms=1787296020000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `railway_create_plugin`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/railway`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/railway/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/railway/create/plugin` — Creates a new plugin in Railway for the specified project. Use this action when you need to add a custom plugin to a Railway project, such as for integrating external services or extending project fun
  - body: { name: string, projectId: string }
- `POST https://api.mcp.ai/api/railway/delete/variable` — Delete a Railway environment variable. This action uses the `variableDelete` GraphQL mutation to permanently remove an environment variable from a project, environment, or service. This action is irre
  - body: { name: string, project_id: string, service_id?: string, environment_id: string }
- `POST https://api.mcp.ai/api/railway/delete/volume` — Permanently delete a persistent volume and all its associated data from Railway. Use when you need to remove a volume that is no longer needed. This action is irreversible — the volume and all its dat
  - body: { volume_id: string }
- `POST https://api.mcp.ai/api/railway/delete/workspace` — Delete a Railway workspace and all data associated with it. This action uses the `workspaceDelete` GraphQL mutation to permanently remove a workspace. Use this action when you need to permanently dele
  - body: { id: string }
- `POST https://api.mcp.ai/api/railway/disconnect/user/discord` — Disconnects the authenticated user's Railway account from Discord. Use when you need to unlink a Discord account that was previously connected to Railway for notifications, authentication, or team man
- `POST https://api.mcp.ai/api/railway/get/deployment/logs` — Retrieve runtime logs for a deployment. Use when you need to view the runtime application logs for troubleshooting runtime issues, monitoring application behavior, or debugging errors that occur durin
  - body: { limit?: integer, deployment_id: string }
- `POST https://api.mcp.ai/api/railway/get/environment` — Get details of a specific Railway environment by its ID, including service instances and deployment information. Use this action when you need to retrieve detailed information about an environment, su
  - body: { id: string }
- `POST https://api.mcp.ai/api/railway/get/git/hub/pr/info` — Get information for a GitHub pull request associated with a Railway service. Use this action when you need to retrieve details about a specific pull request, such as its title, state, URL, or author i
  - body: { prNumber: integer, serviceId: string }
- `POST https://api.mcp.ai/api/railway/get/user/kickback/earnings` — Get the total kickback earnings for the authenticated Railway user. Use this action when you need to retrieve the kickback earnings information for the authenticated user, including the total amount e
- `POST https://api.mcp.ai/api/railway/list/api/tokens` — Retrieve all API tokens for the authenticated user from Railway. Use this action when you need to fetch the list of API tokens associated with the currently authenticated user. This is a read-only ope
- `POST https://api.mcp.ai/api/railway/list/environment/patches` — Retrieve all patches for a Railway environment using the GraphQL API. Use this action when you need to fetch the list of configuration patches applied to an environment. This is useful for auditing en
  - body: { after?: string, first?: integer, environment_id: string }
- `POST https://api.mcp.ai/api/railway/list/git/hub/repos` — Retrieve a list of GitHub repositories that Railway has access to. Use this action when you need to fetch the list of GitHub repositories associated with the authenticated user's GitHub account throug
- `POST https://api.mcp.ai/api/railway/list/git/hub/writable/scopes` — Retrieve the list of GitHub scopes the user has installed the installation to. Use this action when you need to fetch the list of GitHub scope names that the authenticated user has granted to the Rail
- `POST https://api.mcp.ai/api/railway/list/integration/auths` — Retrieve all integration auths for the authenticated user from Railway. Use this action when you need to fetch the list of integration auths (such as GitHub, GitLab, Vercel, or other connected integra
- `POST https://api.mcp.ai/api/railway/list/notification/deliveries` — Retrieve notification deliveries for the authenticated user. Use this action when you need to fetch a list of notification deliveries, such as tracking which notifications have been sent (e.g., EMAIL,
- `POST https://api.mcp.ai/api/railway/list/trusted/domains` — Fetch all trusted domains for the authenticated Railway workspace. Use this action when you need to retrieve all trusted domains configured for workspace membership invitations. Trusted domains allow 
  - body: { workspaceId?: string }
- `POST https://api.mcp.ai/api/railway/update/project` — Update project settings and configuration on Railway. Use this action when you need to modify project properties such as description, visibility settings, or PR deploy preferences. The following field
  - body: { id: string, input: object }
- `POST https://api.mcp.ai/api/railway/update/service/instance` — Update build/deploy settings for a service in a specific environment on Railway. Use this action when you need to modify service configuration including commands, healthcheck, replicas, region, and cr
  - body: { input: object, service_id: string, environment_id: string }

## Example prompts
- "What can I do in Railway?"
- "Show me a summary of my Railway account"

## More
- Page: https://mcp.ai/railway
- Agent spec (llms.txt): https://mcp.ai/railway/llms.txt
- Postman collection: https://mcp.ai/railway/postman.json
