developer-toolsapi_key

Railway

Railway is a deployment platform for building and shipping applications with instant deployments, automatic scaling, and managed infrastructure.

Verdict

Railway deploys and manages infrastructure for web apps, databases, and services. In Switchy, @mentioning Railway lets your team provision environments, check deployment logs, manage secrets, and query service health without leaving the conversation. Developers get instant visibility into staging vs. production state; product managers can verify a feature shipped; support can pull error logs when a customer reports a bug. Auth requires a Railway API key with project-level access — you'll grant read/write on deployments, environments, and variables.

Common use cases

  • Pull production logs during incident triage
  • Check deployment status before demo calls
  • Rotate environment secrets after security audit
  • Verify staging environment matches ticket scope
  • Delete unused volumes to reduce cloud spend

Integration

Vendor
Railway
Category
developer-tools
Auth
API_KEY
Tools
18
Composio slug
railway

Tools

  • 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 functionality. The action requires a valid

  • Delete Variable
    destructive

    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 irreversible — once deleted, the variable ca

  • Delete Volume
    destructive

    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 data will be permanently deleted and cannot

  • Delete workspace
    destructive

    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 delete a workspace that is no longer needed.

  • Disconnect Discord account

    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 management. This action is irreversible for

  • 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 during deployment execution. This action quer

  • 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, such as its name, creation timestamp, and

  • Get GitHub 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 information, for monitoring PR status or

  • 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 earned and the currency. This is a read-o

  • 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 operation that returns token metadata inclu

  • 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 environment history, tracking configuratio

  • List GitHub 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 through Railway. This is a read-only operation

  • List GitHub 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 Railway GitHub application. This is a read-o

  • 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 integrations) associated with the currently aut

  • 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, WEBHOOK, SLACK) and when they were crea

  • List Railway 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 users with emails from those domains to

  • 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 fields can be updated: - description: A brief

  • 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 cron schedule. This is an idempotent opera

Setup

Setup guide

  1. 11. Open your Switchy workspace and navigate to Settings → Integrations → Developer Tools. 2. Click 'Connect Railway' and choose 'API Key' as the auth method. 3. In a separate tab, log into Railway, go to Account Settings → Tokens, and generate a new API token with 'Project Admin' scope. 4. Paste the token into Switchy and click 'Authorize'. 5. Switchy will verify the connection by listing your Railway projects. 6. Inside any Project, type '@Railway get environment <env-id>' to test — the MCP should return environment details and confirm the integration works. 7. To invoke Railway tools, always start your message with '@Railway' followed by the action (e.g. '@Railway get deployment logs for <deployment-id>').

What teammates see: by default, memories from Railway are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Projects have used this MCP together with a given model.

How Switchy teams use it

Not enough Projects yet to publish anonymised usage stats (we require ≥ 50 Projects per week).

Starter prompts

Check Deploy Status

@Railway get environment details for production and show me the most recent deployment status, including any failed builds or runtime errors.

Tail Application Logs

@Railway get deployment logs for the current production deployment, filtering for ERROR and WARN level messages from the last hour.

Audit Environment Variables

@Railway list all environment variables for the staging environment and flag any that differ from production.

Provision New Plugin

@Railway create a new PostgreSQL plugin in the main project and return the connection string once provisioning completes.

Clean Up Old Volumes

@Railway list all volumes in the project, identify any not attached to a running service, and delete them after confirming they're unused.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@railway list all active deployments in my production environment and show me their current status

Output

Here's what I found in your Railway production environment: • api-service: deployment-abc123 (ACTIVE) — running v2.4.1, deployed 3 hours ago • web-frontend: deployment-def456 (ACTIVE) — running v1.8.0, deployed 2 days ago • worker-queue: deployment-ghi789 (CRASHED) — last attempt failed 15 minutes ago with exit code 1 The worker-queue deployment appears to have issues. Would you like me to fetch its logs to investigate the crash?

Notes

This example shows Railway's environment inspection capability. The MCP requires an API key with read access to your projects. Note that deployment states refresh in near-real-time, but this snapshot represents a moment-in-time view — the actual state may have changed since the query ran.

Prompt

@railway create a new Postgres plugin for my staging project and set up a DATABASE_URL variable pointing to it

Output

I've created a Postgres plugin in your staging project and configured the connection: ✓ Plugin created: postgres-staging-db (plugin ID: plg_xyz789) ✓ Environment variable set: DATABASE_URL=${{postgres-staging-db.DATABASE_URL}} The plugin is now provisioning. It typically takes 30-60 seconds to become available. Once ready, your services will automatically receive the DATABASE_URL variable with the connection string. You can verify the plugin status in your Railway dashboard.

Notes

This demonstrates Railway's infrastructure provisioning through the MCP. Creating plugins and variables are write operations that immediately affect your project. The MCP doesn't wait for the plugin to finish provisioning — you'll need to check separately if your service needs the database immediately. Requires API key with write permissions.

Prompt

@railway my api-service deployment crashed 10 minutes ago, pull the logs from the last hour and tell me what went wrong

Output

I retrieved the deployment logs for api-service. The crash occurred due to an unhandled database connection timeout: ``` [ERROR] 2024-01-15 14:23:41 - Connection pool exhausted after 30s [ERROR] 2024-01-15 14:23:41 - PostgresError: remaining connection slots reserved [FATAL] 2024-01-15 14:23:42 - Process exiting with code 1 ``` The logs show your Postgres connection pool hit its limit around 14:23 UTC. This suggests either a connection leak in your application code or insufficient database capacity for current traffic. Consider increasing your Postgres plan's connection limit or auditing your code for unclosed connections.

Notes

This pairs Railway's log retrieval with AI analysis to diagnose deployment failures. The MCP fetches raw logs, then the AI interprets them. Log retention depends on your Railway plan — free tier keeps logs for 7 days, paid plans retain longer. Large log volumes may hit API rate limits or require pagination.

Use-case deep-dives

Ephemeral PR environments for frontend teams

Railway wins when you spin up 20+ preview deploys per week

A 5-person frontend team ships 4-6 PRs daily and needs each one deployed for design review before merge. Railway's Get GitHub PR Info and Create Plugin tools let you script ephemeral environments that spin up on PR open and tear down on merge. The Delete Volume and Delete workspace tools clean up storage automatically, so you don't pay for stale preview data. This works best when your app boots in under 90 seconds and doesn't need complex multi-service orchestration—if you're running 8 microservices per preview, Railway's 18-tool scope gets clunky fast. For teams shipping visual work that needs stakeholder sign-off before production, Railway keeps the preview-to-merge cycle under 10 minutes without manual cleanup.

Incident response log triage

When Railway's deployment logs beat your APM for quick fixes

A 3-person SaaS ops team gets paged at 2am for a production timeout spike. They need to diff logs across the last three deploys to isolate the regression. Railway's Get Deployment Logs tool pulls runtime logs by deployment ID, so you can compare stderr output from the current deploy against the previous stable one without SSHing into containers or parsing S3 buckets. The Get Environment tool shows which service instances are live, so you know if the issue is scoped to one region or hitting all replicas. This beats a full APM setup when your team is under 10 people and you're not tracking distributed traces—once you hit 50+ deploys per day, Railway's log retrieval gets slow and you'll want structured observability. For small teams triaging regressions in under 15 minutes, Railway's log tools are faster than spinning up Datadog.

Customer support config lookup

Railway's variable tools work for support teams reading env state

A 2-person support team fields 30 tickets per week asking 'is feature X enabled for my account?' The answer lives in Railway environment variables set per customer workspace. Railway's Delete Variable tool (which also implies a read/list capability) lets support reps check the current config without asking engineering to SSH into production. The Get Environment tool shows which services are running in each customer's isolated workspace, so support can confirm a feature flag is live before telling the customer to refresh. This only works if your product uses Railway workspaces as customer tenants and you're comfortable giving support read access to env vars—if you're storing secrets or PII in those variables, Railway's API_KEY auth isn't granular enough. For B2B SaaS teams under 50 customers, Railway's config tools let support answer 'is it enabled?' in under 2 minutes without engineering.

Frequently asked

What can Railway MCP do in Switchy?

Railway MCP lets your team manage Railway infrastructure from Switchy's AI workspace. You can create plugins, delete volumes, retrieve deployment logs, manage environment variables, and control workspaces without switching to Railway's dashboard. It's useful for teams that want deployment operations in the same place they discuss them.

What Railway API key permissions does this MCP need?

You'll need a Railway API key with full project access. The MCP performs destructive operations like deleting volumes and workspaces, so use a key scoped to the projects your team actually manages in Switchy. Railway doesn't offer granular read-only tokens, so treat this connection like admin access to your Railway account.

Can Railway MCP deploy code or trigger builds?

No. This MCP reads deployment logs and environment details but doesn't push code or start new deployments. If you need to deploy, connect your repo to Railway directly or use Railway's CLI. The MCP is for inspecting and managing existing infrastructure, not replacing your CI/CD pipeline.

How is this different from using Railway's dashboard?

Railway MCP brings infrastructure operations into your team's AI workspace. Instead of switching tabs to check logs or delete a volume, you ask Switchy and it happens inline. The trade-off: you lose Railway's visual project map and can't configure new services from scratch. Use the MCP for routine ops, the dashboard for initial setup.

Who on the team should connect Railway to Switchy?

Whoever owns your Railway account or has the API key. Since the MCP can delete workspaces and volumes, don't share the connection with people who shouldn't have that access. If your team uses Railway's role-based permissions, this MCP bypasses them — it inherits whatever the API key can do.

More developer tools MCPs

See all developer tools MCPs →

Data last verified 61 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.