# Railway MCP MCP Server

> **Railway MCP MCP Server** is a hosted, multitenant Model Context Protocol (MCP) server run by **MewCP** (https://mewcp.com), giving AI agents managed access to Railway MCP.
>
> MewCP takes care of all MCP infrastructure for you — credential storage, OAuth flows,
> token refresh, and production-grade auto-scaling — so your AI agents can connect to
> third-party services and run freely without you managing any MCP server yourself.
>
> Server page:  https://mewcp.com/mcp/railway-mcp
> MewCP docs:   https://docs.mewcp.com
> Full catalog: https://mewcp.com/llms.txt

---

## About

Railway enables AI agents to manage cloud infrastructure by deploying applications, configuring services and environment variables, monitoring deployment logs, managing databases and domains, and controlling projects and environments on Railway.

---

## Details

- Server ID: `railway-mcp`
- Version: 1.0.0
- Tools: 68
- Authentication: OAuth, managed by MewCP
- Transport: http

---

## Access

The gateway URL below serves your **entire MewCP toolset**, not this server on its
own. Pasting a config snippet is not enough — Railway MCP has to be in the toolset
first. In order:

1. Add Railway MCP to your toolset at https://mewcp.com/mcp/railway-mcp
2. Connect your Railway MCP account (OAuth); MewCP stores the credential and attaches it to each call
3. Copy your MewCP API key from the dashboard (Developer)
4. Configure your client with the snippet for it below

Once connected, an agent does **not** see this server's tools as top-level tools.
It sees four meta-tools and reaches everything through them:

- `search(query)` — find tools by keyword across the toolset
- `get_schema(tools)` — full description and arguments for the tools you picked
- `list_accounts(provider)` — only when one app has several connected accounts
- `call_tool(server_maskedId, tool_name, args)` — execute

So the list below is what `search` can return for this server, not a set of
callable tool names on their own.

---

## Tools (68)

Descriptions are truncated to 160 characters; call `get_schema`
for the full text and the argument schema. Where a tool is annotated, its type
is shown — treat `destructive` as irreversible.

- `whoami` _(read)_ — Get the current authenticated Railway user's profile information
- `list-workspaces` _(read)_ — List the Railway workspaces the current user belongs to. Use a workspace ID with create-project to choose where a project is created.
- `list-projects` _(read)_ — List all Railway projects accessible to the authenticated user
- `create-project` _(write)_ — Create a new Railway project
- `create-deployment` _(write)_ — Create a new service from a GitHub repository and trigger its first deployment. The repo must be one the authenticated user has connected via GitHub. Returns…
- `create-service` _(write)_ — Create a new service in a project from a Docker image, or an empty service to configure later (e.g. before setting variables and attaching a source). Public…
- `update-service` _(destructive)_ — Update a service's configuration: build/start/pre-deploy commands and pre-deploy timeout, builder, healthcheck, sleep mode, root directory, cron schedule,…
- `delete-service` _(destructive)_ — Permanently delete a service: its deployments stop and are removed, along with its domains, variables and deployment triggers. Any volume attached to it is…
- `create-function` _(write)_ — Create a Railway Function: a service that runs one file of TypeScript on the Bun runtime, with no repository, Dockerfile or build step. Use this for webhook…
- `update-function-source-code` _(destructive)_ — Replace a Railway Function's source code. Send the complete file — this overwrites the function's code, it does not patch it, so anything you leave out is…
- `get-function-source-code` _(read)_ — Get a Railway Function's source code and runtime in an environment. Works for a function that is deployed and for one that exists only as a staged change —…
- `list-services` _(read)_ — List the ids and names of all services and environments in a Railway project. Prefer describe-environment for what is actually in an environment: it includes…
- `describe-environment` _(read)_ — Inventory of everything in a Railway environment — services, volumes, buckets, shared variable names — with staged changes applied. Each resource carries a…
- `describe-service` _(read)_ — Everything about one service in an environment: its config with staged changes applied (source, build, deploy, networking, volume mounts), the per-field staged…
- `get-staged-changes` _(read)_ — Show the changes staged in a Railway environment that accept-deploy would commit: per resource (service, volume, bucket, group) the action — create, delete,…
- `get-service-config` _(read)_ — Prefer describe-service: it applies the staged changes onto the live config for you and adds mounted volumes, domains, TCP proxies and the latest deployment.…
- `get-service-metrics` _(read)_ — Get resource usage metrics (CPU, memory, disk, network) for a service, summarized as current/average/min/max over a time window. Defaults to CPU_USAGE and…
- `list-variables` _(read)_ — List all environment variables for a service, fully rendered (reference variables like ${{Postgres.DATABASE_URL}} are resolved). With a Railway session or API…
- `set-variables` _(destructive)_ — Set one or more environment variables on a service (or environment-wide shared variables when serviceId is omitted). Existing variables with the same name are…
- `create-volume` _(write)_ — Create a persistent volume in a project and optionally attach it to a service at a mount path. The attach and redeploy are committed together so the service…
- `update-volume` _(destructive)_ — Update a volume's name, mount path, or which service it is attached to. Pass serviceId with mountPath to attach or move the volume; pass serviceId: null to…
- `delete-volume` _(destructive)_ — Permanently delete a volume and its data. The volume is unmounted from any service it is attached to (redeploying that service). By default it is removed from…
- `create-bucket` _(write)_ — Create an S3-compatible object storage bucket in a project and provision it in an environment. Default region is sjc. Pass staged: true to stage the bucket in…
- `update-bucket` _(destructive)_ — Rename a bucket. The name is project-wide (not per environment) and takes effect immediately. Reference variables address the bucket by name…
- `delete-bucket` _(destructive)_ — Permanently delete an object storage bucket and its contents. By default it is removed from every environment it is provisioned in; pass an environmentId to…
- `get-bucket-credentials` _(read)_ — Get the S3-compatible connection details for a bucket in an environment: endpoint, bucket name, region, URL style, access key and secret. With a Railway…
- `reset-bucket-credentials` _(destructive)_ — Regenerate the S3-compatible credentials for a bucket in an environment and return the new ones. The current access key stops working immediately; bucket data…
- `list-domains` _(read)_ — List all domains (Railway-generated service domains and custom domains) for a service in an environment. If environmentId is omitted, the production…
- `domain-status` _(read)_ — Get detailed status for one domain on a service, by hostname, URL, or domain ID: required DNS records and whether they currently match, ownership verification,…
- `generate-domain` _(write)_ — Expose a service publicly. Without `domain`, generates a Railway *.up.railway.app service domain (if the service already has domains, they are returned instead…
- `update-domain` _(destructive)_ — Repoint or rename an existing domain on a service. targetPort changes which container port the domain routes to (for a service listening on several ports).…
- `delete-domain` _(destructive)_ — Remove a domain from a service: a Railway-generated *.up.railway.app service domain or a custom domain. Requests to that hostname stop being routed to the…
- `retry-domain-certificate` _(write)_ — Request a new TLS certificate for a custom domain whose issuance failed. Use domain-status first: it reports the certificate error and whether a retry can help…
- `search-docs` _(read)_ — Search the Railway documentation (docs.railway.com) for features, configuration, guides, and tutorials. Returns matching sections with URLs — use fetch-docs to…
- `fetch-docs` _(read)_ — Fetch the full markdown content of a Railway documentation page by URL or slug (e.g. 'https://docs.railway.com/quick-start' or 'reference/variables'). Use…
- `search-templates` _(read)_ — Search the Railway template marketplace by name, description or keyword — databases (postgres, mysql, mongo, redis, clickhouse), their high-availability…
- `describe-template` _(read)_ — Read one Railway template: its name, description, README, the services it creates, every env-var input it takes (which are required and which are optional),…
- `deploy-template` _(write)_ — Deploy a Railway template into a project — a database (postgres, mysql, redis, mongo), a clustered high-availability database, or an application template.…
- `list-feature-flags` _(read)_ — List Railway feature flags (Signals) for a project and optionally the parent workspace. Project flags are editable with admin access; workspace flags are…
- `get-feature-flag` _(read)_ — Get a Railway feature flag (Signal) by name for a project or its parent workspace scope.
- `set-feature-flag` _(destructive)_ — Create a project-scoped feature flag or update its default value, optionally replacing its targeting rules. Use list-feature-flags and get-feature-flag to…
- `delete-feature-flag` _(destructive)_ — Delete a project-scoped feature flag. Workspace-scoped flags cannot be deleted from project context.
- `list-deployments` _(read)_ — List recent deployments for a Railway project, optionally filtered by environment, service, or status. Returns the most recent first, with who triggered each…
- `get-status` _(read)_ — Prefer describe-environment: it also lists services that exist only in the staged patch, unattached volumes, and each resource's staged state. Get the…
- `get-logs` _(read)_ — Get logs from Railway — deploy (runtime), build, http (proxy request), network-flow (per-connection egress/ingress) and dns (name lookups) streams. Pass a…
- `list-traces` _(read)_ — List distributed traces of an environment, newest first — one row per request that has at least one span matching the filter. Use it to find slow or failing…
- `get-trace` _(read)_ — Get the spans of one distributed trace, as a tree from the edge down through every service that handled the request. Find trace IDs with list-traces. Only…
- `get-tracing` _(read)_ — Read the tracing settings of an environment's services: whether each is traced and its auto-instrumentation switch. Pass serviceId for one service, omit it for…
- `get-tracing-coverage` _(read)_ — Report what one service's own instrumentation covers: the spans its app exported in the window, by span kind, by the remote system they name (database, cache,…
- `set-service-tracing` _(write)_ — Enable or disable tracing and auto-instrumentation for one service in one environment, each independently. tracingEnabled switches whether the edge traces…
- `http-requests` _(read)_ — Get HTTP request counts for a service, bucketed over time and split by response status class (2xx/3xx/4xx/5xx). Use this for traffic volume and the mix of…
- `http-error-rate` _(read)_ — Get the HTTP error rate for a service over time — the share of requests answered with a 5xx. Use this for reliability and to locate error spikes. 4xx responses…
- `http-response-time` _(read)_ — Get HTTP latency percentiles (p50, p90, p95, p99) for a service, bucketed over time, in milliseconds. Use this for performance and to find slow requests.…
- `redeploy` _(destructive)_ — Re-run the most recent deployment of a service in a given environment, reusing that deployment's existing build. Pass deploymentId to redeploy an earlier…
- `restart-service` _(destructive)_ — Restart a service's running deployment in place — the containers restart without rebuilding the image, and no new deployment is created (use redeploy for a…
- `get-deployment-diagnosis` _(read)_ — Get the AI-generated diagnosis for a failed deployment: root cause category, analysis, and suggested fixes, along with deployment context (service config,…
- `environment-status` _(read)_ — Health overview of every service in an environment in one call: current LIVE (settled) deployment state, replica status, recent failures, unresolved…
- `list-tcp-proxies` _(read)_ — List the TCP proxies exposing a service over the public internet on a raw TCP port (e.g. a database's public endpoint). Returns the public endpoint (host:port)…
- `create-tcp-proxy` _(destructive)_ — Expose a service on the public internet over a raw TCP port (e.g. make a database reachable externally). Creates a TCP proxy forwarding a public endpoint to…
- `delete-tcp-proxy` _(destructive)_ — Remove a service's TCP proxy, taking its public endpoint offline. Anything connecting through that endpoint (e.g. external database clients) loses access. Pass…
- `connect-service-source` _(destructive)_ — Attach a source to an existing service: a GitHub repository (deploys on push, builds immediately) or a Docker image. This is how a service that has never…
- `list-webhooks` _(read)_ — List a project's webhooks: for each, the URL Railway POSTs to, the deployment, monitor and volume-alert events that trigger it, whether it covers preview (PR)…
- `create-webhook` _(write)_ — Create a project webhook: Railway POSTs a JSON payload to the URL whenever one of the chosen deployment, monitor or volume-alert events happens in the project.…
- `update-webhook` _(destructive)_ — Change a project webhook's URL, the events that trigger it, or whether it covers preview (PR) environments. Only the fields passed change; eventTypes replaces…
- `delete-webhook` _(destructive)_ — Delete a project webhook so Railway stops POSTing to its URL. Get the webhook ID from list-webhooks. This cannot be undone; create-webhook makes a new one.
- `test-webhook` _(write)_ — POST a sample event payload to a URL and report the HTTP status it answered with, to check a webhook endpoint before creating or after updating a webhook. Pass…
- `accept-deploy` _(destructive)_ — DESTRUCTIVE: Commits all staged changes in a Railway environment and triggers a deploy. Only use this when the user has explicitly confirmed they want to…
- `railway-agent` _(destructive)_ — Hand a multi-step task in one project environment to Railway's own AI agent, for work too open-ended for the direct tools: investigating a failing deploy…

---

## Connect

Gateway URL: https://gateway.mewcp.com/personal/mcp

Every request carries one header:

    Authorization: Bearer <API_KEY>

Replace `API_KEY` with your own key from the dashboard (Developer).

## Apps

### Claude Desktop

Mac & Windows app

- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "mewcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://gateway.mewcp.com/personal/mcp",
        "--header",
        "Authorization: Bearer API_KEY"
      ]
    }
  }
}
```

Already have an "mcpServers" section in your config? Just add the server entry inside it.

1. Open Claude Desktop → Settings → Developer → "Edit Config"
2. Paste the snippet inside the outer { } of the config file (merge with your existing "mcpServers" section if you have one)
3. Save the file and restart Claude Desktop
4. Start a new conversation — your tool will be available

### VS Code

Copilot / Cline

- Command Palette → "MCP: Open User Configuration" (opens mcp.json). For one project only, use .vscode/mcp.json instead.

```json
{
  "mcp.servers": {
    "mewcp": {
      "type": "http",
      "url": "https://gateway.mewcp.com/personal/mcp",
      "headers": {
        "Authorization": "Bearer API_KEY"
      }
    }
  }
}
```

Already have a "servers" section in your mcp.json? Just add the server entry inside it.

1. Open VS Code → Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
2. Run "MCP: Open User Configuration" to open your mcp.json
3. Paste the snippet and save
4. Start the server when prompted (or from the MCP servers view) and use it in Copilot Chat

### Cursor

AI-first editor

- macOS: `~/.cursor/mcp.json`
- Windows: `%USERPROFILE%\.cursor\mcp.json`

```json
{
  "mcpServers": {
    "mewcp": {
      "url": "https://gateway.mewcp.com/personal/mcp",
      "headers": {
        "Authorization": "Bearer API_KEY"
      }
    }
  }
}
```

Already have an "mcpServers" section in your mcp.json? Just add the server entry inside it.

1. Open Cursor → Settings → Cursor Settings → MCP
2. Click "Add new global MCP server"
3. Paste the snippet and save
4. Restart Cursor

### Codex

OpenAI's CLI agent

- Add the snippet to your Codex MCP config or your standard MCP config file for the CLI tool you use.

```json
{
  "mcpServers": {
    "mewcp": {
      "type": "http",
      "url": "https://gateway.mewcp.com/personal/mcp",
      "headers": {
        "Authorization": "Bearer API_KEY"
      }
    }
  }
}
```

Codex generally reads a standard MCP server block, so you can add this alongside your other configured servers.

1. Open your Codex MCP config or project-level config file
2. Paste the MewCP server block inside the config JSON/TOML structure your tool expects
3. Save the file and restart Codex
4. Verify the tool is available inside a fresh session

### Claude Code

Anthropic's CLI agent

- ~/.claude.json (user scope) or .mcp.json in your project root — create it if it doesn't exist. Or skip the file and use the CLI command below.

```json
{
  "mcpServers": {
    "mewcp": {
      "type": "http",
      "url": "https://gateway.mewcp.com/personal/mcp",
      "headers": {
        "Authorization": "Bearer API_KEY"
      }
    }
  }
}
```

Already have an "mcpServers" section in your config? Just add the server entry inside it.

1. Open ~/.claude.json (or .mcp.json in your project root) in a text editor
2. Paste the snippet inside the outer { } (merge with your existing "mcpServers" section if you have one)
3. Save the file and start (or restart) Claude Code
4. Or skip the file entirely and run the CLI command below instead

### OpenCode

Open-source terminal agent

- ~/.config/opencode/opencode.json (global) or opencode.json in your project root — create it if it doesn't exist.

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "mewcp": {
      "type": "remote",
      "url": "https://gateway.mewcp.com/personal/mcp",
      "enabled": true,
      "headers": {
        "Authorization": "Bearer API_KEY"
      }
    }
  }
}
```

Already have an "mcp" section in your opencode.json? Just add the server entry inside it.

1. Open ~/.config/opencode/opencode.json (or opencode.json in your project root) in a text editor
2. Paste the snippet inside the outer { } (merge with your existing "mcp" section if you have one)
3. Save the file and start (or restart) OpenCode

### OpenClaw

Self-hosted agent gateway

- ~/.openclaw/openclaw.json — create it if it doesn't exist.

```json
{
  "mcp": {
    "servers": {
      "mewcp": {
        "transport": "streamable-http",
        "url": "https://gateway.mewcp.com/personal/mcp",
        "enabled": true,
        "headers": {
          "Authorization": "Bearer API_KEY"
        }
      }
    }
  }
}
```

Already have an "mcp" section in your openclaw.json? Just add the server entry inside "servers".

1. Open ~/.openclaw/openclaw.json in a text editor
2. Paste the snippet inside the outer { } (merge with your existing "mcp" section if you have one)
3. Save the file and restart OpenClaw

### Antigravity

Google's agentic IDE

- ~/.gemini/config/mcp_config.json (global) or .agents/mcp_config.json (workspace-local) — create it if it doesn't exist.

```json
{
  "mcpServers": {
    "mewcp": {
      "serverUrl": "https://gateway.mewcp.com/personal/mcp",
      "headers": {
        "Authorization": "Bearer API_KEY"
      }
    }
  }
}
```

Already have an "mcpServers" section in your config? Just add the server entry inside it. Remote servers must use the "serverUrl" field — the legacy "url"/"httpUrl" fields aren't supported.

1. In the editor's agent side panel, click "…" → "MCP Servers" → "Manage MCP Servers" → "View raw config" (Antigravity CLI: type /mcp instead to open the Interactive MCP Manager)
2. Paste the snippet inside the outer { } (merge with your existing "mcpServers" section if you have one)
3. Save the file — the server connects automatically

### Hermes

Nous Research's CLI agent

- config.yaml in your Hermes config directory (~/.hermes) — add this under a top-level "mcp_servers:" key.

```yaml
mcp_servers:
  mewcp:
    url: "https://gateway.mewcp.com/personal/mcp"
    headers:
      Authorization: "Bearer API_KEY"
```

Already have an "mcp_servers" section in your config.yaml? Just add the server entry inside it.

1. Open config.yaml in your Hermes config directory
2. Paste the snippet under the top-level "mcp_servers:" key (merge with existing entries if you have any)
3. Save the file, then run /reload-mcp in Hermes (or start a fresh session)
4. Ask Hermes "Tell me which MCP-backed tools are available right now" to confirm it connected

### DeepSeek Harness

DeepSeek's agent harness

- cordis.yml in your DSH project — or the patch file you mount plugins from.

```yaml
- id: mcp-mewcp
  name: '@deepseek-ai/dsh-mcp-client'
  config:
    serverName: mewcp
    transport: streamable-http
    url: https://gateway.mewcp.com/personal/mcp
    headers:
      Authorization: "Bearer API_KEY"
```

One plugin instance = one MCP server. Add this entry to your plugin list; don't nest it inside another entry.

1. Open cordis.yml (or your patch file) in your DSH project
2. Paste the entry into your plugin list, keeping the leading dash and indentation
3. Restart DSH (or let HMR reload) — tools register as mcp__mewcp__<tool_name>
4. Verify with: dsh web --dump-config | grep -A3 mcp

## SDKs

### Python

fastmcp client

```python
import asyncio
from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport

SERVER_URL = "https://gateway.mewcp.com/personal/mcp"
API_KEY = "API_KEY"

transport = StreamableHttpTransport(
    url=SERVER_URL,
    headers={
        "Authorization": f"Bearer {API_KEY}",
    }
)

async def main():
    client = Client(transport)
    async with client:
        tools = await client.list_tools()
        print(tools)

asyncio.run(main())
```

1. Install fastmcp: pip install fastmcp
2. Copy the snippet into your project
3. Replace API_KEY with your key from the dashboard
4. Run your script

### TypeScript

MCP SDK

```typescript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const SERVER_URL = "https://gateway.mewcp.com/personal/mcp";
const API_KEY = "API_KEY";

const transport = new StreamableHTTPClientTransport(new URL(SERVER_URL), {
  requestInit: {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
    },
  },
});

const client = new Client({ name: "mewcp-client", version: "1.0.0" });
await client.connect(transport);

const tools = await client.listTools();
console.log(tools.tools.map((t) => t.name));
```

1. Install: npm install @modelcontextprotocol/sdk
2. Copy the snippet into your project
3. Replace API_KEY with your key from the dashboard
4. Run with Node 18+ as an ES module (e.g. npx tsx script.ts)