Set up Railway in Metorial for Claude, ChatGPT and Cursor
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'll 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 with at least one access group
- An account with Railway for each person who connects
- For the CLI steps: the Metorial 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 | 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 tokentokenType(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.
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.
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.
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
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
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.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Railway.
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:
Employee: connect Railway
In the portal
Open Railway in the catalog
Sign in to your portal and open Railway. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Railway sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
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.
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.
Check it worked
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). NeedsprojectId.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. NeedsserviceId.get_domains: List all domains (both Railway-provided and custom) for a service in a specific environment. NeedsprojectId,environmentIdandserviceId.list_volumes: List all persistent storage volumes in a Railway project. NeedsprojectId.get_project: Retrieve detailed information about a Railway project including its services and environments. NeedsprojectId.get_variables: Retrieve environment variables for a project and environment. NeedsprojectIdandenvironmentId.list_projects: List all Railway projects accessible to the authenticated user.get_deployment_logs: Retrieve build or runtime logs for a deployment. NeedsdeploymentId.get_environment: Get detailed information about an environment including its service instances and their latest deployment status. NeedsenvironmentId.get_deployment: Get detailed information about a specific deployment, including its status, URLs, metadata, and whether it can be redeployed or rolled back. NeedsdeploymentId.list_volume_backups: List backups for a Railway volume instance. NeedsvolumeInstanceId.list_regions: List Railway deployment regions.check_domain_availability: Check whether a custom domain can be added to Railway. Needsdomain.get_environment_logs: Retrieve recent logs from all services in a Railway environment. NeedsenvironmentId.get_volume_instance: Get details for a Railway volume instance in a specific environment, including mount path, size, and state. NeedsvolumeInstanceId.get_project_members: List members of a Railway project and their project roles. NeedsprojectId.get_tcp_proxies: List TCP proxies configured for a Railway service in an environment. NeedsserviceIdandenvironmentId.get_http_logs: Retrieve HTTP request logs for a Railway deployment, including request path, status, timings, and edge metadata. NeedsdeploymentId.get_domain_status: Get DNS verification and certificate status for a Railway custom domain. NeedsprojectIdanddomainId.get_current_user: Identify the connected Railway credentials.
Write tools (17)
create_environment: Create a new environment in a Railway project. NeedsprojectIdandname.update_volume: Rename a persistent storage volume. NeedsvolumeIdandname.rollback_deployment: Roll back a service to a previous deployment. NeedsdeploymentId.create_project: Create a new Railway project. Needsname.update_service: Update a Railway service's metadata (name, icon) and environment-specific settings (build command, start command, replicas, region, health check, etc.). NeedsserviceId.set_variables: Create or update one or more environment variables for a service, or shared variables for an environment when serviceId is omitted. NeedsprojectId,environmentId,serviceIdandvariables.trigger_deployment: Trigger a new deployment for a service in a specific environment. NeedsserviceIdandenvironmentId.create_volume: Create a new persistent storage volume and attach it to a service. NeedsprojectId,serviceIdandmountPath.create_domain: Add a domain to a Railway service. NeedsprojectId,environmentIdandserviceId.update_project: Update an existing Railway project's name, description, or settings like public visibility and PR deploy previews. NeedsprojectId.create_service: Create a new service in a Railway project. NeedsprojectId.create_volume_backup: Create a backup for a Railway volume instance. NeedsvolumeInstanceId.update_custom_domain: Update settings for a Railway custom domain, such as the target service port. NeedsdomainIdandenvironmentId.restart_deployment: Restart a running Railway deployment without rebuilding it. NeedsdeploymentId.create_tcp_proxy: Create a public TCP proxy for a Railway service instance. NeedsserviceId,environmentIdandapplicationPort.rename_environment: Rename a Railway environment. NeedsenvironmentIdandname.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. NeedsenvironmentId.delete_domain: Remove a domain from a Railway service. NeedsdomainIdandisCustom.cancel_deployment: Cancel an in-progress deployment. NeedsdeploymentId.delete_project: Permanently delete a Railway project and all its services, environments, and deployments. NeedsprojectId.delete_variable: Delete a specific environment variable from a service in a given environment, or a shared environment variable when serviceId is omitted. NeedsprojectId,environmentId,serviceIdandname.delete_service: Permanently delete a Railway service. NeedsserviceId.delete_volume: Permanently delete a persistent storage volume. NeedsvolumeId.remove_deployment: Remove a Railway deployment from deployment history. NeedsdeploymentId.stop_deployment: Stop a running Railway deployment. NeedsdeploymentId.delete_tcp_proxy: Delete a Railway TCP proxy. NeedstcpProxyId.
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, Cursor, Codex and ChatGPT: connect each client to your portal and use Railway there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Railway on metorial.com: the integration overview