McpHub, one secure hub for all your MCP servers

Extension for the Claude desktop app   Install   macOS binary for the command line

Latest release MCP 2025-11-25 Rust macOS and Linux MIT

McpHub sits between your AI editors and all your MCP servers.
Your agents see 3 tools instead of hundreds, every call goes through the same security guards,
and your servers run once, sandboxed, shared by Cursor, Claude, Windsurf and VS Code.

Install · Connect your editor · How it works · Code mode · Security · Dashboard · Library · Linux and sync · Configuration · FAQ

--- ## 🤔 Is it for you? - **Yes, if you use several MCP servers**, or the same ones in more than one app (Claude Code and Cursor, say): McpHub starts each server once for all of them, lets you move their secrets out of your settings files into the system keychain, runs them in a sandbox and records every call. - **Probably not, if you only use the connectors built into Claude** (Gmail, Google Drive, Canva…). Those keep working exactly as before, with or without McpHub: it neither replaces nor improves them. On its own, McpHub adds no capability. - **It runs on your computer.** It works with the Claude desktop app, Claude Code, Cursor, VS Code and Windsurf, not with claude.ai in a web browser or on a phone. ## ✨ At a glance

-99.9%

tokens of tool definitions
1,054,593 → 918 on a 928-tool setup, against a client that loads them all

1 process

for every editor
servers start once, survive editor restarts

8 layers

of security
Keychain, pinning, sandbox, audit...

0 runtime

dependencies
a single signed Rust binary
| | Each server wired into each editor | **Through McpHub** | |---|---|---| | Tool definitions in every prompt | all of them, in a client that loads every definition (Claude Code and Cursor now load them on demand) | **3 tools**, schemas loaded on demand, in every client | | 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 McpHub is a program that runs on your computer. It works with apps that can start a local program: **the Claude desktop app, Claude Code, Cursor, VS Code, Windsurf**. It cannot be added to claude.ai in a web browser or to the mobile apps: those only reach connectors hosted on the internet. ### The Claude desktop app, without a terminal 1. Download [`mcphub.mcpb`](https://github.com/Soflutionltd/McpHub/releases/latest/download/mcphub.mcpb) (macOS, Windows and Linux in one file). 2. Double-click it, or drag it onto the Claude window, or open **Settings > Extensions > Advanced settings > Install Extension…** and choose the file. Claude shows what the extension is; click **Install**. 3. McpHub is now listed with your connectors. In a new conversation, ask for the servers you want, by name: > Search the McpHub library for MemoryPilot and install it. Claude finds the server in the official MCP Registry and installs it sandboxed, when its trust score is high enough ([Library](#-library)). A server that needs a token is added from the dashboard, where you type the secret yourself: Claude never sees it. ### Claude Code, Cursor and the rest, in two commands ```bash curl -fsSL https://raw.githubusercontent.com/Soflutionltd/McpHub/main/get.sh | bash ~/.local/bin/McpHub setup ``` On macOS and Linux (on Windows, use the extension above or the archive of a [release](https://github.com/Soflutionltd/McpHub/releases/latest)). The first line 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`. `McpHub setup` then starts the daemon at login (LaunchAgent on macOS, systemd --user on Linux) and adds McpHub to Claude Code, Cursor and the Claude desktop app, whichever are installed. It adds one entry to each app's own MCP settings, changes nothing else in the file, keeps a backup next to it, and adds nothing to an app that already runs McpHub. A settings file it cannot read as JSON (comments, say) is reported and left untouched. `McpHub setup --dry-run` only shows what it would do. Restart the apps, then: ```bash McpHub dashboard # Library tab: add servers from the official MCP Registry (or ask your agent) ``` ### Ask your agent to install it An agent with a terminal (Claude Code, Cursor) can do all of the above. Tell it: > Install McpHub from https://github.com/Soflutionltd/McpHub: run its get.sh, then `McpHub setup`.
Where it can be installed, and by whom | Where the assistant runs | Can McpHub be connected? | Who installs it | |---|---|---| | Claude Code, Cursor or another agent with a terminal on your computer | Yes | The agent, with the two commands above, or you | | The Claude desktop app | Yes | You, with the extension: an assistant without a terminal cannot install software | | claude.ai in a web browser, the mobile apps | No | Nobody: McpHub listens on `127.0.0.1` of your computer, which a hosted assistant cannot reach | Once connected, an agent adds servers through McpHub itself (`mcphub_call` with `server: "mcphub"`, tools `registry_search`, `registry_info`, `registry_install`). By default an install is refused when the server's trust score is below 60, and an agent can never supply a secret: you add such a server in the dashboard. The score rule is yours to change, and agent installs can be turned off entirely, in [`settings.registry`](#-library).
Manual download 1. Download [`McpHub-macos-universal.tar.gz`](https://github.com/Soflutionltd/McpHub/releases/latest/download/McpHub-macos-universal.tar.gz) and its [checksum](https://github.com/Soflutionltd/McpHub/releases/latest/download/McpHub-macos-universal.tar.gz.sha256). 2. `shasum -a 256 -c McpHub-macos-universal.tar.gz.sha256` 3. `tar -xzf McpHub-macos-universal.tar.gz && install -m 755 McpHub ~/.local/bin/McpHub` 4. 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](https://github.com/Soflutionltd/McpHub/releases/latest) 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](#-linux-servers-and-sync). Windows has no sandbox.
Build from source ```bash 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 update` installs the latest release right away, `McpHub update --check` only reports it. Development builds and named instances never update themselves (the main instance updates the shared binary). - **Claude Desktop extension.** `mcphub.mcpb` uses 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 `McpHub setup` connects Claude Code, Cursor and the Claude desktop app for you ([Install](#-install)). To do it by hand, or for another editor: the daemon listens on `http://127.0.0.1:24680`, and your token is in `~/.McpHub/auth-token`.
Cursor, ~/.cursor/mcp.json ```json { "mcpServers": { "McpHub": { "url": "http://127.0.0.1:24680/mcp", "headers": { "Authorization": "Bearer " } } } } ```
Claude Code ```bash claude mcp add --scope user --transport http mcphub http://127.0.0.1:24680/mcp \ --header "Authorization: Bearer $(cat ~/.McpHub/auth-token)" ```
Claude Desktop, claude_desktop_config.json The extension (`mcphub.mcpb`, see [Install](#-install)) or `McpHub setup` does this for you. By hand: ```json { "mcpServers": { "McpHub": { "command": "/Users/you/.local/bin/McpHub", "args": ["stdio"] } } } ```
VS Code, .vscode/mcp.json ```json { "servers": { "mcphub": { "type": "http", "url": "http://127.0.0.1:24680/mcp", "headers": { "Authorization": "Bearer " } } } } ```
Windsurf and other SSE clients 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](#profiles-per-client)). ### 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 seven tools: - `mcphub_bootstrap`: call once per conversation. Resolves the project from the workspace, returns its aliases and allowed servers, and recalls compact context from your memory server, also for folders without a project entry: [MemoryPilot](https://github.com/Soflutionltd/MemoryPilot) when the hub has it, any other server with [`settings.memory`](#memory-server-for-mcphub_bootstrap), and nothing when there is none. - `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. A JSON result is embedded as JSON (not as an escaped string), with a `notes` array when it was shaped. - Lighter results, on `mcphub_call` and on each call of `mcphub_batch`: a successful JSON result comes back compact, without its `null` and empty-string fields (empty arrays stay). `fields` keeps only the listed keys of each row, `max_rows` keeps the first rows (rows are the root array, or an array of objects held by a root key), `max_chars` cuts the text (default 60000, or `MCPHUB_RESULT_MAX_CHARS`), and `format: "toon"` writes the JSON as [TOON](https://github.com/toon-format/toon) (each list of rows as one header line plus one line per row), `format: "csv"` writes a plain list of rows as one header line and one line per row (the most compact when rows are flat), and `raw: true` returns the child result untouched. A text result loses its terminal noise: colour codes, progress bars redrawn in place, and a line of twenty characters or more repeated five times or more in a row is kept once with its count; anything else comes back as it was, short repeated lines and JSON that McpHub does not rewrite included. A cut result says how to go on without reading it all: `mcphub_call` with server `mcphub`, tool `search_result`, arguments `{ handle, query, context, max_matches }` returns only the passages that hold the words, each with its position, and tool `read_result`, arguments `{ handle, offset, length }` reads on from a position; the client keeps the last 16 cut results in memory. A result holding a number of 16 digits or more, or an exponent, is never rewritten. Errors and confirmation requests are never touched. Agents are told about `fields` and `max_rows` three ways: the server instructions sent at startup, the `mcphub_call` description, and a one-line reminder appended to a list result of 8000 characters or more that used neither. - `mcphub_run`: the daemon's code mode. A script chains several tool calls in the sandbox and only its final value comes back. The project rules (`allowedServers`, owned servers, the pinned arguments, the arguments of an alias the project leaves out) are handed to the daemon, which applies them to every `mcp.call`; a daemon too old to do so is never given a script from a folder that has rules. - `mcphub_status`, `mcphub_savings`: server health and an honest context-size comparison. `mcphub_savings` also counts code mode: scripts run, tool calls made inside them, round trips saved. It lists each server with its calls and the result bytes it sent to the agent, heaviest first. It can also serve your agent skills over MCP ([skills extension](https://modelcontextprotocol.io/extensions/skills/overview), protocol revision 2026-07-28): Claude Code 2.1.331 or later then lists them as `McpHub:`, named after the server entry in its config, without any link on disk. It is off by default, because a skill already linked in `~/.claude/skills` would appear twice. Turn it on in the dashboard (Settings, "Serve skills over MCP") or with `"agents": { "serveSkills": true }` under `settings` in `~/.McpHub/config.json` (or `MCPHUB_SERVE_SKILLS=1` in the entry's `env`), then restart the agent's MCP server. The skills come from `skills/` (yours) then `vendor/` (third-party) of the [agents folder](#your-rules-skills-and-plugins) (`~/.McpHub/agents`, or `MCPHUB_AGENTS_DIR`), 100 at most, yours first. A skill whose name is outside the Agent Skills rules (lowercase letters, digits and single hyphens), or that holds more than 512 files or 16 MiB, is skipped; `skill.source.json`, where McpHub records the origin of a third-party skill, is never served. A skill left out or skipped is named on the client's stderr. Plugin skills are not served: a plugin installs in the agent itself. An app that reads no skills folder, like the Claude desktop app, gets your skills another way, with no setting to turn on and no tool added to its list: its agent asks McpHub for them. ```text mcphub_call server=mcphub tool=skills_list mcphub_call server=mcphub tool=skill_read arguments={"name": "deploy"} mcphub_call server=mcphub tool=skill_read arguments={"name": "deploy", "file": "references/steps.md"} ``` - `skills_list` returns the name, the description (cut at 300 characters) and the origin of each skill of the agents folder: yours, third-party ones, and the skills of your plugins (as `:`). `skill_read` returns a skill's `SKILL.md` and the list of its other files, or one of those files. A file over 256 KB, a path that leaves the skill folder (a link included), a hidden file or folder (`.git`) and `skill.source.json` are refused. A long answer is cut and read on with its handle, like any other result. - **Who is told.** When a conversation starts, McpHub adds one line to its instructions (and to the answer of `mcphub_bootstrap`): how many skills there are and how to list and read them, never their names. The Claude desktop app does not show a server's instructions to its model, only its tools, so the bundled client also adds one sentence (216 characters) to the description of `mcphub_call`, the tool that lists and reads them. Only an app that did not receive your skills on disk gets either: the Claude desktop app, an unknown app, a tool you have not connected. Claude Code, Cursor and the other [connected tools](#your-rules-skills-and-plugins) are not told, since they already load your skills: their tool descriptions are unchanged, to the byte. The app is recognised by the name it gives when it connects. An agent connected to the daemon without the bundled client gets the line in the instructions only. - **Found by name.** For those same apps, `mcphub_search` returns a skill when the query names it or matches its description, with the call that reads it: `{"server": "mcphub", "tool": "skill_read", "arguments": {"name": "demo:demo"}, ...}`. Skills are ranked among the tools with the same scoring, three at most per search; a skill is kept only if the query holds every word of its name or the skill holds at least half the words of the query. A connected tool gets none, since it would see each skill twice. A search for "skill" still returns the two operations themselves, for every app. - **A name that is almost right.** `skill_read` with a name no skill has (a typo, another case, a longer or shorter name, the wrong plugin) answers with the close names in `did_you_mean` and reads nothing; the bare name of a plugin skill (`demo` for `demo:demo`) reads it when only one plugin has it, and the answer gives the full name. - **Not automatic.** In a connected tool a skill loads by itself when a task matches its description. Here the agent has to ask: it searches or reads the list, then reads the skill. - **Same guards as the other internal tools**: a rule with `"server": "mcphub"` in `settings.permissions` can deny or confirm them, a [profile](#profiles-per-client) can exclude them, a project that restricts its servers must allow `mcphub`, and from the folder of a client account they are refused unless `mcphub` is in its `sharedServers`. Every call is written to the audit log (`skills/`). The line itself is not filtered by these guards in the bundled client, nor by the client account of the folder: it only gives the number of skills and how to ask. Per-project policy lives in `~/.McpHub/projects.json` (or the path in `MCPHUB_PROJECTS`), see [`client/projects.example.json`](client/projects.example.json). For a workspace listed there, only its `allowedServers` are reachable (`["*"]` opens every server and keeps the pinned arguments). Without the file there is no policy; an unreadable file is an error, never silently ignored. A project can pin any argument of any server with `pinnedArgs`: ```json "demo": { "workspaces": ["/Users/you/Code/demo"], "allowedServers": ["*"], "pinnedArgs": { "weather": { "region": "eu", "units": 2 }, "task-board": { "board_id": "b-1" } } } ``` - From that workspace, a call to `weather` whose `region` is not `"eu"` is refused, with the expected value and the line of `projects.json` it comes from. The same check runs in `mcphub_call`, in each call of `mcphub_batch` and, applied by the daemon, in every `mcp.call` of an `mcphub_run` script. - A pinned argument that the call leaves out is not filled in: the call goes as written. A pin only refuses a call aimed elsewhere. An argument set to `null` counts as left out in `mcphub_call` and `mcphub_batch`; inside a script the daemon refuses it. - The value is a string, a number or a boolean, and the type counts (`"2"` is not `2`). The argument is found at any depth of the arguments, and neither the spelling of the server (`Task-Board`, `task_board`) nor that of the argument (`board_id`, `boardId`) gets around a pin. - Three aliases are shortcuts for a pin: `aliases.supabaseProjectId` pins `project_id` of `supabase`, `aliases.appStoreAppId` pins `appId` of `app-store-connect` and `appstore-operator`, `aliases.cloudflareProject` pins `cf_project_name` of `cf-orchestrator` (in `mcphub_call` and `mcphub_batch`, on its `add_project` tool only; write it in `pinnedArgs` to cover every tool). In a project that leaves one of these aliases out, that argument is refused and the refusal names the alias to add, in `mcphub_call`, in `mcphub_batch` and inside an `mcphub_run` script alike. - A `pinnedArgs` that cannot be read (not an object, a value that is not a string, a number or a boolean, a server or an argument named twice, a value that contradicts an alias) is an error on every call until the file is fixed. #### Memory server for `mcphub_bootstrap` `mcphub_bootstrap` asks one server for the context of the folder. Which one is the `memory` entry under `settings` in `~/.McpHub/config.json`, read again at each bootstrap: ```json "settings": { "memory": { "server": "notes", "tool": "fetch_context", "arguments": { "limit": 5 }, "injectionTrace": "/Users/you/.notes/session-injections.json" } } ``` - `server` and `tool`: the server of your hub and its tool to call. The call carries `working_dir`, `hints` (the task keywords, `project context` when none are given) and `project` when the folder belongs to one, plus the fixed `arguments` you list (one named like those replaces it). The text it returns comes back as `memory`. - `injectionTrace` (optional, an absolute path): a JSON file `{ "/path/of/workspace": "2026-01-01T10:00:00.000Z" }` in which a session-start hook of your agent writes when it last put that context in a conversation. In Claude Code, a time less than 10 minutes old for the folder (or a parent folder other than your home folder) means the context is already there: `mcphub_bootstrap` says so and does not recall it a second time. Other agents always get the full recall. - Without the entry, McpHub calls MemoryPilot (`recall`, with its own injection trace, after which only the episodes matching the hints are asked for); a hub that has no such server answers without memory, and without an error. `"memory": { "server": "MemoryPilot" }` is the same thing written out, and `arguments` or `injectionTrace` replace the default ones (with another `tool`, none of the defaults apply). - `"memory": false`: no memory server, nothing is called. - An entry that cannot be read (wrong type, unknown field, a server your hub does not have), or a `config.json` that is not valid JSON, leaves the rest of the bootstrap intact and comes back as `memoryError`, with what to fix, and nothing is recalled. The dashboard does not edit this entry: write it in `config.json`. The description of the `mcphub_bootstrap` tool names the server set when the client started; restart the agent's MCP server to refresh it. Each release ships the client as a single file, `mcphub-client.mjs`, installed in `~/.McpHub/client/` by `get.sh` and kept at the daemon's version (the daemon replaces a missing or outdated one when it starts). Agents start it with `McpHub client`, which finds Node (20 or later, no `npm install`) and runs that file, so the agent's config names neither Node nor a file and survives a Node upgrade: ```json { "mcpServers": { "McpHub": { "command": "/Users/you/.local/bin/McpHub", "args": ["client"] } } } ``` - `McpHub client migrate` rewrites the McpHub entry of Claude Code, Cursor and Claude Desktop that still runs `node /path/to/client/index.js` or `node …/mcphub-client.mjs` (a client inside a clone changes whenever someone switches branch there). It only touches that entry, keeps its `env`, leaves a backup next to each file, and `--dry-run` shows what it would do. `McpHub doctor` reports the configs left to migrate. - Node is looked up in `MCPHUB_NODE`, the `PATH`, then nvm, Volta, fnm, mise, asdf and the usual install folders. An agent picks up a new client the next time it starts the server. - From a clone: `make install` builds the client and installs it in the same place. To run a client under development, set `MCPHUB_CLIENT_ENTRY=/path/to/McpHub/client/index.js` in the entry's `env` (after `cd client && npm ci`). `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. Three 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`: ```json "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. Tenants (same McpHub, the client's own tokens, enforced by the daemon).** Mark the client's project as a tenant and declare, server by server, which secrets of *its* vault replace yours: ```bash McpHub tenant add acme --dir "/Users/you/Clients/Acme" # writes projects.json (backup first) McpHub vault set --tenant acme SUPABASE_ACCESS_TOKEN # Keychain service McpHub-tenant-acme McpHub vault set --tenant acme CLOUDFLARE_MCP_TOKEN McpHub oauth login --tenant acme stripe # prints the URL, never opens your browser McpHub tenant check acme # can every instance start? ``` ```json "acme": { "workspaces": ["/Users/you/Clients/Acme"], "aliases": { "product": "Acme" }, "tenant": "acme", "credentials": { "supabase": { "SUPABASE_ACCESS_TOKEN": "vault:acme/SUPABASE_ACCESS_TOKEN" }, "cloudflare-api": { "CLOUDFLARE_MCP_TOKEN": "vault:acme/CLOUDFLARE_MCP_TOKEN" }, "stripe": {} }, "keepEnv": { "supabase": ["NODE_OPTIONS"] }, "sharedServers": ["context7", "svelte", "MemoryPilot"] } ``` From a folder of that project, a call to `supabase` runs `supabase@acme`: a separate process started from the same `config.json` entry, with the client's token. The daemon decides, not the client: it reads `projects.json` itself and derives the tenant from the folders the client sends with every call (`working_dir`, else the folder the agent was started in). Rules: - From a tenant folder, only the servers listed in `credentials` (as `server@tenant`) and in `sharedServers` answer. Every other server is refused, never silently served with your accounts. A client started in a tenant folder cannot aim `working_dir` elsewhere. - Without a known folder, or from any other folder, a tenant instance is unreachable, and no name (`supabase@acme`) reaches it: not `mcphub_call`, not passthrough, not the dashboard. - A tenant instance gets an allow-listed environment only: the base system variables, its secrets, `PATH` and the names in `keepEnv`. A literal value of yours (a `.p8` key path) is dropped, `inheritEnv` and the SSH agent are never passed, and a `${VAR}` its vault does not provide stops it from starting. `HOME` and `XDG_*` point to `~/Library/Application Support/McpHub/tenants//home`, so CLI logins saved on disk (gh, wrangler, supabase) are not yours. `MCPHUB_TENANT=` tells the server which tenant it serves. - Tenant secrets live in their own Keychain service (`McpHub-tenant-`, index in `~/.McpHub/tenants//`), are read when the instance starts and never loaded into the daemon environment. OAuth tokens of `stripe@acme` are stored there too; `oauth login --tenant` prints the authorization URL so you open it in a browser profile signed in to the client's account. A tenant instance never starts an OAuth sign-in by itself. - A confirmation token is bound to the instance: approving `supabase/delete_x` for your account never approves it for `supabase@acme`, and the request names `supabase@acme`. McpHub's own tools (`server: "mcphub"`: library, install) are refused from a tenant folder unless `sharedServers` lists `mcphub`. Folders are compared after resolving symbolic links, and case-insensitively on macOS. - Cached answers, metrics and the audit log are per instance: `McpHub audit --tenant acme`, a `tenant` field in `audit.jsonl` and a Tenant column in the dashboard metrics. - The dashboard's **Client accounts** tab does the same as the CLI. Per client: its folders, then server by server the instance (running or stopped, calls, errors, last error), the expected secrets (present or missing, names only), the OAuth state and a **Check** button (`tenant check`). It also lists, read only, the cf-orchestrator projects marked with the client and warns when `cf-orchestrator` lacks `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` from the client's vault. From the tab you can: - add a client (same checks and `projects.json` backup as `tenant add`); every change is refused if `projects.json` changed since the screen loaded; - choose its servers: **Own tokens** (an isolated instance; the screen suggests the `${VAR}` names of the server's config, a literal path such as a `.p8` key as optional) or **Shared**; - set, replace or delete a secret through a write-only field: the value goes once to the client's Keychain service and is never sent back to the page nor logged; only secrets declared by the client's servers can be written, never an OAuth token; the audit log records the action and the secret's name; - **Connect** an OAuth server: the screen shows the sign-in address with a Copy button, to open in the client's browser profile (never opened in yours), and turns to connected when the sign-in completes; - **Remove** the client: only after you approve a native macOS dialog that neither the page nor an agent can answer; without that dialog (no GUI), use `McpHub tenant rm`. - `McpHub tenant rm acme` erases every secret and OAuth token of the tenant, its isolated `HOME`, then removes `tenant`, `credentials`, `keepEnv` and `sharedServers` from the project (asks you to retype the id, or `--yes`). - An invalid `projects.json` refuses every call that carries a folder. The client refuses calls from a tenant folder when the daemon is too old to isolate tenants. This protects against agent and configuration mistakes, not against a malicious local process, which can claim any folder and read your Keychain with your session. **3. 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: ```bash 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: ```json "McpHub": { "command": "/Users/you/.local/bin/McpHub", "args": ["client"], "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

Architecture: AI clients, the McpHub pipeline, local and remote servers

1. Your editor connects once to the McpHub daemon (Streamable HTTP, SSE or stdio). 2. The agent sees three tools: `mcphub_search` (BM25 search over every tool), `mcphub_call` (run one tool) and `mcphub_run` (code mode). 3. 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. 4. 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. 5. Every call lands in the audit log. ### Token savings

Tool definitions: 1,054,593 tokens when a client loads them all, 918 tokens through McpHub

In a client that loads every tool schema into every conversation, dozens of MCP servers cost a lot: on the setup above (35 servers, 928 tools) the definitions alone are over a million tokens, more than any context window. McpHub replaces them with three small tools and loads a schema only when the agent actually needs it. **What that figure is, and is not.** It is the size of the tool definitions, measured on the author's own setup, compared with loading all of them. It is not what you save in every client: [Claude Code](https://code.claude.com/docs/en/mcp#scale-with-mcp-tool-search) and [Cursor](https://cursor.com/blog/dynamic-context-discovery) now defer MCP tool definitions themselves, so there the token saving is small. The `mcphub_savings` tool reports the comparison for your own servers. What McpHub adds in every client, deferred definitions or not: each server runs once for all your apps instead of once per app, its secrets leave your settings files for the system keychain, it runs in a sandbox, a tool whose definition changes is quarantined, and every call is recorded. --- ### For MCP server authors: which project, which conversation McpHub runs one process of your server for every agent on the machine, so two conversations can call it at the same moment. Each `tools/call` it passes to a **local** server says where the call comes from, in the request's `_meta` (the field the MCP specification reserves for this), with no extra round trip: ```json { "name": "open_page", "arguments": { "url": "https://example.com" }, "_meta": { "com.soflution.mcphub/roots": [{ "uri": "file:///Users/me/Projects/Shop", "name": "Shop" }], "com.soflution.mcphub/session": { "id": "0b6f41c2-...", "client": "claude-code" } } } ``` - `com.soflution.mcphub/roots`: the project folder of the calling agent, in the shape of a `roots/list` answer. - `com.soflution.mcphub/session`: the conversation. `id` is the same for every call of one agent connection (one conversation in Claude Code; one window in apps that share a connection between their chats) and never reused; `client` is the agent app's name as it gave it at `initialize`, when it gave one. A server that keeps state (open tabs, a simulator, a shell) can keep each conversation's state apart with `id`; a server that ignores `_meta` works as before. Any hub may send the same keys. They are **never sent to remote servers**: a folder path of this machine and a conversation id do not leave it for a third party's service. A server reached at a loopback address written in digits (`http://127.0.0.1:…`, `http://[::1]:…`) runs on this machine and receives them; a name, `localhost` included, counts as remote. They identify, they do not authenticate: do not grant rights on them. #### When a conversation ends A server that keeps something per conversation (its tabs, a shell, temporary files) can learn when to let go of it. Ask for it in the answer to `initialize`: ```json { "capabilities": { "experimental": { "com.soflution.mcphub/session": {} } } } ``` When the McpHub client of a conversation has been gone for 30 seconds (the agent closed it, or its window), each local server that asked, and that this conversation called, receives once: ```json { "jsonrpc": "2.0", "method": "notifications/com.soflution.mcphub/session/closed", "params": { "id": "0b6f41c2-...", "client": "claude-code" } } ``` `id` is the one of `com.soflution.mcphub/session` in `_meta`. A client that reconnects within the 30 seconds (network cut) keeps its conversation and nothing is sent. Keep your own expiry as a safety net: an agent wired straight to the daemon's `/mcp` endpoint, without the McpHub client, declares no conversation, and a server restarted in between has nothing left to hear about. Never sent to remote servers. #### Holding state: do not stop me now McpHub stops a server nobody has called for a while (`idleTimeout`, 5 minutes by default). A server that holds state worth keeping says so with a notification, when it starts holding it and when it no longer does: ```json { "jsonrpc": "2.0", "method": "notifications/com.soflution.mcphub/state", "params": { "holdsState": true } } ``` While the last value sent is `true`, McpHub does not idle-stop the server; send `false` when the last tab is closed so the process can be reclaimed. It is a notification: no answer, nothing to wait for, and a client that does not know it ignores it. The user keeps the last word: an `idleTimeout` in seconds on the server stops it anyway. #### Knowing you are sandboxed An isolated server is started with `MCPHUB_SANDBOX=shield` or `MCPHUB_SANDBOX=strict` in its environment (absent when it is not isolated). Use it to word your own errors: a refused `spawn` or `open` is then the sandbox's doing, and the user can lift it in the server's `sandbox` setting. #### Opening an application Under the sandbox your server cannot run `open` (`spawn EPERM`). Ask McpHub to open an app of the list the user wrote for your server (`launch` in its config), with a request, as for `roots/list`: ```json { "jsonrpc": "2.0", "id": 7, "method": "com.soflution.mcphub/launch", "params": { "app": "browser", "args": ["--profile-directory=Default"], "url": "http://127.0.0.1:9222" } } ``` The answer is `{ "launched": true }`, or an error whose message says what the user has to allow (`-32602`: outside the list; `-32000`: the app did not start, or more than 10 launches in a minute). McpHub announces what it offers at `initialize`, in its capabilities: `experimental["com.soflution.mcphub/launch"].apps` lists what you may ask for, as `[{ "id": "browser", "app": "Google Chrome" }]` (absent when the user allowed none), and `experimental["com.soflution.mcphub/state"]` says it listens to the state notification above. Without these keys you are not behind McpHub: launch the app yourself as before. ## 🧠 Code mode

Without code mode: 25 round trips. With mcphub_run: one call

For multi-step or bulk work, the agent sends a short JavaScript program with `mcphub_run`: ```js 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.log` is 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. Code mode needs Node and is macOS only for now: without `sandbox-exec` (Linux, Windows) `mcphub_run` is refused. - 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

Eight layers of 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.
Locked local API - `/mcp`, `/sse`, `/message` and every `/api/*` route require `Authorization: Bearer ` (a 256-bit random token in `~/.McpHub/auth-token`, mode 600). - Requests whose `Host` is not `127.0.0.1`, `localhost` or `[::1]` are refused (DNS rebinding), as are requests with a foreign `Origin`. 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.
Secrets in the macOS Keychain ```bash 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.
Tool pinning and poisoning detection 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: ```bash 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. ```json "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_data` tool on a server whose tools all start with `fl_`); - 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. ```json "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.
Server isolation (macOS sandbox) ```json "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, cannot modify git hooks (`.git/hooks` of any repository), git settings or shell plugins (`~/.oh-my-zsh/custom`, `~/.config/fish`), and cannot run `security`, `launchctl`, `osascript`, `osacompile`, `open`, `automator`, `shortcuts`, `crontab`, `at` or `batch`. 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"] }`. **When the sandbox is the cause.** A server refused by the sandbox only sees a bare `EPERM`, and the agent has no way to guess McpHub is behind it. When a tool call of an isolated server fails with `EPERM` or "Operation not permitted" (or with "Permission denied" on a blocked program or a protected path), McpHub adds a line after the server's own error: the server runs in the McpHub sandbox, and which setting would lift the refusal (`allowExec` with the program's name when a blocked program is named, `allowRead` when a protected path is, the possible settings otherwise). It says "may" when it cannot tell: such an error can have another cause. Nothing is added for a server that is not isolated. **Opening an app from an isolated server.** `allowExec: ["open"]` hands the server the whole `open` command: any app, any file, any URL, because the macOS sandbox cannot filter a program's arguments. Prefer a `launch` list on the server: McpHub, outside the sandbox, opens the app for it, and only what you wrote. ```json "some-browser-mcp": { "command": "npx", "args": ["-y", "some-browser-mcp"], "launch": { "browser": { "app": "Google Chrome", "args": ["--profile-directory=*", "--user-data-dir=~/Library/Application Support/SomeTool/*"], "urls": ["http://127.0.0.1:*"] } } } ``` - `app`: the application (macOS: its name or path, opened with `open -g`, in the background, never in front of you; Linux and Windows: the absolute path of the program, started directly, without a shell). - `args`: the options the server may pass, each checked against a pattern where `*` stands for any text. Without `args` it may pass none. A pattern must start with `-` and at least 3 fixed characters, so `*` or `--*` is refused. Mind what you allow: `--remote-debugging-port=*` on your everyday browser profile hands that browser to the server. - `urls`: the origins it may open (`https://example.com`, `http://127.0.0.1:*` for any port). Without `urls`, no address. - Anything else is refused, `..` in an argument included; at most 10 launches a minute per server; every request, accepted or refused, is in the audit log (`McpHub audit --server NAME`). ```bash 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, confirmations and audit ```json "permissions": { "default": "allow", "rules": [ { "server": "supabase", "tool": "delete_*", "action": "deny", "reason": "production" }, { "server": "stripe", "tool": "*", "action": "confirm" } ] } ``` - `deny` blocks a tool, `confirm` asks a human first through a native macOS dialog that the agent cannot answer. `autoClassify: true` applies `confirm` to every destructive tool (by name and by the MCP `destructiveHint` annotation). - While that dialog is open, servers able to drive the computer (and so to click "Allow" themselves) are paused: desktop-commander, computer, applescript, osascript, macos-automator, peekaboo and phonesimulator by name, plus any server marked `"controlsComputer": true` next to its `command`. - `McpHub policy test SERVER TOOL` shows which rule applies. - `McpHub audit --tail 50` shows the last calls, with secrets redacted, in `~/.McpHub/audit.jsonl` (rotated).
--- ## 🌐 Remote servers and shared OAuth ```json "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. ```bash 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 ``` ### Connect a service without hunting for permissions On the dashboard, every server card (and every client account) shows what is missing: - **Connect** on a remote OAuth server opens the service's consent page; you click Authorize and the tokens land in the right Keychain. Known services get the scopes they need (Cloudflare `mcp.cloudflare.com` with write access to Workers, Pages, D1, KV, R2 and DNS, instead of the read-only default; Supabase `mcp.supabase.com` with project and database access). - **Connect Cloudflare / Supabase / GitHub** on a token variable opens the service's token page pre-filled with the right permissions, then takes the pasted token: it is checked with the service's API before saving (the Cloudflare account ID is filled in by itself), goes straight to the Keychain and is never shown again, sent back to the page or logged. One Cloudflare token also fills `CLOUDFLARE_MCP_TOKEN` and `CLOUDFLARE_API_TOKEN` when both are expected. - **Sign in with GitHub** (device code: no token to copy) uses the public GitHub App *McpHub by Soflution*: McpHub shows an 8-character code, you paste it on GitHub and click Authorize. Each account installs the app once and picks its repositories. A redistributed build can point to its own app with `settings.githubClientId` (public value, no secret). - For a client account, choose the client's browser profile on their card: consent and token pages open in that profile. A client on another computer approves from the link you send; their browser then shows a connection error whose address you paste back to finish. ### Token expiry: you and your agents are told in time McpHub keeps, for every token of your account and of each client account, its expiry date (reported by Cloudflare and GitHub, or typed when you save it) in `token-meta.json`, never the value. The daemon re-checks each token with its service every 12 hours, so a revoked token is caught even without a date. - 14 days, 3 days before, then on the day: a macOS notification and a banner on the dashboard, with a Renew button. - Agents read it in the MCP response: when a call fails because a token expired or was refused, the answer names the token, the account (yours or the client's) and where to renew it, instead of an opaque 401. When a token expires soon, the first answer of the day from that server says so. --- ## 📊 Dashboard Run `McpHub dashboard` (a one-time link opens your browser).
Servers

Servers: status, tools, enable or disable in one click

Tools

Every indexed tool, searchable

Metrics

Calls, errors and latency per server

  • Add, edit, enable and disable servers
  • Live logs with filters
  • Rebuild the tool cache in one click
  • Real token savings counter
  • One-click diagnosis of a failing server
--- ## 📚 Library The **Library** tab of the dashboard is the official [MCP Registry](https://registry.modelcontextprotocol.io) inside McpHub: search thousands of servers, read a trust score, click **Add**. - **Search runs locally.** The first time you open the Library, McpHub downloads the catalog once in the background (the popular servers from the [GitHub MCP Registry](https://github.com/mcp) come first, in a few seconds; the full official catalog follows) into `~/.McpHub/registry-cache/`. After that, it only fetches what changed, at most once a day. Search is instant and works offline. - **Zero weight for your agent.** The catalog lives in the dashboard and on disk. It adds no tool definition to the agent's context and nothing stays in memory between searches. - **Trust score before you install** (0 to 100), with the detail of every point: - verified publisher: the registry checks the namespace (a GitHub account or a DNS domain), McpHub checks that it publishes its own code; - popularity and activity: GitHub stars, last update, archived repositories; - permission scan: secrets requested, plain HTTP endpoints, privileged Docker options, bundle integrity hash, unpinned versions, and what the server can do (run commands, touch files, a browser, payments...). - **One-click add** for every kind of server: remote (Streamable HTTP), npm (`npx`), Python (`uvx`), Docker, .NET (`dnx`) and `.mcpb` bundles (downloaded, SHA-256 checked, extracted outside `~/.McpHub`). - **Secrets go to the Keychain**, never to `config.json`. A secret you already have (`GITHUB_TOKEN`...) is reused. - **Remote servers sign in with McpHub's native OAuth** (one click on *Sign in*), tokens in the Keychain. - **New servers inherit every guard**: shield sandbox for local code (Docker keeps its container), tool pinning and description scan on first contact, quarantine on change, audit log, permissions and profiles. From the terminal: `McpHub registry search postgres`, `McpHub registry info NAME`, `McpHub registry install NAME`, `McpHub registry sync`. ### Your agent installs what it needs No new tool is added for this (about 30 tokens in total). When `mcphub_search` finds nothing, the agent can call: ```text mcphub_call server=mcphub tool=registry_search arguments={"query": "postgres"} mcphub_call server=mcphub tool=registry_install arguments={"name": "io.github.acme/postgres-mcp"} ``` The server is installed with the same guards, its tools are indexed right away, and the call is audited. An agent never handles secrets: when a server needs one, the agent asks you to finish in the dashboard. Control it in `settings.registry`: ```json "registry": { "agentInstall": "trusted", "minTrust": 60 } ``` `agentInstall`: `"trusted"` (default, only servers whose trust score reaches `minTrust`), `"any"` or `"off"`. ### Your agent manages your servers The agent can also list, add, remove, enable and disable servers in `~/.McpHub/config.json`, without you editing the file: ```text mcphub_call server=mcphub tool=servers_list mcphub_call server=mcphub tool=server_disable arguments={"name": "cloudflare", "revision": ""} mcphub_call server=mcphub tool=server_add arguments={"name": "weather", "command": "npx", "args": ["-y", "weather-mcp"], "env": {"WEATHER_TOKEN": "${WEATHER_TOKEN}"}} mcphub_call server=mcphub tool=server_add arguments={"name": "linear", "url": "https://mcp.linear.app/mcp", "auth": "oauth"} mcphub_call server=mcphub tool=server_remove arguments={"name": "weather"} ``` - **Confirmation**: `server_add`, `server_remove` and `server_enable` ask you first (native window, or token depending on `confirmVia`). `server_disable` and `servers_list` don't. A rule in `settings.permissions` with `"server": "mcphub"` overrides this. - **No secrets**: a value that looks like a secret is refused, and a secret field (`*_TOKEN`, `*_KEY`, `Authorization`, `--password`...) only accepts a `${NAME}` reference. You store the value with `McpHub vault set NAME`. - **Safe writes**: each change saves the previous file in `~/.McpHub/backups/` (last 20 kept). It is refused if the file changed since `servers_list` (`revision`) or during the write. - **Local commands** run in the `shield` sandbox by default, and an agent cannot turn the sandbox off. - **Client accounts**: always refused from a tenant folder. A server used by a client account can't be removed or disabled by an agent. - Every call is written to the audit log (`admin/`). --- ## 🐧 Linux servers and sync McpHub runs the same way on a Linux server, for example next to an agent running on a VPS: ```bash curl -fsSL https://raw.githubusercontent.com/Soflutionltd/McpHub/main/get.sh | bash sudo apt install bubblewrap # sandbox McpHub install # systemd --user service ``` - **Sandbox with bubblewrap**: same policy as on macOS. Every secret folder (`~/.ssh`, `~/.aws`, `~/.McpHub`...) is replaced by an empty folder in memory, every secret file by an empty file; `strict` mode makes the whole system read-only except temporary folders, caches and `allowWrite`. - **Secrets** in `~/.McpHub/secrets.env`, mode 600, hidden from sandboxed servers. `McpHub vault set NAME` works the same. **Move your setup from one machine to another without any plaintext secret:** ```bash McpHub sync export mcphub.sync.json --secrets # on the Mac McpHub sync import mcphub.sync.json --secrets # on the server ``` The export is a portable `config.json`: every secret is a `${NAME}` reference (plain values that look like tokens are taken out of the copy), and home paths become `${HOME}/...`. With `--secrets`, the values travel too, encrypted with a passphrase (scrypt, then ChaCha20-Poly1305). Without the passphrase the file only reveals secret names. On import, servers whose program is missing on that machine are imported disabled, and decrypted secrets go to the Keychain (macOS) or `secrets.env` (Linux). For scripts, set `MCPHUB_SYNC_PASSPHRASE`. --- ## ⚙️ Configuration Everything lives in `~/.McpHub/config.json` and is hot-reloaded while the daemon runs. ```json { "servers": { "supabase": { "command": "npx", "args": ["-y", "@supabase/mcp-server-supabase"], "env": { "SUPABASE_ACCESS_TOKEN": "${SUPABASE_ACCESS_TOKEN}" }, "tools": { "exclude": ["delete_*", "pause_project"] }, "toolDescriptions": { "list_projects": "List my Supabase projects" } }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "readOnly": true }, "sentry": { "url": "https://mcp.sentry.dev/mcp" } }, "settings": { "mode": "discover", "sandbox": "shield", "toolSecurity": { "pinning": "block", "scan": "block", "newTools": "block" }, "permissions": { "default": "allow", "rules": [] }, "profiles": { "cursor": { "servers": ["supabase", "git*"], "excludeTools": ["supabase/execute_sql"] }, "review": { "readOnly": true } }, "codeMode": { "timeoutSecs": 60, "maxCalls": 100 }, "idleTimeout": 300 } } ``` Servers named in `settings.preload` (`"auto"`, `"all"` or a list) are started with the daemon and are not stopped when idle, so their next call never waits for a cold start; set `"keepPreloadedWarm": false` to let `idleTimeout` stop them too. A start that fails for a reason time does not fix (refused or expired sign-in, program not found) is reported at once instead of being tried three times. A server that keeps state in memory (the tabs of a driven browser, a booted simulator, an open shell) loses it for every conversation when it is stopped. Give that server its own `idleTimeout`, next to its `command`: `false` never stops it for inactivity, a number of seconds replaces the global delay for it. ```json "mcpServers": { "browser": { "command": "npx", "args": ["-y", "some-browser-mcp"], "idleTimeout": false } } ``` A server can also say so itself, with no setting ([for server authors](#for-mcp-server-authors-which-project-which-conversation)). `mcphub_status` shows why a running server is spared (`keptAlive`: `idleTimeout: false`, `preloaded` or `holds state`). A number of seconds written on a server always wins: it stops that server even if it is preloaded or says it holds state. ### Response cache McpHub can answer a repeated call from memory instead of asking the server again, but only for the tools you list in `settings.responseCache.tools`. Nothing is cached by default: a tool that only reads (`readOnlyHint`, or a name such as `get_…` or `list_…`) changes nothing, yet its answer can still go stale within seconds (a deployment status, a page that was just edited), and the agent would not know. ```json "settings": { "responseCache": { "ttlSecs": 60, "tools": [ "docs__resolve-library-id", { "server": "docs", "tool": "get-page", "ttlSecs": 900 } ] } } ``` - An entry is `"server__tool"`, or an object with `server`, `tool` and an optional `ttlSecs` of its own (1 to 3600 seconds). Names are exact: no wildcard. - `ttlSecs` (default 60, at most 3600) applies to the entries without their own; `0` turns the cache off. - An answer is reused only for the same server, tool, arguments and project folder, and never across client accounts. A cached answer carries `"_cache": { "hit": true, "age_ms": … }`, and `bypass_cache: true` on `mcphub_call` forces a real call. - Any call on the same server that is not a read drops that server's cached answers, so a write followed by a read sees the write. Errors are never cached. - A listed tool is still not cached when its server declares `readOnlyHint: false` or when its name looks like a write (`create`, `update`, `delete`, `execute`…). To choose what to list, look at the figures: `GET /api/metrics` returns, under `cache`, how many calls were answered from the cache (`served_from_cache`) and how many went to the server (`sent_to_server`), per server and per tool, since the daemon started. A tool that is called often with the same arguments, and whose answer does not change within the minute, is a good candidate. The dashboard shows the same figures per tool in Settings, under **Cached tools**, with whether each tool is in the list. ### Per-server options | Option | Effect | |---|---| | `tools.include` / `tools.exclude` | glob lists of tools to expose or hide | | `readOnly: true` | only tools that read (`readOnlyHint`, or a read verb such as get, list, search) | | `toolDescriptions` | rewrite a tool description shown to agents | | `sandbox` | `false`, `"shield"`, `"strict"` or an object (see Security) | | `inheritEnv` | daemon variables passed to this server by name | | `pool` | number of instances for parallel calls | | `url`, `headers`, `auth` | remote server over HTTP (`auth`: `"oauth"` or `"none"`) | ### Profiles per client Profiles decide what each client may see and call: `servers` and `excludeServers` (globs), `excludeTools` (`"server/tool"` globs) and `readOnly`. Select one with `http://127.0.0.1:24680/mcp/`, `/sse?profile=`, or `MCPHUB_PROFILE=` in stdio mode. ### Modes - `discover` (default): the agent sees `mcphub_search`, `mcphub_call` and `mcphub_run`. - `passthrough`: every tool is exposed directly as `server__tool` (full visibility, higher token cost). --- ## 🧰 CLI ```bash McpHub serve # HTTP daemon (Streamable HTTP /mcp, SSE /sse, dashboard) McpHub stdio # stdio mode for editors that spawn the process McpHub install # start at login · McpHub uninstall McpHub generate # start every server and index its tools McpHub status | doctor # configuration, cache and health diagnostics McpHub search "send email" McpHub dashboard # open the dashboard (one-time link) McpHub logs # follow the daemon log McpHub add # interactive server wizard McpHub vault ... # Keychain secrets: status, list, set, get, rm, migrate (--tenant ID) McpHub tenant ... # client accounts: add ID --dir DIR, list, check ID, rm ID McpHub registry ... # Library: search, info, install, uninstall, sync McpHub sync ... # export / import to another machine, secrets encrypted McpHub oauth ... # remote servers: status, login, logout, migrate (--tenant ID) McpHub pins ... # tool pinning: status, approve, reset, scan McpHub sandbox [show S] # server isolation McpHub policy test S T # which permission applies McpHub audit --tail 50 # recent calls (--tenant ID) McpHub agents ... # your rules, skills and plugins: setup, sync, cost, move, uninstall, update-skills ... McpHub update [--check] # install the latest signed release now (automatic otherwise) McpHub version | help ```
Publishing a release (maintainers) Bump `version` in `Cargo.toml`, merge, then push the tag `vX.Y.Z` (only admins can create `v*` tags). The `Release` workflow builds every binary, signs and notarizes the macOS ones, bundles the client, signs `latest.json` and publishes; the `MCP Registry` workflow then builds the Claude Desktop extension from `.mcp/`, attaches it and publishes to the MCP Registry. Its secrets live in the `release` environment, reachable only from `v*` tags; the signing key and the certificate are also kept in 1Password (`scripts/ci-signing-secrets.sh` refreshes the certificate when it is renewed). Something wrong with a version already out? ```bash gh workflow run release.yml --ref vX.Y.Z -f action=pause # nobody else receives it gh workflow run release.yml --ref vX.Y.Z -f action=resume # back to the gradual rollout gh workflow run release.yml --ref vX.Y.Z -f action=full # everyone now (urgent fix) ``` Installations never go back to an older version: to undo a release, publish a fixed one with a higher number.
### Your rules, skills and plugins `McpHub agents setup` creates one folder for your own rules (`rules/AGENTS.md`), skills (`skills//SKILL.md`), third-party skills (`vendor/`) and plugins (`plugins/`), and wires it into the tools you use (Claude Code, Cursor, Codex, Gemini CLI and others): links, a rules import, generated copies of the rules, and a Claude Code plugin marketplace. Not every tool reads all of it: see "What each tool receives" below. The folder is, in this order: `MCPHUB_AGENTS_DIR`; `~/.McpHub/agents` when it exists; `~/.MemoryPilot/agents` when only that one exists (where MemoryPilot used to keep it, and still syncs it at each session start); `~/.McpHub/agents` on a new install. Its state (update settings, state and logs) lives in `~/.McpHub/agents-state/`, or under `~/.MemoryPilot/` while the folder is there. You do not need a terminal for that: the Skills, Rules, Plugins and Enforced settings tabs of the dashboard carry a **Connected tools** list. It shows the tools that are connected, the ones found on this machine with a Connect button, and the other tools McpHub knows (Claude Code, Cursor, Codex, Gemini CLI, VS Code Copilot, Windsurf, OpenCode, Cline, Roo Code), which can be connected ahead of their installation. The first Connect creates the folder, exactly as `agents setup --tools ` does. Disconnect asks first, then removes what McpHub added to that tool (rules, skill links, plugins it installed, enforced settings it wrote) as `agents uninstall --tools ` does; your folder and what the tool had before stay, a skill link you had made yourself included (the result lists it as kept). Both commands take `--json`. **What each tool receives.** McpHub knows what it wrote, not what a tool loaded. For each connected tool and each kind of content, `agents setup`, `agents list-tools`, `GET /api/agents/status` (`tools[].contents`) and the Connected tools list say where it stands: written where the tool's documentation says it reads, written but not guaranteed to be read (with the reason and what to do), not supported, or not written. Nothing is ever reported as verified. | Tool | Rules | Skills | Plugins | |---|---|---|---| | Claude Code | A line in `~/.claude/CLAUDE.md` imports your rules ([documented](https://code.claude.com/docs/en/memory)). Accept the external-import prompt if a project shows one. | Links in `~/.claude/skills` ([documented](https://code.claude.com/docs/en/skills)) | Installed with `claude plugin install` | | Codex | Block in `~/.codex/AGENTS.md` ([documented](https://developers.openai.com/codex/guides/agents-md)). Codex stops at 32 KiB of instructions by default: McpHub says so when the file is larger. | Links in `~/.agents/skills` ([documented](https://developers.openai.com/codex/skills)) | Not delivered | | Gemini CLI | Block in `~/.gemini/GEMINI.md` ([documented](https://geminicli.com/docs/cli/gemini-md)). Not an `@import`: Gemini CLI refuses an import that leaves `~/.gemini`. It reads a word starting with `@` outside code as an import, so keep such words between backticks. | Links in `~/.agents/skills` ([documented](https://geminicli.com/docs/cli/skills)) | Not delivered | | Windsurf / Devin | Block in `~/.config/devin/AGENTS.md` ([documented](https://docs.devin.ai/cli/extensibility/rules)) for Devin CLI and Devin Desktop. Devin also reads `~/.claude/CLAUDE.md`; its documentation does not say whether it follows the import McpHub puts there, so with Claude Code connected the rules may arrive twice. The legacy Cascade agent is not covered. | Links in `~/.agents/skills` ([documented](https://docs.devin.ai/cli/extensibility/skills/overview)) | Not delivered | | OpenCode | Your rules file in `instructions` of `~/.config/opencode/opencode.json` ([documented](https://opencode.ai/docs/rules)) | Links in `~/.agents/skills` ([documented](https://opencode.ai/docs/skills)) | Not delivered | | Cline | Link in `~/Documents/Cline/Rules` ([documented folder](https://docs.cline.bot/customization/cline-rules)); check that it shows in the Rules panel | Links in `~/.agents/skills` ([documented](https://docs.cline.bot/getting-started/config)) | Not delivered | | Roo Code | Link in `~/.roo/rules` ([documented](https://docs.roocode.com/features/custom-instructions), links included) | Links in `~/.agents/skills` ([documented](https://docs.roocode.com/features/skills), links included) | Not delivered | | Cursor | **Not guaranteed.** McpHub writes `~/.cursor/rules/agents.mdc`, which Cursor [documents](https://cursor.com/docs/rules) for self-hosted workers only. In the editor, personal rules live in its settings: paste them in Customize → Rules → User Rules. | Links in `~/.agents/skills`, or those of `~/.claude/skills` when Claude Code is connected ([documented](https://cursor.com/docs/skills)) | **Not guaranteed.** With Claude Code connected, McpHub relies on Cursor importing Claude Code plugins. Without it, it links the plugin's `cursor/` variant into `~/.cursor/plugins/local`, and Cursor [says](https://cursor.com/docs/plugins) it skips a link that points outside that folder. | | VS Code Copilot | **Not guaranteed.** `~/.copilot/copilot-instructions.md` is read by Copilot CLI and the Copilot harness, not by the Local chat of VS Code, which keeps user instructions in the VS Code profile ([reference](https://code.visualstudio.com/docs/agents/reference/custom-instructions-reference)). | Links in `~/.agents/skills` ([documented](https://code.visualstudio.com/docs/agents/reference/agent-skills-reference)) | Not delivered | Notes on this table: - "Not delivered" for plugins: McpHub installs plugins in Claude Code and Cursor only. Elsewhere, the skills of each plugin are linked as skills in `~/.agents/skills`, whether or not the plugin has a Cursor variant, and the rest of the plugin is not delivered. Cursor reads `~/.agents/skills` too: when another tool needs those links and Cursor already has the plugin (from Claude Code, or as its `cursor/` variant), Cursor may list the plugin's skills twice, and its state says so. With Cursor alone, or Cursor and Claude Code, nothing is listed twice. - **What disappears is put back, what you changed is left alone.** Every sync checks that what McpHub wrote is still there: a skill link, a rules block, an import line or a generated file that is gone (the tool was reinstalled, a configuration was restored) comes back at that pass, even when your rules and skills did not change. A link someone pointed elsewhere, or a block or file edited by hand, is never overwritten: the sync result names it once, McpHub stops tracking it, and the tool's state shows what is not delivered. A Claude Code plugin you uninstalled is not reinstalled by this check. - **While the folder is at `~/.MemoryPilot/agents`**, MemoryPilot syncs it too, with its own wiring. McpHub keeps that wiring there (an `@import` for Gemini CLI, no rules for Devin, no skill link for a plugin that has a Cursor variant) so the two do not undo each other, and the state of those tools says so. `McpHub agents move` brings the wiring of this table. - Skills are links to folders. Claude Code, Codex and Roo Code document that they follow such links; the other tools document the folder, not the links. - **Windows:** where this table says "link", McpHub writes a folder junction instead of a symbolic link, because a junction needs neither administrator rights nor developer mode. Skills and the Cursor plugin variant are delivered that way. A junction only works on a local NTFS disk: when the tool's folder or your agents folder is on a network share (a mapped drive included) or on a disk that is not NTFS, the link is not created, nothing is left behind, and the sync result says why. A junction cannot point to a file, so Cline and Roo Code receive a generated copy of your rules, refreshed at each sync: edit your rules file, not the copy. Removing a junction (disconnecting a tool, `agents uninstall`) never touches the folder it points to. The tools' documentation speaks of symbolic links, not junctions, and McpHub has not been tried with each tool on Windows: check that your skills show up in the tool. - A session that is already open keeps the rules it loaded when it started: restart it after a change. Claude Code and Codex say they notice new or edited skills on their own; restart the other tools to be sure. **What it costs at the start of every conversation.** Every tool loads your rules file in full when a conversation starts, and the name and description of every skill; the body of a skill is loaded only when the skill is used. `McpHub agents cost` (`--json` for one JSON document), `GET /api/agents/status` (`cost`) and the Skills and Rules tabs of the dashboard show what that adds up to: ```bash McpHub agents cost ``` - **Per skill**, most expensive first: characters and estimated tokens of what is loaded at startup (name, `description` and `when_to_use`), the characters past 1,536 that Claude Code cuts from the listing, and the size of the body, shown apart. - **Rules:** characters and estimated tokens of `rules/AGENTS.md`, and its share of the 32 KiB that Codex reads of `AGENTS.md` instructions ([`project_doc_max_bytes`](https://developers.openai.com/codex/guides/agents-md)). - **Against the listing budget**, for a 200,000, a 400,000 and a 1,000,000 token context window (the two windows of Claude models in Claude Code, and the window of the GPT-5 models of Codex): [Claude Code](https://code.claude.com/docs/en/skills) gives the skill listing 1% of the context window, then drops the descriptions of the skills you invoke least and keeps every name; [Codex](https://learn.chatgpt.com/docs/build-skills) gives it 2%, or 8,000 characters when it does not know the window, then shortens descriptions. For every other tool: no documented budget, so no figure. - **Findings:** descriptions that Claude Code cuts, descriptions above the 1,024 characters of the [Agent Skills specification](https://agentskills.io/specification), skills without a description, skills that share a name, and descriptions that are nearly identical (80% of their words in common). Every token figure is an **estimate**, never a measurement: 4 UTF-8 bytes per token, the rule McpHub uses everywhere. Claude's [glossary](https://platform.claude.com/docs/en/about-claude/glossary) gives about 3.5 English characters per token, and about 30% more tokens from Opus 4.7 on, so the real count is likely 15% to 50% higher. Characters are exact. For the real cost after the budget is applied, run `/context` in Claude Code; `/doctor` estimates the listing and names its biggest contributors. The count covers the skills of your agents folder, those of its plugins, and the skills other tools installed in `~/.claude/skills` or `~/.cursor/skills`; those are read from the catalog the last sync wrote, and one that only Cursor has is left out of the Claude Code listing. The count does not know which descriptions a tool dropped, what a project adds (its own `CLAUDE.md`, `AGENTS.md` or skills), nor your Claude Code settings: `skillListingMaxDescChars` moves the 1,536 cut, `skillListingBudgetFraction` the budget. **Project skills: fewer descriptions where they do not help.** Past its listing budget, Claude Code drops the descriptions of the skills you invoke least, and the agent then picks from names alone. Project skills decides it for you, per project: the skills a project uses keep their full listing, the others keep only their name. It relies on a native Claude Code setting, [`skillOverrides`](https://code.claude.com/docs/en/skills), with the value `"name-only"`: the skill stays listed by name and can still be used. McpHub never writes `"off"`. Off by default. Declare your families in `profiles.json`, in the agents folder (or in the Skills tab of the dashboard, section Project skills), then turn on **Project skills** in Settings (`"agents": { "projectSkills": true }` under `settings` in `config.json`): ```json { "core": ["commit-helper"], "families": { "mobile": { "skills": ["flutter-layout", "store-listing"], "signs": ["flutter"] }, "docs": { "skills": ["release-notes"], "files": ["docs/", "mkdocs.*"] } }, "projects": { "/Users/you/Code/demo-app": { "force": ["docs"], "exclude": ["mobile"] } } } ``` - **`core`**: skills that stay fully listed everywhere. - **`families`**: each family lists its skills and what activates it in a project: built-in `signs` (table below) and `files`, paths relative to the root of the project where `*` stands for any characters in one name and a final `/` asks for a folder. A project can activate several families; a skill in several families stays fully listed as soon as one of them is active. - **`projects`** (optional): per folder, families to `force` or `exclude`, or `"off": true` to leave that project alone. A folder named here is handled even when it is not one of your McpHub projects. - A skill that is in no family and not in the core **always stays fully listed**. Without `profiles.json`, nothing is written. | Sign | Present when the project has | |---|---| | `flutter` | `pubspec.yaml` | | `sveltekit` | `svelte.config.*` | | `node` | `package.json` | | `rust` | `Cargo.toml` | | `tauri` | `src-tauri/tauri.conf.json` | | `cloudflare` | `wrangler.*` | | `supabase` | a `supabase/` folder | | `xcode` | `*.xcodeproj` at the root or under `ios/` | | `gradle` | `build.gradle*` at the root or under `android/` | | `hyperframes` | `hyperframes.json` | McpHub only checks that these files exist: it runs nothing from the project and reads none of its files. A sign is looked for at the root of the project and in the folder you declared, then in the subfolders, up to three levels below the root, because the application of a repository often lives in `apps/web`, `mobile` or `site`. The search never enters a hidden folder (a name starting with `.`), `node_modules`, `target`, `build`, `dist`, `vendor` or `Pods`, and never follows a symbolic link. For each sign the match nearest to the root wins, and the dashboard and `agents profiles` name it: `web (because of apps/web/svelte.config.js)`. The search reads at most 1,000 folders per project; past that it keeps what it found and the project says the search stopped. The `files` of a family are only looked for at the root and in the folder you declared. When the detection gets a project wrong, `force` or `exclude` the family there: that always wins. The `node` sign is present in almost every repository, including Flutter, Rust or documentation projects that keep a `package.json` for their tooling: do not make it the only thing that activates a family, or that family is active nearly everywhere and reduces nothing. Prefer a sign that tells the kind of project (`sveltekit`, `cloudflare`), or a file of your own. The projects are the `workspaces` of `projects.json`, plus the folders named under `projects` in `profiles.json`. The root of a project is the root of its git repository when it has one (never your home folder): in the trial below, Claude Code applied a `settings.local.json` found there in a subfolder too, and in a git worktree of that repository. ```bash McpHub agents profiles # families, projects, what each one keeps, estimated listing before and after McpHub agents profiles show # the families a folder activates, and the skills reduced there McpHub agents profiles apply --dry-run # what would be written, without writing McpHub agents profiles apply [] # write now (the daemon does it every two minutes) McpHub agents profiles clear [] # remove what McpHub wrote ``` What McpHub writes, and what it never touches: - It writes `skillOverrides` entries in `/.claude/settings.local.json`, the file where Claude Code itself keeps your permissions for that project. It adds and removes **only the entries it wrote** (remembered in `agents-state/state/project-skills.json`). An entry that is already there, whatever its value, is yours: McpHub never changes or removes it. To keep one skill fully listed in one project, write `"that-skill": "on"` there. - Nothing else in the file changes, byte for byte. The write is atomic, a copy of the file is kept in `agents-state/state/project-skills-backups/` before the first change, and McpHub refuses to write at the slightest doubt (invalid JSON, a `skillOverrides` that is not an object, a file or a `.claude` folder that is a symbolic link, a file that changed while it was being edited), with the reason shown in the dashboard and in `agents profiles`. - **A file tracked by git is never modified.** When the file is neither tracked nor ignored, McpHub adds it to `.git/info/exclude` (local to your clone, never committed) and says so; it never edits the project's `.gitignore`. - Turn the setting off, remove a project from the list or delete `profiles.json`, and McpHub takes its entries back, with the key or the file if it had created them and they are empty again. - **Plugin skills** (`plugin:skill`) are left alone: Claude Code documents that `skillOverrides` does not affect them. Entries are matched by the **folder name** of a skill. - **Claude Code only.** No other tool documents a per-project setting that keeps a skill listed by name without its description, so McpHub writes nothing for them: Codex can only switch a skill off for the whole user ([`[[skills.config]]`](https://developers.openai.com/codex/skills)), and Cursor scopes a skill to files from the skill's own `paths` field ([docs](https://cursor.com/docs/skills)). A measurement, on one machine, with Claude Code 2.1.295 and `claude -p "/context"`: 111 skills listed at 16.6k tokens; with 40 of them set to `"name-only"`, 11.8k (11.5k with `"off"`, so 40 names cost about 300 tokens). In a throwaway home with 30 skills, the file McpHub wrote for a project that uses 10 of them took the Skills line from 5.5k to 3.3k tokens, in a subfolder and in a git worktree of the project as well, and left it at 5.5k in a project that activates the family. The figures McpHub shows are **estimates** (4 bytes per token) and say so: run `/context` in a session of the project for the real one. A background pass with nothing to do takes about 0.02 s of CPU and writes nothing (30 projects, 111 skills, release binary, process start included); the first pass, which wrote 30 files and asked git about 20 repositories, took 1.8 s. `McpHub agents move` takes the folder from `~/.MemoryPilot/agents` to `~/.McpHub/agents`: it renames the folder (never copies it), moves the `agents-*` state files, repoints every link, rules import, generated copy and the Claude Code marketplace (which keeps its name, `memorypilot`, so your enabled plugins stay enabled), and leaves at the old path a small folder of links (`skills`, `vendor`, `plugins`, `rules`) so that agent sessions already open keep working. `--dry-run` shows what it would do; running it again only redoes the rewiring. Once the folder is in `~/.McpHub`, the daemon keeps your tools in sync with it: every two minutes it wires new skills and rule changes (nothing is written when nothing changed) and, when automatic updates are on, runs them once a day. Turn that off in the dashboard (Settings, "Keep tools in sync") or with `"agents": { "autoSync": false }` under `settings`. **Enforced settings.** The same folder can hold `enforced.json`, the settings McpHub writes into a tool and keeps there, one section per tool. It reads two: the tools Claude Code is denied, and what Codex has switched off (below). These settings decide what an agent sees in that tool. What it can do through McpHub (`mcphub_call`, `mcphub_batch`, `mcphub_run`) is a separate layer: McpHub's own permissions (`settings.permissions`), checked on every call, including each call of a batch or a script. ```json { "claude": { "deny": ["mcp__example", "WebSearch"] } } ``` Each rule is copied to `permissions.deny` in the user settings of Claude Code (`~/.claude/settings.json`), where a bare tool name, an MCP server (`mcp__server`) or one of its tools (`mcp__server__tool`) removes the tool from what the agent sees. Edit the file by hand, use the Enforced settings tab of the dashboard, or the command line: ```bash McpHub agents enforced # the rules and where each one stands McpHub agents enforced add-deny mcp__example McpHub agents enforced remove-deny mcp__example ``` `agents setup`, `agents sync` and the daemon apply the file, so a new machine gets the rules with the folder. McpHub adds and removes only its own lines in `settings.json`: nothing else in the file changes (key order, layout, final newline), the write is atomic and goes to the real file when `settings.json` is a symbolic link, and a copy of the file is kept in `agents-state/state/enforced-backups/` before the first change. A line you had already written by hand is adopted, not duplicated, and is never removed, even when you take the rule out of the list. A line McpHub added is put back if it disappears, and removed when you take the rule out of the list or run `agents uninstall`. When `settings.json` does not exist, it is created only if there is a rule to write. When it is not valid JSON, or `permissions` or `deny` is not what Claude Code expects, McpHub writes nothing to it and reports the error in the sync result. A rule that would have no effect is refused: an empty one, one already in the list, or an `mcp__` rule with parentheses, which Claude Code ignores. Enforced settings are applied from `~/.McpHub/agents` only, not while the folder is still at `~/.MemoryPilot/agents`. The `codex` section switches off MCP servers, single tools of a server, and plugins in the user config of Codex (`~/.codex/config.toml`, or `$CODEX_HOME/config.toml`): ```json { "codex": { "disabled_servers": ["example"], "disabled_tools": { "example": ["delete_item"] }, "disabled_plugins": ["example-plugin@example-market"] } } ``` | In `enforced.json` | In `config.toml` | |---|---| | a name in `disabled_servers` | `enabled = false` in `[mcp_servers.]` | | a tool under its server in `disabled_tools` | the tool name added to `disabled_tools` in `[mcp_servers.]` | | a `name@marketplace` in `disabled_plugins` | `enabled = false` in `[plugins."@"]` | ```bash McpHub agents enforced add-codex server example McpHub agents enforced add-codex tool example delete_item McpHub agents enforced add-codex plugin example-plugin@example-market McpHub agents enforced remove-codex server example # same three forms ``` The same rules hold as for Claude Code: only what McpHub wrote is undone, the rest of the file keeps its comments, order, layout and line endings byte for byte, the write is atomic and follows a symbolic link, and a copy of the file is kept before the first change. What differs: - **Nothing is created.** McpHub only switches off a server or a plugin that `config.toml` already describes. When the table is not there, nothing is written and the setting shows as not disabled yet, with the reason; it is applied by the first sync after the table appears. Codex rejects an `mcp_servers` table that has neither `command` nor `url` ("invalid transport"), so McpHub never writes one. - **Removing a setting puts back what was there.** McpHub remembers what it replaced: a missing `enabled` key is removed again, an `enabled = true` comes back as `true`, and a `disabled_tools` list McpHub had to create goes away with its last tool. A server, tool or plugin that was already switched off by hand is adopted and stays off when you take it out of the list. - **It refuses rather than guess.** A file that is not valid TOML, an `enabled` that is not a boolean, a `disabled_tools` that is not a list of strings, or a table written with dotted keys (`mcp_servers.example.command = "..."`, no `[header]` line) is left untouched and reported in the sync result. Before writing, McpHub parses its own result again and checks that the one setting is the only difference. - **It is the user config, not a policy.** Codex gives precedence to command-line overrides (`-c`), to the `.codex/config.toml` of a trusted project and to a profile file over `~/.codex/config.toml`: any of them can switch a server, a tool or a plugin back on for that run. Codex also rewrites `config.toml` itself (`codex mcp add`, trusting a project, and so on); McpHub puts a setting back at the next sync if it disappears. The built-in tools of Codex (`web_search`, `features.*`) are out of scope. Files: `~/.McpHub/` (config, cache, pins, audit log, token, `agents/` and `agents-state/`; `~/.McpHub-/` for a [named instance](#working-on-client-accounts)) and `~/Library/Logs/McpHub/.stderr.log` (each server's error output). --- ## ❓ FAQ
Does it work with any MCP server? Tools, yes: any stdio server (`command` + `args`) and any Streamable HTTP server (`url`). Tool annotations, output schemas, paginated tool lists and protocol versions up to 2025-11-25 are relayed; the 2026-07-28 revision (no `initialize`, `server/discover`) is not implemented yet. Requests a server sends back to the client, sampling and elicitation, are refused.
What happens when an editor restarts? Nothing: the daemon keeps running, servers stay warm, and the editor reconnects to the same URL.
Will the sandbox break my servers? `shield` only removes access to secrets and to a few programs that could escape it; regular servers keep working. Servers that need the whole machine (a shell tool like desktop-commander) are left outside by default, and any server can opt out with `"sandbox": false`.
Why does macOS ask for permissions after an update? macOS remembers permissions per signing identity. `make install` signs with your Developer ID when available; the prebuilt binary is signed by SOFLUTION LTD. Ad-hoc builds get a new identity on every build, so macOS asks again.
How do I uninstall? ```bash McpHub uninstall rm ~/.local/bin/McpHub rm -rf ~/.McpHub ``` Installed as an extension of the Claude desktop app: remove it in **Settings > Extensions**. On its own the extension starts no background service and changes no other app; what it stored is in `~/.McpHub`.
---

McpHub logo
MIT License · Made by Soflution