MCP-Hub-MCP Server

MCP-Hub-MCP Server

A hub server that connects to and manages other MCP servers, allowing users to bypass Cursor's 40-tool limit and reduce AI mistakes by hiding infrequently used tools.

Category
Visit Server

README

<p align="center"> <img src="https://imgur.com/DgWxkmv.png" width="200" height="200"> </p>

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.

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

{
  "mcpServers": {
    "mcp-hub": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-hub-mcp",
        "--config-path",
        "/path/to/your/mcp-hub-config.json"
      ]
    }
  }
}

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:

{
  "mcpServers": {
    "mcp-hub": {
      "command": "node",
      "args": [
        "/path/to/your/mcp-hub-mcp/dist/index.js",
        "--config-path",
        "/path/to/your/mcp-hub-config.json"
      ]
    }
  }
}

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)

Before processing a user's request, you must use the "list_all_tools" command to identify which tools are available.

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

# Clone repository
git clone <repository-url>
cd mcp-hub-mcp

# Install dependencies
npm install
# or
yarn install
# or
pnpm install

Build

npm run build
# or
yarn build
# or
pnpm build

Run

npm start
# or
yarn start
# or
pnpm start

Development Mode

npm run dev
# or
yarn dev
# or
pnpm dev

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:

  1. Environment variable: Set the MCP_CONFIG_PATH environment variable to the configuration file path
  2. Command line argument: Use the --config-path option to specify the configuration file path
  3. Default path: Use mcp-config.json file in the current directory

Configuration file format:

{
  "mcpServers": {
    "serverName1": {
      "command": "command",
      "args": ["arg1", "arg2", ...],
      "env": { "ENV_VAR1": "value1", ... }
    },
    "serverName2": {
      "command": "anotherCommand",
      "args": ["arg1", "arg2", ...]
    }
  }
}

Example:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/Users/username/Downloads"
      ]
    },
    "other-server": {
      "command": "node",
      "args": ["path/to/other-mcp-server.js"]
    }
  }
}

Usage

The MCP-Hub-MCP server provides the following tools:

1. list-all-tools

Returns a list of tools from all connected servers.

{
  "name": "list-all-tools",
  "arguments": {}
}

2. call-tool

Calls a tool on a specific server.

  • serverName: Name of the MCP server to call the tool from
  • toolName: Name of the tool to call
  • toolArgs: Arguments to pass to the tool
{
  "name": "call-tool",
  "arguments": {
    "serverName": "filesystem",
    "toolName": "readFile",
    "toolArgs": {
      "path": "/Users/username/Desktop/example.txt"
    }
  }
}

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 changes
  • style: Changes that do not affect the meaning of the code
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • chore: 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured