Skip to content

MCP Hub

The MCP Hub is a single Railway service that hosts many MCP servers as subprocesses. Admins can install new MCPs from a curated catalog or from any PyPI / npm / GitHub URL — without touching Railway, without waiting on the developer team.

Every hub-hosted MCP flows through the same plumbing as a dedicated MCP service: it appears in the MCP Servers registry, supports Packages and Subscriptions, enforces per-tool entitlements at the gateway, and tracks usage per tool.

When to use the Hub

Use the Hub for:

  • OSS MCPs from PyPI or npm that run over stdio (e.g. mcp-pandoc, @modelcontextprotocol/server-filesystem, mcp-server-fetch)
  • Lightweight utilities (time, sqlite, markdown conversion)
  • Prototyping a new MCP before promoting it to a dedicated service
  • Per-customer tool additions you want to ship quickly

Keep a dedicated Railway service for:

  • High-throughput MCPs where the Hub’s shared CPU/memory would cause contention
  • Vendor-tokened products you resell at scale (LogicMonitor, ConnectWise) — isolation matters for SLAs
  • MCPs needing custom network policy (VPN egress, private VPC)

The Hub and dedicated services coexist — the portal registry treats them identically.

The admin flow

Install from the catalog

  1. Portal → MCP Hub (admin nav, under APIs)
  2. Find the MCP in the Catalog grid at the bottom of the page
  3. Click Install
  4. Pick a slug (url-safe id), display name, and tool prefix (auto-suggested)
  5. If the MCP requires a secret (shown with a 🔑 icon on the card), pick a Credentials Vault entry or paste the raw value
  6. Leave Auto-register in MCP Servers registry + discover tools checked (the default)
  7. Click Install

The hub installs the package in the background. Within 30–60 seconds you’ll see:

  • Hosted MCPs row appears with status: running
  • An entry in MCP Servers with the tool prefix, gateway wrapping enabled, and discovered tools
  • The Suggested Packages dialog opens automatically offering default packages to create

Install by URL

For MCPs not in the catalog, click + Add by URL at the top of the page.

Source Example
PyPI (uvx) mcp-pandoc or mcp-server-fetch
npm (npx) @modelcontextprotocol/server-time
GitHub URL https://github.com/vendor/mcp-foo

The hub clones/downloads, attempts a test spawn, and (if successful) auto-registers.

Managing hosted MCPs

The Hosted MCPs table shows every installed MCP with live status.

Action What it does
↻ Restart Kills the subprocess and respawns it. Resets the crash counter. Use after updating a vault credential the MCP reads at startup.
✕ Uninstall Stops the subprocess, removes from the hub pool. Does not delete the MCP Servers registry entry — do that from the MCP Servers page if you also want to remove package assignments.

Status values:

  • installing — package download in progress
  • running — subprocess alive and responding
  • stopped — idle-killed after 15 min of no calls; respawns on next request
  • crashed — three exits in 60s; needs admin attention. Check the error below the status for the stderr tail.

Idle behavior

Subprocesses are killed after 15 minutes with no tool calls to keep memory usage low. The next customer request respawns the subprocess automatically — usually in ~200ms for cached packages. First-ever spawn may take longer while uvx or npx resolve dependencies.

The catalog

Curated MCPs shipped with the hub:

Slug Runtime Description Secret
pandoc Python Convert documents between formats none
time Node Get current time, convert timezones none
filesystem Node Read/write files in a sandboxed directory none
sqlite Node Query SQLite databases via SQL none
fetch Python Fetch URLs and return HTML/text none
github Node Read/write GitHub repos via GitHub API PAT
brave-search Node Web search via Brave Search API API key

Additions are reviewed via PR — see apps/mcp-hub/src/catalog.ts in the repo.

Credentials and OAuth

Each hub-installed MCP can have its own:

  1. Upstream credential (vendor PAT, API key) — stored in the Credentials Vault and injected as an env var at subprocess spawn time. The hub resolves @credential:<uuid> sentinels to plaintext only at the moment of spawn — secrets never persist on disk.
  2. Dedicated Authentik OAuth application — created programmatically via the Phase 1 Authentik integration. Client ID/secret auto-stored in the vault.

When installing an MCP that requires a secret (🔑 icon in the catalog), the install modal shows a Credential Source dropdown populated from your vault. Picking one stores @credential:<uuid> in the hub’s env map, which the credential resolver reads at spawn time.

What hub-hosted MCPs inherit for free

Because the hub auto-registers each MCP in the same registry as dedicated services, they automatically get:

  • Tool discovery + auto-tags — resource tags derived from tool names
  • Suggested packages dialog — admin reviews and creates bundles in one click
  • Packages — mix HTTP endpoints + MCP tools from different servers in one bundle
  • Subscriptions — attach packages to customer subscriptions
  • Per-tool entitlement enforcement at the gateway
  • Per-tool usage tracking (shows up in Dashboard)
  • Audit log entries (mcp_server.tool_called, mcp_hub.install_requested)

Troubleshooting

Symptom Likely cause Fix
crashed status after install Subprocess exited immediately Check lastError below the row — stderr tail is included
crashed — “directory does not exist” Filesystem MCP path missing Hub’s Dockerfile creates sandbox dirs; redeploy hub if you see this on a fresh install
Tool call returns “Missing arguments” MCP declares empty inputSchema but requires args Use the Raw JSON arguments fallback in the Invoke Tool UI
installing stuck for >3 min npm/uvx network timeout Click Uninstall, then Install again — the cache from the first attempt speeds up the retry
Tool not discovered after install Test spawn succeeded but tools/list failed Click Discover Tools on the MCP Servers detail page to retry
Customer gets “Access denied” Subscription missing the package Attach the auto-scaffolded package to the customer’s subscription

Security posture

  • The hub’s admin API (/admin/*) requires X-Internal-Token. The portal keeps the token server-side — UI never handles it directly.
  • The hub’s hosted MCP endpoints (/hosted/:slug/mcp) are reachable only from the gateway on internal Railway networking.
  • The hub should have its public Railway domain removed in production — all traffic flows through mcp-hub.railway.internal:4000.
  • Each subprocess inherits only the env vars the hub explicitly passes it. Credential sentinels (@credential:<uuid>) are resolved per-spawn via the vault and cached in memory for 2 minutes.
  • Subprocess crashes are tracked: three exits in 60 seconds marks the MCP as crashed and requires admin restart.