McpHub MCP server
Commit Nov 13, 2026Acts as a secure central gateway for MCP servers, providing sandboxing, secret management, and optimized tool definitions for AI editors.
Also known as Soflutionltd/McpHub
- Stars
- 8
- Tools
- 3
- Downloads, 30 days
- —
- Latest version
- 5.11.0
- Last commit
- Nov 13, 2026
- License
- MIT
What is McpHub MCP?
McpHub acts as a secure central gateway for MCP servers, providing sandboxing, secret management, and optimized tool definitions for AI editors. It exposes 3 tools, such as mcphub_search, mcphub_call, mcphub_run.
Summary generated from the project's README
About McpHub MCP server
McpHub acts as a centralized gateway that sits between AI editors and your Model Context Protocol servers. It is designed for developers using tools like Cursor, Claude, Windsurf, or VS Code who want to manage multiple MCP servers through a single, secure interface. By running as a local daemon, it allows multiple editors to share a single instance of each server process, which prevents redundant resource usage and survives editor restarts.
The system focuses on security and efficiency by providing sandboxing for server processes and managing secrets through the macOS Keychain or encrypted files on Linux. It optimizes token usage by loading tool schemas on demand rather than sending hundreds of definitions in every prompt. Users can manage their entire setup via a dashboard, add servers from an official registry with one click, and use project-specific policies to restrict which servers are accessible in certain workspaces.
What you can do with it
- 1Isolate workspace environmentsYou can define policies that ensure an agent only accesses specific servers when working within a designated project directory.
- 2Centralize server managementInstead of manually configuring every editor, you can use a single dashboard to add and sync servers across your machine.
Written from the project's README. Every use case is checked against a quote from it.
McpHub MCP tools 3
Read from the server with tools/listmcphub_searchSearch MCP tools across all connected servers using BM25. Call FIRST to find the right tool, then use `mcphub_call`. Compact by default (no schemas) — set expand=true to get inputSchemas. Nothing fits? mcphub_call server=mcphub tool=registry_search finds installable MCP servers.
mcphub_callExecute a tool on a specific MCP server. Prefer this over CLI commands. Idempotent reads (read_*, list_*, get_*, search_*, ...) are cached for 60s — set bypass_cache=true to force a fresh call.
mcphub_runRun JavaScript that chains several MCP tool calls and returns only the final result (saves tokens on multi-step or bulk work). Inside the code: `await mcp.call(server, tool, args)` returns the tool result (structuredContent, or parsed JSON text), `await mcp.search(query, server?)` finds tools, `console.log` is captured, and `return` gives the output. Async top-level code. No filesystem, network or require: only mcp.call/mcp.search. Same permissions as mcphub_call.
Configuration
MCPHUB_INSTANCEMCPHUB_PORTSUPABASE_ACCESS_TOKEN
Automated checks
Ran Nov 12, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packageNot checked
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelInstruction aimed at the model found in the description or READMEFinding
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHub✨ At a glance
| Each server wired into each editor | Through McpHub | |
|---|---|---|
| Tool definitions in every prompt | all of them (hundreds of thousands of tokens) | 3 tools, schemas loaded on demand |
| Server processes | one copy per editor | one shared copy |
| Secrets | plain text in every editor config | macOS Keychain, ${NAME} references |
| A server silently changes a tool | nobody notices | quarantined until you approve |
A malicious npm server reads ~/.ssh |
it can | blocked by the macOS sandbox |
| Remote servers with OAuth | one mcp-remote process each, tokens in plain files |
native HTTP, tokens in the Keychain, auto refresh |
| Who called what | unknown | audit log with redacted arguments |
| Finding a new server | search GitHub, copy a JSON snippet, paste a token | Library of the official MCP Registry: trust score, one-click add, secrets straight to the Keychain |
| Your agent needs a tool you lack | you install it by hand | the agent installs it itself from the registry, sandboxed, if it is trusted enough |
| A second machine, a Linux server | redo everything, copy tokens around | same binary, bubblewrap sandbox, encrypted sync of servers and secrets |
🚀 Install in one line
curl -fsSL https://raw.githubusercontent.com/Soflutionltd/McpHub/main/get.sh | bash
The script downloads the latest binary for your machine (signed universal binary on macOS, x64 or arm64 on Linux), verifies its SHA-256 checksum and installs it to ~/.local/bin/McpHub. Then:
McpHub dashboard # Library tab: add servers from the official MCP Registry (or McpHub add)
McpHub generate # index every tool once
McpHub install # start the daemon at login (LaunchAgent on macOS, systemd --user on Linux)
- Download
McpHub-macos-universal.tar.gzand its checksum. shasum -a 256 -c McpHub-macos-universal.tar.gz.sha256tar -xzf McpHub-macos-universal.tar.gz && install -m 755 McpHub ~/.local/bin/McpHub- Downloaded through a browser? Clear the quarantine flag:
xattr -d com.apple.quarantine ~/.local/bin/McpHub
Linux (amd64, arm64) and Windows (amd64) archives are attached to every release too. On Linux the sandbox uses bubblewrap and secrets live in ~/.McpHub/secrets.env (mode 600, hidden from sandboxed servers), see Linux servers and sync. Windows has no sandbox.
git clone https://github.com/Soflutionltd/McpHub.git
cd McpHub
make install # cargo build --release, install, sign
make install signs with your Developer ID certificate when one is present, so macOS keeps its permissions from one version to the next. Linux and Windows build from source (cargo build --release); the macOS sandbox and Keychain features are macOS only.
🔄 Updates
Once the daemon runs (McpHub install), McpHub keeps itself up to date. Editors connected by URL (Cursor, Claude Code, VS Code, Windsurf) need nothing: they talk to the updated daemon.
- Signed. Every release publishes
latest.json(version and SHA-256 of each file) signed with minisign; the public key is compiled into McpHub. On macOS the new binary must also carry Soflution's Developer ID signature. Anything else is refused. - Gradual. A new version reaches 10% of installations on day one, everyone after 24 hours. The daemon checks at start-up, then every 6 hours. The only request is the download from GitHub: no telemetry, the rollout bucket is drawn from a random local id that never leaves your machine.
- Never in the middle of a call. The new binary is installed next to the old one; each daemon switches over as soon as no request is in flight (editors reconnect by themselves). If the new version fails to start three times, the previous one is restored and that version is skipped.
- Your choice.
"settings": { "autoUpdate": false }turns it off;McpHub updateinstalls the latest release right away,McpHub update --checkonly reports it. Development builds and named instances never update themselves (the main instance updates the shared binary). - Claude Desktop extension.
mcphub.mcpbuses the installed McpHub when there is one, so it follows the same updates; otherwise it runs the binary it ships with. - Windows. The binary is replaced in place and used from the next session start.
🔌 Connect your editor
The daemon listens on http://127.0.0.1:24680. Your token is in ~/.McpHub/auth-token.
{
"mcpServers": {
"McpHub": {
"url": "http://127.0.0.1:24680/mcp",
"headers": { "Authorization": "Bearer <your-token>" }
}
}
}
claude mcp add --transport http mcphub http://127.0.0.1:24680/mcp \
--header "Authorization: Bearer $(cat ~/.McpHub/auth-token)"
{
"mcpServers": {
"McpHub": { "command": "/Users/you/.local/bin/McpHub", "args": ["stdio"] }
}
}
{
"servers": {
"mcphub": {
"type": "http",
"url": "http://127.0.0.1:24680/mcp",
"headers": { "Authorization": "Bearer <your-token>" }
}
}
}
Use http://127.0.0.1:24680/sse with the same Authorization header.
One profile per client. Give each editor its own view: http://127.0.0.1:24680/mcp/cursor only shows what the cursor profile allows (see Profiles).
Project-aware client (optional)
client/ is a small Node MCP server that sits between your editor and the daemon. It talks to the running daemon (SSE, token from ~/.McpHub/auth-token) and falls back to McpHub stdio. It exposes six tools:
mcphub_bootstrap: call once per conversation. Resolves the project from the workspace, returns its aliases and allowed servers, and recalls compact MemoryPilot context, also for folders without a project entry.mcphub_search,mcphub_call: same as the daemon, plus suggestions on a misspelled tool or server, and the input schema on argument errors.mcphub_batch: up to 20 independent calls in one round-trip.mcphub_status,mcphub_savings: server health and an honest context-size comparison.
Per-project policy lives in ~/.McpHub/projects.json (or the path in MCPHUB_PROJECTS), see client/projects.example.json. For a workspace listed there, only its allowedServers are reachable, and a call aimed at another Supabase project, App Store app or Cloudflare project is refused. Without the file there is no policy; an unreadable file is an error, never silently ignored.
Each release ships the client as a single file, mcphub-client.mjs, which the daemon keeps up to date in ~/.McpHub/client/ (Node 20 or later, no npm install). Editors pick up a new version the next time they start the server:
{
"mcpServers": {
"McpHub": { "command": "node", "args": ["/Users/you/.McpHub/client/mcphub-client.mjs"] }
}
}
From a clone instead: cd client && npm ci, then point args at /path/to/McpHub/client/index.js.
npm test runs smoke tests against the local daemon (MemoryPilot and supabase configured), with a throwaway project file.
Working on client accounts
Connecting to a client's Stripe (or Supabase, Cloudflare…) should not log you out of your own, and your own agent should never reach theirs by mistake. Two levels, from light to strict:
1. Client-owned servers (same McpHub). Add the client's server under its own name (stripe-acme, with its own OAuth token or restricted key, since tokens are stored per server name) and list it in the client project's ownedServers:
"acme": {
"workspaces": ["/Users/you/Clients/Acme"],
"aliases": { "product": "Acme" },
"allowedServers": ["MemoryPilot", "context7"],
"ownedServers": ["stripe-acme"]
}
An owned server only answers, appears in mcphub_search and in mcphub_status when working_dir is inside that client's workspace; the project argument alone is not enough. A server owned by two projects is a start-up error. This guard lives in the Node client: an editor connected straight to the daemon still sees every server, so give it a profile with "excludeServers": ["*-acme"].
2. A separate instance (nothing shared). For clients who require it, run a second McpHub with its own folder, port, Keychain service, auth token and LaunchAgent:
export MCPHUB_INSTANCE=acme MCPHUB_PORT=24690
McpHub add # writes ~/.McpHub-acme/config.json
McpHub oauth login stripe # token stored under Keychain service McpHub-acme
McpHub install # LaunchAgent com.soflution.mcphub.acme
A named instance never imports the servers declared in your editors, refuses the main port (24680), and its token is rejected by the main daemon (and the other way round). Point the editor of that client's workspace at it with the same variables:
"McpHub": {
"command": "node",
"args": ["/path/to/McpHub/client/index.js"],
"env": { "MCPHUB_INSTANCE": "acme", "MCPHUB_PORT": "24690" }
}
MCPHUB_HOME and MCPHUB_VAULT_SERVICE override the folder and the Keychain service. Sandboxed servers of every instance are denied all ~/.McpHub* folders. Automatic start of a named instance is supported on macOS and Linux.
🧭 How it works
- Your editor connects once to the McpHub daemon (Streamable HTTP, SSE or stdio).
- The agent sees three tools:
mcphub_search(BM25 search over every tool),mcphub_call(run one tool) andmcphub_run(code mode). - Each call is authenticated, filtered by the client profile, checked against the tool pins and permissions, then routed to the right server, which is started on demand and stopped when idle.
- Local servers run under the macOS sandbox with a minimal environment; remote servers are reached directly over HTTP with OAuth tokens kept in the Keychain.
- Every call lands in the audit log.
Token savings
Wiring dozens of MCP servers straight into an editor loads every tool schema into every conversation. On the setup above (35 servers, 928 tools) that is over a million tokens, more than any context window. McpHub replaces it with three small tools and loads a schema only when the agent actually needs it.
🧠 Code mode
For multi-step or bulk work, the agent sends a short JavaScript program with mcphub_run:
const projects = await mcp.call("supabase", "list_projects", {});
const unhealthy = projects.filter(p => p.status !== "ACTIVE_HEALTHY");
return unhealthy.map(p => p.name);
mcp.call(server, tool, args)returns the tool result,mcp.search(query)finds tools,console.logis captured.- The program runs in a separate Node.js process (22.13 or newer) started with
--permission: no files, no network, no subprocesses, inside a macOS sandbox. - Its only way out is
mcp.call, which goes through every McpHub guard (permissions, quarantine, profiles, audit). - Limits:
settings.codeMode→{ "timeoutSecs": 60, "maxCalls": 100 }, output capped at 1 MB.
🛡️ Security
MCP servers are third-party programs, often fetched on the fly with npx -y package@latest, running with your permissions. McpHub treats them accordingly.
/mcp,/sse,/messageand every/api/*route requireAuthorization: Bearer <token>(a 256-bit random token in~/.McpHub/auth-token, mode 600).- Requests whose
Hostis not127.0.0.1,localhostor[::1]are refused (DNS rebinding), as are requests with a foreignOrigin. No CORS headers: a web page cannot call the hub. - The dashboard opens through a one-time link (
McpHub dashboard) and keeps a per-session secret, never the main token.
McpHub vault set GITHUB_TOKEN # masked prompt, stored in the Keychain
McpHub vault migrate # move an existing secrets.env into the Keychain
config.json only holds ${GITHUB_TOKEN} references. Each server process starts with a minimal environment (system variables, its own env, and the names listed in inheritEnv), so no server ever receives the secrets of the others.
The first time McpHub sees a server, it records a SHA-256 fingerprint of every tool (name, description, input and output schemas, annotations) in ~/.McpHub/tool-pins.json. If a server later changes a definition (a "rug pull"), the tool is quarantined: hidden from the catalog and refused on call, until you check it:
McpHub pins status # what is quarantined and why
McpHub pins approve SERVER [TOOL] # accept the new definition
McpHub pins scan # scan every cached tool, read-only
Descriptions and schemas are scanned for invisible Unicode and classic injection phrases ("ignore previous instructions", "do not tell the user", ~/.ssh/id_rsa, mcp.json...). New tools appearing on an approved server are held back too.
"settings": { "toolSecurity": { "pinning": "block", "scan": "block", "newTools": "block" } }
With "pinning": "off" (or "warn"), changed definitions are accepted automatically but scanned again: a new description that trips the scan is still blocked when scan is block.
Automatic review of new tools ("newTools": "auto"). Instead of holding back every new tool, McpHub accepts a new tool on its own when it fits the server, and quarantines it when:
- its name breaks the server's naming convention (a
sync_datatool on a server whose tools all start withfl_); - it brings a sensitive capability the server did not have: a text parameter for a password, secret or API key, a code or command parameter on a tool that runs it, or a webhook / callback / upload URL. Capabilities are read from the tool's name and parameters, not from what its description mentions;
- its description shares almost no vocabulary with the rest of the server;
- with
"requireSignedCommits": true, the server runs from a local git checkout whose last commit is not signed by a trusted key (git log --format=%G?). A hijacked GitHub account can push code, but cannot sign it with a key that only lives on your machine.
"settings": { "toolSecurity": { "pinning": "off", "scan": "block", "newTools": "auto", "requireSignedCommits": true } }
There is no pop-up: blocked tools are listed under securityAlerts in mcphub_status and mcphub_bootstrap, so the agent tells you at the start of the next conversation, and a call to a blocked tool returns the reason. McpHub pins simulate replays the filter on every cached tool, as if each were new, to check it would not hold back legitimate tools.
"settings": { "sandbox": "shield" }
shield runs every local server under sandbox-exec. Servers keep working normally but cannot read or write SSH and GPG keys, cloud and GitHub credentials, browser profiles and cookies, Claude/Cursor configs, shell profiles, LaunchAgents or McpHub's own files, and cannot run security, launchctl, osascript or open. A secret file that a server references in its own env or args (an App Store .p8 key, for example) stays readable.
Per server: "sandbox": false, "strict" (no writes outside temp folders and caches), or { "mode": "strict", "network": false, "allowWrite": ["~/data"], "allowExec": ["open"] }.
McpHub sandbox # effective isolation of every server
McpHub sandbox show supabase # the generated profile
The sandbox is a strong barrier against credential theft by a compromised package, not a full container.
"permissions": {
"default": "allow",
"rules": [
{ "server": "supabase", "tool": "delete_*", "action": "deny", "reason": "production" },
{ "server": "stripe", "tool": "*", "action": "confirm" }
]
}
denyblocks a tool,confirmasks a human first through a native macOS dialog that the agent cannot answer.autoClassify: trueappliesconfirmto every destructive tool (by name and by the MCPdestructiveHintannotation).McpHub policy test SERVER TOOLshows which rule applies.McpHub audit --tail 50shows the last calls, with secrets redacted, in~/.McpHub/audit.jsonl(rotated).
🌐 Remote servers and shared OAuth
"sentry": { "url": "https://mcp.sentry.dev/mcp" },
"aqara": { "url": "https://agent.aqara.com/open/mcp", "headers": { "Authorization": "Bearer ${AQARA_API_KEY}" } }
Remote servers are reached directly over Streamable HTTP, without an mcp-remote process per server. McpHub implements the MCP authorization spec: discovery (RFC 9728 and 8414), dynamic client registration, PKCE, resource indicators, automatic refresh, HTTPS only, tokens bound to the server URL and stored in the Keychain.
McpHub oauth status # connection state of every remote server
McpHub oauth login sentry # sign in through the browser, once
McpHub oauth logout sentry
McpHub oauth migrate --apply # convert "npx mcp-remote URL" entries, keeping their tokens
📊 Dashboard
Run McpHub dashboard (a one-time link opens your browser).
McpHub MCP questions
What tools does McpHub MCP provide?
It exposes 3 tools, including mcphub_search, mcphub_call, mcphub_run.
Can I use McpHub with Cursor or Claude Desktop?
Yes, it supports various editors including Cursor, Claude Code, Claude Desktop, VS Code, and Windsurf via HTTP or stdio.