Skip to main content
Glama

MCP-中心-MCP服务器

连接并管理其他 MCP(模型上下文协议)服务器的中心服务器。

概述

该项目构建了一个 MCP 中心服务器,可以连接到其他 MCP 服务器,列出其工具并执行它们。它对于绕过 Cursor 40 个工具的 MCP 限制特别有用。即使在 Cursor 之外,它也可以隐藏不常用的工具,从而帮助减少 AI 错误。

Related MCP server: MCP-Hub-MCP Server

主要特点

  • 通过配置文件自动连接到其他 MCP 服务器

  • 列出已连接服务器上的可用工具

  • 调用已连接服务器上的工具并返回结果

配置

将其添加到您的mcp.json中:

使用 npx

{
  "mcpServers": {
    "other-tools": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-hub-mcp",
        "--config-path",
        "/Users/username/mcp.json"
      ]
    }
  }
}

系统提示(或光标规则)

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

这确保了 AI 助手在尝试使用可用工具之前始终会检查它们。

安装和运行

要求

  • Node.js 18.0.0 或更高版本

  • npm、yarn 或 pnpm

安装

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

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

建造

npm run build
# or
yarn build
# or
pnpm build

跑步

npm start
# or
yarn start
# or
pnpm start

开发模式

npm run dev
# or
yarn dev
# or
pnpm dev

配置文件

MCP-Hub-MCP 服务器使用 Claude Desktop 格式的配置文件自动连接到其他 MCP 服务器。您可以通过以下方式指定配置文件:

  1. 环境变量:将MCP_CONFIG_PATH环境变量设置为配置文件路径

  2. 命令行参数:使用--config-path选项指定配置文件路径

  3. 默认路径:使用当前目录中的mcp-config.json文件

配置文件格式:

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

例子:

{
  "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"]
    }
  }
}

用法

MCP-Hub-MCP 服务器提供以下工具:

1. list-all-tools

返回所有已连接服务器的工具列表。

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

2. call-tool

调用特定服务器上的工具。

  • serverName :调用该工具的 MCP 服务器的名称

  • toolName :要调用的工具的名称

  • toolArgs :传递给工具的参数

{
  "name": "call-tool",
  "arguments": {
    "serverName": "filesystem",
    "toolName": "readFile",
    "toolArgs": {
      "path": "/Users/username/Desktop/example.txt"
    }
  }
}

提交消息约定

该项目遵循常规提交来实现自动版本控制和 CHANGELOG 生成。

格式: <type>(<scope>): <description>

例子:

  • feat: add new hub connection feature

  • fix: resolve issue with server timeout

  • docs: update API documentation

  • chore: update dependencies

类型:

  • feat :新功能(MINOR 版本升级)

  • fix :错误修复(PATCH 版本升级)

  • docs :仅文档更改

  • style :不影响代码含义的改变

  • refactor :既不修复错误也不添加功能的代码更改

  • perf :提高性能的代码更改

  • test :添加缺失的测试或更正现有的测试

  • chore :对构建过程或辅助工具的更改

重大变化:在提交页脚中添加BREAKING CHANGE:以触发主要版本的提升。

技术栈

  • Node.js

  • TypeScript

  • @modelcontextprotocol/sdk(版本:^1.9.0)

  • zod(版本:^3.22.4)

执照

麻省理工学院

Available Tools

7 tools
call-toolCall ToolA

Call a specific tool from a specific server. TIP: Use find-tools first to discover the tool and get the correct serverName and toolName

Inputs: toolArgs (required), toolName (required), serverName (required).

find-toolsFind ToolsA

Use this tool to find best tools by searching with keywords or regex patterns. If you don't have a specific tool for a task, this is the best way to discover what tools are available.

Inputs: pattern (required), searchIn, caseSensitive.

find-tools-in-serverFind Tools in ServerB

Find tools matching a pattern in a specific MCP server (returns name and description only)

Inputs: pattern (required), serverName (required), searchIn, caseSensitive.

get-toolGet Tool SchemaA

Get complete schema for a specific tool from a specific server, including inputSchema. TIP: Use find-tools first to discover the tool and get the correct serverName and toolName

Inputs: toolName (required), serverName (required).

list-all-toolsList All ToolsA

List ALL available tools from all connected servers. NOTE: For better performance, use find-tools with keywords first. Only use this when you need to see everything or if find-tools didn't find what you need

Inputs: no named parameters.

list-all-tools-in-serverList Tools in ServerA

List ALL tools from a specific MCP server (returns name and description only)

Inputs: serverName (required).

list-serversList ServersB

List all connected MCP servers

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools are clearly distinct by scope (global vs per-server, discovery vs schema vs invocation). Minor overlap exists between list-all-tools and find-tools, but the descriptions explicitly guide usage.

    Naming Consistency5/5

    All tool names follow a consistent kebab-case verb-noun pattern, with clear modifiers like -in-server to indicate scope. The naming is uniform and predictable.

    Tool Count5/5

    Seven tools is well-scoped for a meta-server that manages other MCP servers. Each tool covers a distinct operation without redundancy or bloat.

    Completeness5/5

    The surface covers the full workflow: discover servers, list tools, search tools, inspect schemas, and call tools. No obvious dead ends or missing critical operations for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      202
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      MCP Hub aggregates and proxies multiple Model Context Protocol servers into a unified Streamable HTTP interface. It allows users to combine diverse stdio, SSE, and HTTP-based servers while providing tool namespacing, health monitoring, and secure authentication.
      497 npm
      -