WM

warpdev/mcp-hub-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

61 stars 10 forks 质量 76 趋势 13MIT

warpdev/mcp-hub-mcp 是从 https://github.com/warpdev/mcp-hub-mcp. 导入的 MCP 服务器候选

概览

warpdev/mcp-hub-mcp 是从 https://github.com/warpdev/mcp-hub-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

一个连接并管理其他MCP(模型上下文协议)服务器的枢纽服务器。

概述

该项目构建了一个MCP枢纽服务器,通过单一接口连接和管理多个MCP(模型上下文协议)服务器。 它通过允许你仅在需要时连接它们,有助于防止过度上下文使用和不常用的MCP(如Atlassian MCP、Playwright MCP)造成的污染。 这减少了AI的错误,并通过保持活跃工具集的聚焦和可管理性来提升性能。

主要特色

  • 通过配置文件自动连接其他MCP服务器
  • 列出连接服务器上的可用工具
  • 连接服务器上的调用工具并返回结果

配置

将此加到你的mcp.json中:

使用 NPX

安装与运行

要求

  • Node.js 18.0.0 或更高版本
  • NPM,纱线,或PNPM

安装

建造

跑

开发模式

配置文件

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

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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

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

Installation and Running

Requirements

  • Node.js 18.0.0 or higher
  • npm, yarn, or pnpm

Installation

# Clone repository
git clone 
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": {
在 GitHub 查看完整 README

安装

npx -y mcp-hub-mcp --config-path /Users/username/mcp.json
新手?先看 mcpskill.org 教程 →

配置

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