{"id":40353048,"url":"https://github.com/vaayne/mcphub","last_synced_at":"2026-01-30T04:23:55.597Z","repository":{"id":333451530,"uuid":"1137339301","full_name":"vaayne/mcphub","owner":"vaayne","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-19T10:48:25.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-19T17:06:42.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaayne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-19T08:41:17.000Z","updated_at":"2026-01-19T10:47:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vaayne/mcphub","commit_stats":null,"previous_names":["vaayne/mcphub"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vaayne/mcphub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaayne%2Fmcphub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaayne%2Fmcphub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaayne%2Fmcphub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaayne%2Fmcphub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaayne","download_url":"https://codeload.github.com/vaayne/mcphub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaayne%2Fmcphub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28601279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T09:39:28.479Z","status":"ssl_error","status_checked_at":"2026-01-20T09:38:10.511Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-20T10:00:16.235Z","updated_at":"2026-01-30T04:23:55.590Z","avatar_url":"https://github.com/vaayne.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Hub\n\nA lightweight hub that connects multiple MCP servers into one. Think of it as a reverse proxy for MCP - your AI assistant talks to the hub, and the hub routes requests to the right server.\n\n## Why?\n\nIf you're using multiple MCP servers (GitHub, filesystem, databases, etc.), managing them separately gets messy. MCP Hub gives you:\n\n- **One connection** instead of many - your client connects to the hub, done\n- **Tool namespacing** - no more conflicts when two servers have a `search` tool (`githubSearch` vs `filesSearch`)\n- **Built-in scripting** - chain tool calls together with JavaScript\n- **Auto-reconnection** - servers crash sometimes, the hub handles it\n\n## Three Ways to Use It\n\n**Server mode** - Run `mh serve -c config.json` to start a hub that aggregates multiple MCP servers. Your AI client connects to the hub, and the hub routes tool calls to the right backend.\n\n**CLI mode** - Use `mh list`, `mh inspect`, `mh invoke` to interact with MCP servers directly from your terminal. Great for debugging, testing, or scripting.\n\n**Skill mode** - Discover skills from [skills.sh](https://skills.sh) or generate lightweight \"skill\" files from MCP servers. Skills teach AI agents how to use tools on-demand without loading all schemas into context. Use `mh skills find/add` to browse the ecosystem, or follow the `mcp-skill-gen` workflow to create skills from any MCP server.\n\nAll modes support the same connection types: local servers via config, remote HTTP/SSE endpoints via URL, or stdio subprocesses.\n\n## Quick Start\n\n```bash\n# Install\ncurl -fsSL https://raw.githubusercontent.com/vaayne/mcphub/main/scripts/install.sh | sh\n\n# Create a config file\ncat \u003e config.json \u003c\u003c 'EOF'\n{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/tmp\"]\n    }\n  }\n}\nEOF\n\n# Run as hub server\nmh serve -c config.json\n\n# Or explore tools from CLI\nmh list -c config.json\nmh invoke -c config.json filesystemReadFile '{\"path\": \"/tmp/test.txt\"}'\n```\n\n## Configuration\n\nThe config file is straightforward JSON. Each server gets a name and connection details:\n\n```json\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-github\"],\n      \"env\": { \"GITHUB_TOKEN\": \"ghp_xxx\" }\n    },\n    \"remote-api\": {\n      \"transport\": \"http\",\n      \"url\": \"https://api.example.com/mcp\",\n      \"headers\": { \"Authorization\": \"Bearer ${API_TOKEN}\" }\n    },\n    \"streaming\": {\n      \"transport\": \"sse\",\n      \"url\": \"http://localhost:8080/sse\"\n    }\n  }\n}\n```\n\n**Transport types:**\n\n- `stdio` (default) - runs a local command\n- `http` - connects to a remote HTTP endpoint\n- `sse` - Server-Sent Events for streaming servers\n\n**Other options:**\n\n- `enable: false` - disable a server without removing it\n- `required: true` - fail startup if this server can't connect\n- `timeout` - connection timeout in seconds (http/sse only)\n- `tlsSkipVerify` - skip TLS verification (don't use in production)\n\n## CLI Usage\n\n### Server Mode\n\n```bash\n# Start hub on stdio (default, for AI clients)\nmh serve -c config.json\n\n# Start hub on HTTP (for web clients)\nmh serve -c config.json -t http -p 8080\n```\n\n### CLI Mode\n\n```bash\n# From config file (connects to all servers defined in config)\nmh list -c config.json\nmh inspect -c config.json githubSearchRepos\nmh invoke -c config.json githubSearchRepos '{\"query\": \"mcp\"}'\n\n# From remote URL\nmh list -u https://mcp.example.com\nmh invoke -u http://localhost:3000 -t sse some_tool '{\"arg\": \"value\"}'\n\n# From stdio subprocess\nmh list --stdio -- npx @modelcontextprotocol/server-everything\n\n# Enable debug logging\nmh list -c config.json --verbose\n```\n\n## Built-in Tools\n\nThe hub includes a few tools of its own:\n\n**`search`** - Find tools across all connected servers by name or description.\n\n**`execute`** - Run JavaScript that can call any tool. Useful for chaining operations:\n\n```javascript\nconst repos = mcp.callTool(\"githubSearchRepos\", { query: \"mcp\" });\nconst readme = mcp.callTool(\"githubGetFile\", {\n  repo: repos[0].name,\n  path: \"README.md\",\n});\nreadme;\n```\n\nThe JS runtime is intentionally limited - sync only, no network access, 15-second timeout. It's for glue code, not application logic.\n\n**`refreshTools`** - Reload tool lists from servers (useful after server restarts).\n\n## Security Notes\n\nThe hub takes a paranoid approach:\n\n- Commands are validated - no shell injection, no path traversal\n- Shell interpreters (bash, sh) are blocked as commands\n- Environment variables are sanitized (no `LD_PRELOAD` tricks)\n- JavaScript is sandboxed - no `eval`, no `Promise`, no `fetch`\n\nThat said, you're still running arbitrary MCP servers. Only configure servers you trust.\n\n## Building from Source\n\n```bash\ngit clone https://github.com/vaayne/mcphub.git\ncd mcphub\ngo build -o mh .\n\n# Or with mise\nmise run build\n```\n\nRequires Go 1.23+.\n\n## Skills\n\nSkills are modular packages that extend AI agent capabilities. MCP Hub supports two workflows:\n\n### Discover \u0026 Install Skills\n\nBrowse and install skills from [skills.sh](https://skills.sh), the open agent skills ecosystem:\n\n```bash\n# Search for skills by keyword\nmh skills find react\nmh skills find \"code review\"\n\n# Install a skill\nmh skills add anthropics/skills@mcp-builder\nmh skills add vercel-labs/agent-skills@react-best-practices\n```\n\nSkills are installed to `.agents/skills/\u003cskill-name\u003e/` in the current directory.\n\n### Generate Skills from MCP Servers\n\nIf you're using an AI coding agent, loading all MCP tools into context can be expensive. Instead, generate a \"skill\" file that teaches the agent how to discover and use tools on-demand.\n\n```bash\n# Preview tools from a remote MCP server\nmh list -u https://mcp.exa.ai\n\n# Preview tools from config\nmh list -c config.json\n```\n\nThen use the `mcp-skill-gen` workflow (in `skills/mcp-skill-gen/`) to generate a SKILL.md that contains:\n\n- Service URL/config and transport type\n- List of available tools with descriptions\n- Commands for `mh list`, `mh inspect`, `mh invoke`\n\nWhen the AI needs a tool, it reads the skill, runs `mh inspect` to get the schema, then `mh invoke` to call it. No need to load all tool schemas upfront.\n\n## Troubleshooting\n\n**\"context deadline exceeded\"** - Server took too long to start. Check that the command exists and works standalone.\n\n**\"async functions are not allowed\"** - The `execute` tool only supports sync code. Remove any `async`/`await` or `Promise` usage.\n\n**Tool not found** - Remember tools are namespaced with server prefix in camelCase: `serverNameToolName`. Use `mh list` to see available tools.\n\n## License\n\nMIT\n\n## Links\n\n- [GitHub](https://github.com/vaayne/mcphub)\n- [Issues](https://github.com/vaayne/mcphub/issues)\n- [Testing Guide](docs/testing.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaayne%2Fmcphub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaayne%2Fmcphub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaayne%2Fmcphub/lists"}