mcp-hub
Serve many stdio MCP servers from one container over HTTPS with OAuth 2.1
- Pricing
- Open source
- Platforms
- self-hosted, CLI, Linux
- Runs
- Locally or Remotely
- Version
- 0.12.0
- Listing updated
- 3 days ago
About mcp-hub
mcp-hub is an open-source MCP server for developer tools. It can run locally on your machine or as a hosted remote server.
mcp-hub is a gateway for people who run several local MCP servers and want to reach them from clients that cannot start a process, such as ChatGPT connectors, Claude on the web, Le Chat, Cursor and LibreChat. One container takes the place of a separate auth proxy per server. The config file is the same mcpServers format Claude Code uses, so existing entries copy over, and each server gets its own endpoint at /name/mcp.
A /hub aggregate endpoint exposes every server through six meta-tools, so the model holds six schemas instead of every tool of every server. Servers start when used and go to sleep after 60 idle minutes by default, answering tool lists from a stored snapshot. A server or individual tools can be marked locked, so a model that calls them gets an unlock link instead of a result, and the person unlocks them with a password and an authenticator code.
It answers both MCP revisions, 2026-07-28 and 2025-11-25, on every endpoint, passes elicitation and change notifications through, and offers a stdio mode for clients that can only launch local processes. Login is a single password, with optional TOTP, plus long-lived API tokens for clients without OAuth.
Install
Run in a terminal
claude mcp add mcp-hub -- npx -y @ni-c/mcp-hubAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-hub": {
"command": "npx",
"args": [
"-y",
"@ni-c/mcp-hub"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-hub": {
"command": "npx",
"args": [
"-y",
"@ni-c/mcp-hub"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-hub": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ni-c/mcp-hub"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-hub": {
"command": "npx",
"args": [
"-y",
"@ni-c/mcp-hub"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-hub": {
"command": "npx",
"args": [
"-y",
"@ni-c/mcp-hub"
]
}
}
}Configuration
CONFIG_PATHPath to the mcp.json listing the servers to expose, in Claude Code's mcpServers format (default mcp.json in the working directory)IDLE_TIMEOUT_MINUTESMinutes of inactivity before a server is put to sleep; 0 starts every server at launch and keeps it running (default 60)TOOL_CACHE_PATHTool snapshots of sleeping servers (default .mcp-hub/tool-cache.json beside the config)LOG_FILEMirror the hub's log lines into this file; stdout carries the protocol, so logging goes to stderr otherwiseEXTERNAL_URLPublic base URL exactly as clients see it, e.g. https://mcp.example.net (no path)RequiredPASSWORD_HASHbcrypt hash of the OAuth login password (htpasswd -bnBC 10 "" 'pw' | tr -d ':\n')RequiredTWO_FACTORSet to totp to ask for a one-time code from an authenticator app at every sign-in. Default off.TOTP_SECRETBase32 secret the authenticator app was set up with (mcp-hub-admin totp init). Read only when TWO_FACTOR is totp.TRUSTED_PROXIESComma-separated IPs/CIDRs of the reverse proxy allowed to set X-Forwarded-* headersCLIENT_REGISTRATIONWhich mechanisms a client may use to obtain a client_id: cimd (Client ID Metadata Documents), dcr (RFC 7591 dynamic registration), or bothCIMD_ALLOWED_ORIGINSComma-separated https origins whose client ID metadata documents are accepted, e.g. https://chatgpt.com; unset admits every https originPORTListen port inside the container
Tools this server provides (6)
Taken from the project documentation; the running server may differ.
- list_servers
- Lists the servers behind the hub.
- list_tools
- Lists the tools of a server.
- get_tool_schema
- Returns the schema of one tool.
- call_tool
- Calls a tool on a server.
- wake_server
- Starts a sleeping server.
- sleep_server
- Puts a server to sleep.
What it does
- Claude Code config format
- Reads the same mcpServers file, with stdio, http and sse upstreams.
- Per-server endpoints
- Gives each server a Streamable HTTP path at /name/mcp.
- Aggregate meta-tools
- One connector reaches every server through six meta-tools.
- Tool filtering
- allowTools and denyTools hide tools and refuse calls to them.
- Locked servers
- Dangerous servers or tools need a password and authenticator code to unlock.
- Sleep on idle
- Servers start on demand and sleep after 60 idle minutes by default.
Good for
- Reach home-lab stdio servers from ChatGPT or Claude on the web
- Replace one auth-proxy container per server
- Keep a shell or mailbox server locked until you approve
- Cut tool schema size in the model's context
- Give API-only clients a token to reach local servers
Pricing
Open source
Open source, self-hosted; no price listed
Prices change. Check mcp-hub.ni-c.de before you buy.
mcp-hub FAQ
How is it installed?
Through the npm package @ni-c/mcp-hub for stdio use, or the ghcr.io/ni-c/mcp-hub container image for the HTTPS gateway.
What does the container need to start?
EXTERNAL_URL and PASSWORD_HASH are required, the latter a bcrypt hash of the login password.
What are the six meta-tools?
list_servers, list_tools, get_tool_schema, call_tool, wake_server and sleep_server.
Can it run without HTTP?
Yes. mcp-hub --stdio serves the same aggregate over stdin/stdout, with no TLS or login, for clients like Claude Desktop and Codex.
Is mcp-hub free?
Yes. mcp-hub is open source, so you can use and self-host it for free.
How do I add mcp-hub to Claude Code?
Run this command in your terminal: claude mcp add mcp-hub -- npx -y @ni-c/mcp-hub
What are the best alternatives to mcp-hub?
The closest alternatives to mcp-hub are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to mcp-hub

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools