MCP Hub logo

MCP Hub

Aggregates stdio MCP servers behind HTTPS, OAuth 2.1, per-server routes, or one filtered meta-tool endpoint.

Install MCP Hub

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-hub": {
      "command": "npx",
      "args": [
        "-y",
        "@ni-c/mcp-hub"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

mcp-hub MCP server runs multiple stdio and remote MCP servers behind one Node process and exposes them over Streamable HTTP. It provides per-server paths, a `/hub` aggregate with six management tools, and a local `--stdio` mode for clients that spawn processes. HTTPS endpoints use OAuth 2.1 with a single password, while long-lived API tokens support clients that cannot use OAuth. Reach for it when remote or local MCP clients need access to several servers without deploying a separate proxy for each one.

Use cases

  • Aggregate several MCP servers behind one HTTPS endpoint
  • Expose local stdio servers to clients that cannot spawn processes
  • Filter each server's tools before exposing them to agents
  • Reduce resource use by sleeping inactive child servers
  • Connect remote OAuth-enabled MCP servers through one gateway

Key features

  • Per-server HTTPS routing and a `/hub` aggregate endpoint
  • OAuth 2.1 authentication with API token support
  • On-demand server startup, idle sleeping, and supervision
  • Per-server allow and deny tool filters
  • Dual MCP revision support with subscriptions and elicitation
  • Local aggregate access through standard input and output

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

10/10 checks healthy over the last 55d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · @ni-c/mcp-hub (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads1.3kPackage downloads in the last 30 days.
Last commit2d agoMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Hub works

What mcp-hub does

mcp-hub consolidates multiple MCP servers behind one gateway. It can launch stdio and Docker-based servers on demand, connect to remote upstreams, and publish the resulting tools through Streamable HTTP. Each configured server receives a path such as /paperless, while /hub presents one aggregate endpoint for reaching all configured servers.

The aggregate endpoint avoids loading every server's tool schema into the model context at once. Its six meta-tools let a client list servers, inspect available tools and schemas, call a tool, or wake and sleep a server. Clients that can run a local process can use the same aggregate through mcp-hub --stdio.

How it works

Configuration follows the mcpServers structure used by Claude Code, allowing existing server entries to be reused. The gateway supervises child processes, restarts failed children with exponential backoff, and returns a 503 response when a server is unavailable. Configuration changes are hot-reloaded, affecting only the servers that changed.

Stdio and Docker servers can be started when first needed and put to sleep after 60 minutes without activity. Their tool metadata remains available from a persistent snapshot while they are asleep. keepAlive: true prevents an individual server from sleeping, while IDLE_TIMEOUT_MINUTES=0 disables the hub-wide idle behavior.

Every endpoint supports the MCP revisions 2026-07-28 and 2025-11-25, with the client selecting the revision. The gateway translates subscription behavior between these revisions and can forward elicitation requests from child servers on the newer revision. Server-level settings can disable elicitation or subscriptions.

Setup and configuration

The deployment is a single Node process or container. Network access uses HTTPS and OAuth 2.1, protected by one password. Client registration supports Client ID Metadata Documents and dynamic registration for older clients; administrator-issued credentials are available for clients that support neither approach. CLIENT_REGISTRATION can disable either registration mechanism.

Remote servers can define an oauth configuration so the hub obtains and refreshes upstream tokens. Depending on the upstream, authentication can use issued credentials, dynamic registration, a client metadata document, or the client-credentials flow. Interactive upstream authorization is initiated with mcp-hub-admin upstream login.

The local --stdio mode does not use TLS or login because its trust boundary is the local user. It uses the same MCP server configuration and exposes the aggregate endpoint through standard input and output.

Tools and capabilities

  • Route each configured server through its own HTTP path.
  • Aggregate servers behind /hub with list_servers, list_tools, get_tool_schema, call_tool, wake_server, and sleep_server.
  • Restrict exposed tools with allowTools and denyTools, including exact names and list_* prefixes.
  • Apply filtering both when listing tools and when rejecting direct calls to filtered tools.
  • Keep child processes alive, restart failed processes, and park unused crash-looping servers.
  • Pass tool, prompt, and resource change notifications between clients and children.
  • Support long-lived API tokens for clients that cannot use OAuth.
  • Store state in a JSON file and signing key under /data, without a database.

Limitations and notes

Tool filtering is configured per server and applies before a sleeping server is woken. A server that requires reauthorization is reported as unauthorized through the hub. Sleeping servers do not maintain active subscriptions; they are prompted to re-read state when they wake.

The gateway is designed for MCP servers whose entries fit the Claude Code mcpServers format. Its HTTP endpoints are stateless Streamable HTTP endpoints, so connection state is not kept in a session table. Clients that cannot spawn local processes should use the HTTP deployment, while clients that support local process spawning can use --stdio.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Hub

mcp-hub is an MCP server that connects clients to multiple stdio, Docker, and remote MCP servers through one gateway. Its main tools include server discovery, tool listing, schema retrieval, tool calls, and server wake or sleep controls. It supports HTTPS, OAuth 2.1, per-server routes, and local `--stdio` access.

Run mcp-hub as a single Node process or container, then provide an MCP configuration using the Claude Code `mcpServers` format. The gateway can publish servers over HTTPS or expose the aggregate through `mcp-hub --stdio`.

Configure the servers in the `mcpServers` format and connect clients to the `/hub` aggregate endpoint. The aggregate supplies tools for discovering servers, inspecting schemas, calling tools, and controlling server lifecycle.

Yes. Cursor can reach the servers through the Streamable HTTP deployment. The gateway also supports per-server HTTP paths and a `/hub` aggregate endpoint, with OAuth 2.1 authentication for network access.

Use a long-lived API token. mcp-hub supports tokens for clients such as the OpenAI Responses API, xAI API, and Gemini API, which can authenticate without the OAuth flow.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Hub AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-hub?style=directory)](https://allmcps.com/mcp/mcp-hub)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-hub"><img src="https://allmcps.com/api/badge/mcp-hub?style=directory" alt="MCP Hub on AllMCPs" /></a>