LABSCO SUMMARY
Unexpansion is the feature to notice.
Expanding ${API_KEY} into a tool argument is ordinary; replacing the secret with its variable reference on the way back out is not, and it is what keeps a credential from reappearing in a response the model will read. Note that only the ${VARIABLE_NAME} form is expanded — bare $VARIABLE_NAME is not. Timeout handling is documented down to the edge cases: values over the maximum safe delay are capped and malformed values fall through with a warning.
What it is
An MCP proxy that connects to multiple backend servers and presents their combined tools, resources and prompts through a single interface. It routes calls to the right backend, and gives you control over which tools are exposed and what they are called.
What you get
- Tools from every connected server exposed with server-name prefixes, and requests routed to the right backend
- Per-server tool filtering —
exposedToolsallows only what you list,hiddenToolsblocks what you name, andexposedToolsentries can be{original, exposed}objects to rename a tool - Compound tools you define yourself, whose
subtoolsare keyed by server name, invoked with a{server, tool, args}payload - Environment variables expanded in tool arguments with
${VARIABLE_NAME}syntax and unexpanded back into references in responses — configured per variable, globally or per server, so an API key does not travel back in output - Backends over stdio, SSE or Streamable HTTP, each with
enableand its owntimeoutin seconds —0disables the timeout, unset falls back to the SDK default of 60 seconds - The hub itself served over stdio, SSE or Streamable HTTP, with optional bearer auth
- A CLI for direct and interactive use —
mcp-proxy-hub-cli listandmcp-proxy-hub-cli call <toolName> key=value, with--output-dirto save results
Requirements
A JSON configuration file listing the servers to connect to — its fields are documented under Configuration in the README; MCP_PROXY_CONFIG_PATH gives the file's absolute path. Other variables: MCP_PROXY_LOG_DIRECTORY_PATH, MCP_PROXY_LOG_LEVEL (debug or info), MCP_PROXY_AUTH_TOKEN for bearer auth, MCP_PROXY_PATH (default /mcp), PORT (default 3006), HOST (default 0.0.0.0), and KEEP_SERVER_OPEN=1 to hold the connection after a client disconnects in SSE mode. The package is @naotaka/mcp-proxy-hub with four binaries — stdio, SSE, HTTP and the CLI. npx -y @naotaka/mcp-proxy-hub runs it with nothing to build; npm install then npm run build is only for working from a clone.
Setup effort
One command — npx -y @naotaka/mcp-proxy-hub
USE CASES
Cutting a crowded tool list down
Set an allowlist per backend so the model only sees the tools it should use, instead of the union of everything.
Fixing two servers that named a tool the same thing
Rename one at the proxy with the original/exposed form, so both stay reachable without ambiguity.
Making one call do a multi-server job
Define a compound tool whose subtools point at different backends, and call it as a single named operation.
Keeping a key out of the transcript
Configure the variable for both expansion and unexpansion, so it goes into the request and comes back as a reference.
Stopping one slow backend from stalling everything
Set a short per-server timeout for the flaky one and leave the global default in place for the rest.
BEFORE YOU INSTALL
What to know first
Tools you get
0 tools when we connected. The hub has no tools of its own: it exposes the tools of the backend servers named in your config file, prefixed with each server's name, so the list stays empty until that file lists at least one server.
Requires
- npx on PATH
- A JSON config file listing the backend servers, named by MCP_PROXY_CONFIG_PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
npx -y @naotaka/mcp-proxy-hubMCP Clients
Claude Desktop
{
"mcpServers": {
"mcp-proxy-hub": {
"command": "npx",
"args": [
"-y",
"@naotaka/mcp-proxy-hub"
],
"env": {
"MCP_PROXY_CONFIG_PATH": "<YOUR_MCP_PROXY_CONFIG_PATH>",
"KEEP_SERVER_OPEN": "1"
}
}
}
}<YOUR_MCP_PROXY_CONFIG_PATH> is the full path of the JSON file that lists the servers the hub connects to (its format is under Configuration in the project's README). npx runs the package's mcp-proxy-hub program — the same build/index.js the README's local-build example points at.