Provides integration with Node.js for executing and managing MCP servers through the hub
Built with TypeScript, offering type-safe interfaces for connecting to and managing MCP servers
Utilizes Zod for runtime validation of configuration data and tool arguments
MCP-Hub-MCP Server
A hub server that connects to and manages other MCP (Model Context Protocol) servers.
Overview
This project builds an MCP hub server that can connect to other MCP servers, list their tools, and execute them. It is especially useful for bypassing Cursor's 40-tool MCP limit. Even outside of Cursor, it helps reduce AI mistakes by hiding infrequently used tools.
Related MCP server: MCP Proxy Server
Key Features
Automatic connection to other MCP servers via configuration file
List available tools on connected servers
Call tools on connected servers and return results
Configuration
Add this to your mcp.json:
Using npx
Using Node (e.g., for local development or direct execution)
If npx isn't picking up your local changes or you prefer to run the built server directly, you can configure it like this:
Note: Ensure you have built the project (e.g., npm run build or pnpm build) so that dist/index.js exists.
System Prompt (or Cursor Rules)
This ensures that the AI assistant will always check available tools before attempting to use them.
Installation and Running
Requirements
Node.js 18.0.0 or higher
npm, yarn, or pnpm
Installation
Build
Run
Development Mode
Configuration File
The MCP-Hub-MCP server uses a Claude Desktop format configuration file to automatically connect to other MCP servers. You can specify the configuration file in the following ways:
Environment variable: Set the
MCP_CONFIG_PATHenvironment variable to the configuration file pathCommand line argument: Use the
--config-pathoption to specify the configuration file pathDefault path: Use
mcp-config.jsonfile in the current directory
Configuration file format:
Example:
Usage
The MCP-Hub-MCP server provides the following tools:
1. list-all-tools
Returns a list of tools from all connected servers.
2. call-tool
Calls a tool on a specific server.
serverName: Name of the MCP server to call the tool fromtoolName: Name of the tool to calltoolArgs: Arguments to pass to the tool
Commit Message Convention
This project follows Conventional Commits for automatic versioning and CHANGELOG generation.
Format: <type>(<scope>): <description>
Examples:
feat: add new hub connection featurefix: resolve issue with server timeoutdocs: update API documentationchore: update dependencies
Types:
feat: New feature (MINOR version bump)fix: Bug fix (PATCH version bump)docs: Documentation only changesstyle: Changes that do not affect the meaning of the coderefactor: Code change that neither fixes a bug nor adds a featureperf: Code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools
Breaking Changes:
Add BREAKING CHANGE: in the commit footer to trigger a MAJOR version bump.
Tech Stack
Node.js
TypeScript
@modelcontextprotocol/sdk (version: ^1.9.0)
zod (version: ^3.22.4)
License
MIT