Skip to main content
Glama
jj13jp
by jj13jp

mcp-gateway

複数の子 MCP サーバーを束ねて、単一の MCP サーバーとして公開するゲートウェイ。

起動

llama-server -m model.gguf --ui-mcp-proxy

Related MCP server: MCP Gateway (Parent MCP Server)

仕組み

llama-server(または任意の MCP クライアント)が POST /mcp に接続し、ツール一覧取得・実行を行う。ゲートウェイは子 MCP サーバー群にリクエストをルーティングし、結果を返す。

MCPクライアント(llama-server など)
        ↓ MCP over HTTP (POST /mcp)
   mcp-gateway :8787
     ↙    ↓    ↘
 filesystem  brave  ...子MCPサーバー群

セットアップ

cp .env.example .env   # 必要に応じて PORT を変更
mkdir -p data          # filesystem-mcp の対象ディレクトリ
docker compose up --build

子 MCP サーバーの追加

servers.json(プロジェクトルート。data/ の中ではない)にブロックを追加するだけ:

{
  "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/data"] },
  "brave": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-brave-search"], "env": { "BRAVE_API_KEY": "..." } }
}

MCP エンドポイント

メソッド

パス

説明

POST

/mcp

MCP JSON-RPC(リクエスト・通知)

動作確認

# initialize
curl http://localhost:8787/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}'

# tools/list
curl http://localhost:8787/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# tools/call(ツール名は <サーバー名>__<ツール名> の形式)
curl http://localhost:8787/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"filesystem__read_file","arguments":{"path":"/data/hello.txt"}}}'

開発

pnpm install
pnpm test     # vitest
pnpm lint     # biome
pnpm dev      # tsx で起動
F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jj13jp/mcp-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server