MCP Hub

A Node.js manager for MCP servers: it starts local servers, connects remote ones and gives a client one address, with a REST API for control

  • 524 ★ on the repository
  • Last commit
  • MIT
MCP server

Broad access

Why this level

  • Runs any command from the config, including through the `${cmd: ...}` substitution
  • Holds the tokens and keys of every server and passes them a shared environment through `MCP_HUB_ENV`
  • Calls the tools of any connected server through the REST API, and no access check for the hub itself is described
All reasons and checks

ravitemer/mcp-hub

Install

Manual install

npm install -g mcp-hub

Node.js 18 or newer is required. Start with `mcp-hub --port 3000 --config path/to/config.json`.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Runs any command from the config, including through the `${cmd: ...}` substitution
  • Holds the tokens and keys of every server and passes them a shared environment through `MCP_HUB_ENV`
  • Calls the tools of any connected server through the REST API, and no access check for the hub itself is described

This is third-party code. Review the repository files before installing.

What it does

MCP Hub is a Node.js program that sits between a client and a set of MCP servers. In a config file you describe the servers: local ones start with a command, arguments and environment variables (stdio), remote ones connect by address (streamable HTTP or SSE) with headers or an OAuth 2.0 with PKCE login. The hub keeps connections open, watches state and reconnects failed servers with a backoff. A client needs just one hub address, `/mcp`. Through it the tools, resources, resource templates and prompts of all servers are available, and a server prefix is added so names do not clash, for example `filesystem__search`. When a server is added, disabled or changes its tool list, the hub notifies clients at once. Control goes through a REST API under `/api/*`: server list, start, stop, capability refresh, tool calls, resource reads, prompt fetches and hub restart. Events reach clients over SSE. A separate part of the API shows a catalog of servers from the MCP Registry, where you can search and install servers.

Who it is for. For developers who have connected dozens of MCP servers to agents and want to keep the configuration in one place and give each client a single address.

Good fit when

  • The same MCP servers are needed in Claude Desktop, Cline and an editor, and you do not want to duplicate their settings in every client
  • Servers must be switched on and off while you work, without restarting the client
  • Shared keys and tokens should come from a password manager through a command in the config rather than sit in client files
  • A project needs its own set of servers on top of a global one: several config files merge in order
  • A local server under development should restart when its files change

Not a fit when

  • You need company users, roles and an access log for servers: the docs describe no such check for the hub itself
  • You work with one or two servers and a separate process only complicates the setup
  • A client needs roots, sampling or completion: the hub does not support them
  • You need a hosted solution with an interface and accounts: the metamcp entry describes that role
  • Your Node.js is older than version 18: the hub requires 18 or newer

Example request

Show which servers are connected to the hub, switch off the database server and tell me which tools are still available

MCP

Transport
http, sse, stdio
Authentication
not required

Environment variables

MCP_HUB_ENV secret
JSON with values the hub adds to the environment of every managed server

Limitations

The hub runs any command from the config file, and the `${cmd: command}` substitution runs commands when the settings are read, so never load configs from sources you do not trust. MIT License.

The `MCP_HUB_ENV` variable with JSON passes its values into the environment of every managed server, and values from a server's own `env` block override it. All managed servers get the rights of the account that runs the hub.

The web interface is only planned and not marked as done: control goes through the REST API. The docs describe neither an access key nor an address binding for the hub, so keep the port set with `--port` on the local computer. The examples use ports 3000 and 37373, so check the client port against the one that is running.

The log is written to `~/.local/state/mcp-hub/logs/mcp-hub.log`. The server catalog comes from a registry on GitHub Pages and is cached for an hour. Missing config files are skipped silently.

How to disable. Stop the `mcp-hub` process and remove the hub address from client settings. The package is removed with `npm uninstall -g mcp-hub`. Delete the config file and the `~/.local/state/mcp-hub` folder with the log and the working directory cache by hand.

FAQ

How do I install and start the hub?

Run `npm install -g mcp-hub`, then `mcp-hub --port 3000 --config path/to/config.json`. The `--port` and `--config` flags are required, and `--config` can repeat: files merge in order and later ones override earlier ones.

What do I put in the client?

One server with the hub's `/mcp` address, for example `http://localhost:37373/mcp` in the docs example. Use the port you passed with `--port`.

How are tool name clashes avoided?

The hub adds the server prefix to the name, so `search` from a file server and from a database server stay separate tools, for example `filesystem__search` and `database__search`.

Does the hub work with a VS Code configuration?

Yes. The `mcpServers` and `servers` keys are supported, along with the `${env:NAME}`, `${workspaceFolder}`, `${userHome}` and `${input:id}` variables, and values for the last come from `MCP_HUB_ENV`. You can pass `.vscode/mcp.json` with `--config`.

How do I restart a local server when code changes?

Add a `dev` block to the server with a `watch` array of file masks and a required absolute `cwd` path. The hub watches those files and restarts the server on change.

How do I check that the hub is alive?

A `GET /api/health` request returns the hub state, version, number of active clients, the server list with their capabilities and working directory details.

Discussion

No questions or reviews yet.

A self-hosted gateway that merges several MCP servers into one endpoint with auth and tool selection

MCP serverBroad access2.7KRepository stars

MCP SSH Manager

mcp-ssh-manager

Managing several SSH connections from Claude Code and Codex: commands, file transfer, databases and backups

MCP serverBroad access527Repository stars

An SSH MCP server: the agent runs commands, reads and writes files over SFTP, transfers files and starts long jobs while credentials stay with you

MCP serverBroad access988Repository stars

MCPM

mcpm

A package manager and registry for MCP on all platforms and clients: finds, adds and configures MCP servers, remembers the source and updates

CLIExtended access1KRepository stars

Self-hosted MCP server for running commands on remote servers over SSH, with tokens and roles

MCP serverBroad access2Repository stars

A proxy between MCP transports: connects stdio clients to remote SSE and HTTP servers and exposes local servers over the network

MCP serverExtended access2.8KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
MCP Hub (this entry)nonot required524
MetaMCPnoAPI key2,735a self-hosted gateway with authorization and tool selection that gathers servers into one endpoint
MCP Hubno1,789a Neovim client that works with MCP Hub right in the editor

README in short

The repository describes both sides of the hub: the REST management interface and the single MCP connection point. A capability table shows transports, sign-in kinds, change notifications and that roots, sampling and completion are not supported. Then come installation, start flags, the config format with substitutions and a development mode, VS Code compatibility, Nix installation, a REST API and SSE event reference, logging, lifecycle diagrams, tests and a Node.js client example. `TROUBLESHOOTING.md` and `CHANGELOG.md` sit separately.

README badge

Report a problem

Foxx AIMCP Hub
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.