Skip to main content
Glama
adamwattis

MCP Proxy Server

by adamwattis

MCP プロキシサーバー

複数のMCPリソースサーバーを単一のインターフェースで集約し、サービスを提供するMCPプロキシサーバー。このサーバーは、以下の機能を持つ中央ハブとして機能します。

  • 複数の MCP リソース サーバーに接続して管理する

  • 統合されたインターフェースを通じてそれらの組み合わせた機能を公開する

  • 適切なバックエンドサーバーへのリクエストのルーティングを処理する

  • 複数のソースからの回答を集約する

特徴

リソース管理

  • 複数の MCP リソース サーバーを検出して接続する

  • 接続されているすべてのサーバーからのリソースを集約する

  • サーバー間で一貫したURIスキームを維持する

  • リソースのルーティングと解決を処理する

ツールの集約

  • 接続されているすべてのサーバーからツールを公開する

  • ツール呼び出しを適切なバックエンドサーバーにルーティングする

  • ツールの状態を維持し、応答を処理する

迅速な対応

  • 接続されているすべてのサーバーからのプロンプトを集約する

  • プロンプトリクエストを適切なバックエンドにルーティングする

  • マルチサーバープロンプト応答を処理する

Related MCP server: Master MCP Server

構成

サーバーには、接続先のMCPサーバーを指定するJSON設定ファイルが必要です。サンプル設定をコピーし、必要に応じて変更してください。

cp config.example.json config.json

設定構造の例:

{
  "servers": [
    {
      "name": "Server 1",
      "transport": {
        "command": "/path/to/server1/build/index.js"
      }
    },
    {
      "name": "Server 2",
      "transport": {
        "command": "server2-command",
        "args": ["--option1", "value1"],
        "env": ["SECRET_API_KEY"]
      }
    },
    {
      "name": "Example Server 3",
      "transport": {
        "type": "sse",
        "url": "http://localhost:8080/sse"
      }
    }
  ]
}

サーバーを実行するときは、構成ファイルを提供する必要があります。

MCP_CONFIG_PATH=./config.json mcp-proxy-server

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

継続実行による開発の場合:

# Stdio
npm run dev
# SSE
npm run dev:sse

インストール

Claude Desktop で使用するには、サーバー設定を追加します。

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-proxy": {
      "command": "/path/to/mcp-proxy-server/build/index.js",
      "env": {
        "MCP_CONFIG_PATH": "/absolute/path/to/your/config.json",
        "KEEP_SERVER_OPEN": "1"
      }
    }
  }
}
  • KEEP_SERVER_OPEN 、クライアントが切断されても SSE の実行を継続します。複数のクライアントが MCP プロキシに接続する場合に便利です。

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A unified hub for centrally managing and dynamically orchestrating multiple MCP servers/APIs into separate endpoints with flexible routing strategies.
    860 npm
    2,461
    Apache 2.0
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Aggregates multiple MCP servers behind a single, secure endpoint with unified tool/resource discovery, OAuth authentication, and resilient request routing. Enables users to manage and interact with multiple MCP backends through one centralized interface with load balancing and circuit breakers.
    2
    -
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A central tool aggregator that routes and orchestrates multiple fabric apps through a single MCP surface. It enables users to access a combined suite of specialized tools from various registered apps via a unified server connection.
    1
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    A centralized gateway and router that integrates multiple MCP servers into a single endpoint with built-in policy enforcement and secret management. It features a Web GUI for managing tool access, audit logs, and multi-environment configurations across various sub-servers.
    -