メインコンテンツまでスキップ

クイックスタート

MCP Gatewayのセットアップ

  1. 必要なディレクトリを作成し、設定ファイルをダウンロードします:
mkdir -p mcp-gateway/{configs,data}
cd mcp-gateway/
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/apiserver.yaml -o configs/apiserver.yaml
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/mcp-gateway.yaml -o configs/mcp-gateway.yaml
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/.env.example -o .env.allinone

中国本土にいる場合は、Alibaba Cloudレジストリからイメージを取得できます:

registry.ap-southeast-1.aliyuncs.com/mcp-ecosystem/mcp-gateway-allinone:latest

必要に応じてデフォルトのLLMを置き換えることもできます。例えば、Qwenに切り替える場合:

OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/
OPENAI_API_KEY=sk-yourkeyhere
OPENAI_MODEL=qwen-turbo
  1. DockerでMCP Gatewayを実行します:
docker run -d \
--name mcp-gateway \
-p 8080:80 \
-p 5234:5234 \
-p 5235:5235 \
-p 5335:5335 \
-p 5236:5236 \
-e ENV=production \
-v $(pwd)/configs:/app/configs \
-v $(pwd)/data:/app/data \
-v $(pwd)/.env.allinone:/app/.env \
--restart unless-stopped \
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest

アクセスと設定

  1. Web UIにアクセスします:

  2. 新しいMCPサーバーを追加します:

    MCPサーバー追加の例

利用可能なエンドポイント

設定が完了すると、以下のエンドポイントでサービスが利用可能になります:

テスト

サービスは2つの方法でテストできます:

  1. Web UIのMCP Chatページを使用(.env.allinone でAPIキーの設定が必要)
  2. 独自のMCPクライアントを使用(推奨