mcp-hub-server
v1.0.0
Published
MCP hub/aggregator server — expose multiple MCP servers through a single endpoint
Downloads
105
Maintainers
Readme
mcp-hub-server
MCP hub/aggregator server. Takes a config file listing multiple MCP servers and exposes them all through a single MCP server endpoint.
This solves the problem of managing many MCP servers in Claude Desktop, Cursor, or any other MCP client — instead of configuring 10 servers individually, point the client at a single hub.
How it works
- Reads a config file listing MCP servers (command + args + env)
- Spawns each server as a child process (stdio transport)
- Performs MCP
initializehandshake with each child - Collects all tools and resources from all servers
- Prefixes tool names with the server name (e.g.,
filesystem_read_file,github_create_issue) - Exposes everything through stdout as a single MCP server
- Routes incoming tool calls to the correct child server based on the prefix
Install
npm install -g mcp-hub-serverOr run directly:
npx mcp-hub-server --config mcp-hub.yaml --verboseConfig
Create mcp-hub.yaml (or .json):
servers:
- name: filesystem
command: npx
args: ["@anthropic/mcp-server-filesystem", "/home/user"]
- name: github
command: npx
args: ["@anthropic/mcp-server-github"]
env:
GITHUB_TOKEN: "your-token"
- name: custom
command: node
args: ["./my-server.js"]Each server entry:
| Field | Required | Description |
|-----------|----------|------------------------------------|
| name | yes | Unique name, used as tool prefix |
| command | yes | Executable to spawn |
| args | no | Command-line arguments |
| env | no | Extra environment variables |
Usage
mcp-hub-server [options]
Options:
-c, --config <path> Config file path (default: "mcp-hub.yaml")
-p, --port <number> SSE port (optional, for SSE mode)
-v, --verbose Verbose logging
-V, --version Output version number
-h, --help Display helpClaude Desktop config
{
"mcpServers": {
"hub": {
"command": "npx",
"args": ["mcp-hub-server", "--config", "/path/to/mcp-hub.yaml"]
}
}
}This single entry replaces all individual server entries.
Tool naming
Tools are prefixed with the server name and an underscore:
- Server
filesystemtoolread_filebecomesfilesystem_read_file - Server
githubtoolcreate_issuebecomesgithub_create_issue
The hub automatically routes calls back to the correct server.
License
MIT
