> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Railway in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/railway
Last updated: 2026-11-24

Share Railway with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or API token sign-in, 48 tools (21 read-only).

---

To give your team Railway in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Railway integration in a Metorial portal, and each person signs in to Railway with their own account. Agents can deploy and manage web applications, databases, and infrastructure on Railway's cloud platform. The integration has 48 tools, 21 read-only, 17 write and 10 destructive, plus 1 trigger.

**What you will learn**

- How an admin shares Railway in a portal and how each person connects
- The 9 OAuth scopes Railway can request, and what each one allows
- How to keep the 21 read-only tools and reject the other 27

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Railway for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **Login with Railway** (default) | OAuth | Signs in to Railway |
| **API Token** | API token | `token` and `tokenType` |

The portal and `metorial setup` use **Login with Railway** unless someone picks another method.

### Login with Railway

People sign in to Railway and approve the scopes you allow. The integration can request:

| Scope | Name | What it allows |
| --- | --- | --- |
| `openid` | OpenID | Required for authentication (always included) |
| `email` | Email | Access your email address |
| `profile` | Profile | Access your name and picture |
| `offline_access` | Offline Access | Stay connected with refresh tokens for long-lived access |
| `workspace:viewer` | Workspace Viewer | Viewer access to selected workspaces |
| `workspace:member` | Workspace Member | Member access to selected workspaces |
| `workspace:admin` | Workspace Admin | Admin access to selected workspaces |
| `project:viewer` | Project Viewer | Viewer access to selected projects |
| `project:member` | Project Member | Member access to selected projects |

### API Token

To connect, a person enters these values:

- `token`: Railway API token
- `tokenType` (optional): Use "project" for Railway project tokens, which require the Project-Access-Token header. Account and workspace tokens use Authorization: Bearer. One of "account_or_workspace", "project".

## Use your own Railway OAuth app

With your own OAuth app, people see your company's name on the Railway consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Railway and copy the **Redirect URI**.

2. **Register the app with Railway**

   Create an OAuth app or client in Railway and add the redirect URI from Metorial as its redirect or callback URL.

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the Railway integration.

## Admin: share Railway in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Railway. Under **Auth Method**, keep **Login with Railway** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Railway as themselves.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Railway.

4. **Choose who gets it**

   Add the access groups that should see Railway. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Railway integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search railway
```

## Employee: connect Railway

### In the portal

1. **Open Railway in the catalog**

   Sign in to your portal and open Railway. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Railway sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search railway
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Login with Railway**. To connect with **API Token** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Railway connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list railway
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 21 read-only tools, such as `get_domains` and `get_project`, and lose the 17 write tools, such as `create_domain` or `create_volume`, and the 10 destructive tools, such as `delete_domain` or `delete_volume`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list railway
metorial tools <integration-id>
metorial call <integration-id> list_regions -d '{}'
```

`metorial tools` lists the 48 tools, minus any you rejected. `list_regions` takes no input. It lists Railway deployment regions.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (21)

- `list_environments`: List all environments in a Railway project (e.g., production, staging). Needs `projectId`.
- `list_deployments`: List deployments for a service in a specific environment.
- `get_service`: Retrieve detailed information about a Railway service, including its environment-specific configuration (build settings, deploy settings, replicas, etc.) when an environment ID is provided. Needs `serviceId`.
- `get_domains`: List all domains (both Railway-provided and custom) for a service in a specific environment. Needs `projectId`, `environmentId` and `serviceId`.
- `list_volumes`: List all persistent storage volumes in a Railway project. Needs `projectId`.
- `get_project`: Retrieve detailed information about a Railway project including its services and environments. Needs `projectId`.
- `get_variables`: Retrieve environment variables for a project and environment. Needs `projectId` and `environmentId`.
- `list_projects`: List all Railway projects accessible to the authenticated user.
- `get_deployment_logs`: Retrieve build or runtime logs for a deployment. Needs `deploymentId`.
- `get_environment`: Get detailed information about an environment including its service instances and their latest deployment status. Needs `environmentId`.
- `get_deployment`: Get detailed information about a specific deployment, including its status, URLs, metadata, and whether it can be redeployed or rolled back. Needs `deploymentId`.
- `list_volume_backups`: List backups for a Railway volume instance. Needs `volumeInstanceId`.
- `list_regions`: List Railway deployment regions.
- `check_domain_availability`: Check whether a custom domain can be added to Railway. Needs `domain`.
- `get_environment_logs`: Retrieve recent logs from all services in a Railway environment. Needs `environmentId`.
- `get_volume_instance`: Get details for a Railway volume instance in a specific environment, including mount path, size, and state. Needs `volumeInstanceId`.
- `get_project_members`: List members of a Railway project and their project roles. Needs `projectId`.
- `get_tcp_proxies`: List TCP proxies configured for a Railway service in an environment. Needs `serviceId` and `environmentId`.
- `get_http_logs`: Retrieve HTTP request logs for a Railway deployment, including request path, status, timings, and edge metadata. Needs `deploymentId`.
- `get_domain_status`: Get DNS verification and certificate status for a Railway custom domain. Needs `projectId` and `domainId`.
- `get_current_user`: Identify the connected Railway credentials.

### Write tools (17)

- `create_environment`: Create a new environment in a Railway project. Needs `projectId` and `name`.
- `update_volume`: Rename a persistent storage volume. Needs `volumeId` and `name`.
- `rollback_deployment`: Roll back a service to a previous deployment. Needs `deploymentId`.
- `create_project`: Create a new Railway project. Needs `name`.
- `update_service`: Update a Railway service's metadata (name, icon) and environment-specific settings (build command, start command, replicas, region, health check, etc.). Needs `serviceId`.
- `set_variables`: Create or update one or more environment variables for a service, or shared variables for an environment when serviceId is omitted. Needs `projectId`, `environmentId`, `serviceId` and `variables`.
- `trigger_deployment`: Trigger a new deployment for a service in a specific environment. Needs `serviceId` and `environmentId`.
- `create_volume`: Create a new persistent storage volume and attach it to a service. Needs `projectId`, `serviceId` and `mountPath`.
- `create_domain`: Add a domain to a Railway service. Needs `projectId`, `environmentId` and `serviceId`.
- `update_project`: Update an existing Railway project's name, description, or settings like public visibility and PR deploy previews. Needs `projectId`.
- `create_service`: Create a new service in a Railway project. Needs `projectId`.
- `create_volume_backup`: Create a backup for a Railway volume instance. Needs `volumeInstanceId`.
- `update_custom_domain`: Update settings for a Railway custom domain, such as the target service port. Needs `domainId` and `environmentId`.
- `restart_deployment`: Restart a running Railway deployment without rebuilding it. Needs `deploymentId`.
- `create_tcp_proxy`: Create a public TCP proxy for a Railway service instance. Needs `serviceId`, `environmentId` and `applicationPort`.
- `rename_environment`: Rename a Railway environment. Needs `environmentId` and `name`.
- `redeploy_deployment`: Redeploy an existing deployment, rebuilding and redeploying the same source.

### Destructive tools (10)

- `delete_environment`: Permanently delete an environment from a Railway project. Needs `environmentId`.
- `delete_domain`: Remove a domain from a Railway service. Needs `domainId` and `isCustom`.
- `cancel_deployment`: Cancel an in-progress deployment. Needs `deploymentId`.
- `delete_project`: Permanently delete a Railway project and all its services, environments, and deployments. Needs `projectId`.
- `delete_variable`: Delete a specific environment variable from a service in a given environment, or a shared environment variable when serviceId is omitted. Needs `projectId`, `environmentId`, `serviceId` and `name`.
- `delete_service`: Permanently delete a Railway service. Needs `serviceId`.
- `delete_volume`: Permanently delete a persistent storage volume. Needs `volumeId`.
- `remove_deployment`: Remove a Railway deployment from deployment history. Needs `deploymentId`.
- `stop_deployment`: Stop a running Railway deployment. Needs `deploymentId`.
- `delete_tcp_proxy`: Delete a Railway TCP proxy. Needs `tcpProxyId`.

## Triggers

Railway has 1 trigger, which fire on events in Railway:

- `project_webhook`: Receives webhook events from a Railway project including deployment status changes, volume usage alerts, and resource monitoring alerts.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Railway there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Railway on metorial.com](https://metorial.com/integrations/railway): the integration overview