Additional documentation:
MCPHub is a generic Rust-based hub for managing upstream MCP servers.
The core idea is simple:
- register upstream MCP endpoints under stable ids
- discover their tools through the MCP protocol
- cache those tool descriptors locally
- call upstream tools by
endpoint_id + tool_name - expose hub-native MCP tools through a stdio facade
- grow toward a CLI-style facade over schema-driven invocation
- standalone Cargo project
- persistent endpoint registry
- HTTP endpoint registration
- stdio endpoint registration
- MCP tool discovery through
rmcp - direct upstream tool invocation
- CLI for register/list/discover/call
- stdio MCP facade server (
serve-stdio) - structured tool catalog output with
list-tools --json - schema inspection with
tool-info, includingtool-info --all --json <endpoint_id> - qualified-name invocation such as
context7/resolve-library-id - nested CLI argument assignment via dotted
--set - schema-driven local invoke flow with positional
KEY=VALUE - runtime health checks with observable connection reuse
- local daemon mode for cross-command runtime reuse
- richer schema handling for defaults, enums, and simple composed schemas
- namespaced / qualified-name invocation options
- richer output formatting for content types
- health monitoring and refresh policies
- better CLI argument coercion from cached JSON schema
cd MCPHub
cargo run -- register-http docs-main http://127.0.0.1:19840/mcp
cargo run -- discover docs-main
cargo run -- list-tools docs-main
cargo run -- tool-info docs-main/search
cargo run -- tool-info --all --json docs-main
cargo run -- call docs-main/search --arguments-json "{\"query\":\"rust\",\"domain\":\"docs\"}"
cargo run -- invoke docs-main/search query=rust domain=docs
cargo run -- daemon start
cargo run -- invoke docs-main/search query=rust domain=docs --daemonTo inspect cached schemas as JSON:
cargo run -- list-tools docs-main --jsonTo register a stdio server:
cargo run -- register-stdio my-server python --arg -m --arg my_mcp_serverTo serve MCPHub itself as a stdio MCP facade:
cargo run -- serve-stdioTo inspect every cached tool for one endpoint, including starter input templates:
cargo run -- tool-info --all --json context7You can also inspect one cached tool directly by qualified name:
cargo run -- tool-info context7/resolve-library-id --jsonTo use the schema-driven local facade form:
cargo run -- invoke context7/resolve-library-id libraryName=react query=reactTo observe connection reuse inside a single long-lived runtime:
cargo run -- health context7 --repeat 2 --jsonTo reuse one runtime across separate shell invocations, start the local daemon:
cargo run -- daemon start
cargo run -- daemon status
cargo run -- health context7 --daemon --json
cargo run -- invoke context7/resolve-library-id libraryName=react query=react --daemon
cargo run -- daemon stop