References Imgur for image hosting in the documentation
Connects to and manages multiple Node.js-based MCP servers, allowing access to tools across different servers from a single hub
Enables connecting to other MCP servers through npm packages using npx commands
Supports installation and execution using pnpm package manager
Built with TypeScript to provide type-safe interaction with other MCP servers and their tools
Supports installation and execution using Yarn package manager
Integrates Zod for schema validation of configuration files 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 connects to and manages multiple MCP (Model Context Protocol) servers through a single interface. It helps prevent excessive context usage and pollution from infrequently used MCPs (e.g., Atlassian MCP, Playwright MCP) by allowing you to connect them only when needed. This reduces AI mistakes and improves performance by keeping the active tool set focused and manageable.
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
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_PATH
environment variable to the configuration file path - Command line argument: Use the
--config-path
option to specify the configuration file path - Default path: Use
mcp-config.json
file 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
3. find-tools
Find tools matching a regex pattern across all connected servers (grep-like functionality).
pattern
: Regex pattern to search for in tool names and descriptionssearchIn
: Where to search: "name", "description", or "both" (default: "both")caseSensitive
: Whether the search should be case-sensitive (default: false)
Example patterns:
"file"
- Find all tools containing "file""^read"
- Find all tools starting with "read""(read|write).*file"
- Find tools for reading or writing files"config$"
- Find tools ending with "config"
Example output:
Commit Message Convention
This project follows Conventional Commits for automatic versioning and CHANGELOG generation.
Format: <type>(<scope>): <description>
Examples:
feat: add new hub connection feature
fix: resolve issue with server timeout
docs: update API documentation
chore: 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.
Other Links
License
MIT
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A hub server that connects to and manages other MCP (Model Context Protocol) servers.
Related MCP Servers
- -securityAlicense-qualityMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.Last updated -24MIT License
- -securityAlicense-qualityMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.Last updated -13MIT License
- AsecurityAlicenseAqualityA central hub that aggregates multiple MCP resource servers into a single unified interface, enabling users to access tools and capabilities from multiple backend servers through one connection point.Last updated -7156MIT License
- -securityFlicense-qualityAn MCP server that connects to the Resource Hub, allowing centralized configuration and management of tools and resources across different MCP environments.Last updated -3