MCP Server テストページ (JSON-RPC over HTTP)

開発・デバッグ用。MCP JSON-RPC APIエンドポイント(/api/mcp)の動作確認を行います。

⚠️ 本番環境では非公開にしてください

JSON-RPC 2.0 プロトコル

エンドポイント: POST /api/mcp
プロトコル: JSON-RPC 2.0
対応メソッド: initialize, tools/list, tools/call, resources/list, resources/templates/list, resources/read

テスト実行

初期化 (initialize)

MCP Serverの初期化リクエストをテスト

PING (ping)

MCP Serverの応答性を確認

ツール一覧 (tools/list)

利用可能なツール一覧を取得

全店舗取得 (tools/call: getAllStores)

全店舗情報を取得するツールを呼び出し

待ち時間取得 (tools/call: getWaitTimes)

全店舗の待ち時間を取得するツールを呼び出し

店舗ID検索 (tools/call: getStoreById)

店舗ID=30001の店舗情報を取得

店舗検索 (tools/call: searchStores)

「浜松」で店舗を検索

エリア別店舗取得 (tools/call: getStoresByArea)

西部エリアの店舗を取得

リソース一覧 (resources/list)

利用可能なリソース一覧を取得

リソーステンプレート一覧 (resources/templates/list)

利用可能なリソーステンプレート一覧を取得

店舗リソース読み込み (resources/read: store/30001)

店舗ID=30001のリソースを読み込み

待ち時間リソース読み込み (resources/read: wait-times/30001)

店舗ID=30001の待ち時間リソースを読み込み

利用可能なツール

getAllStores全店舗情報を取得
getWaitTimes全店舗の待ち時間を取得
getStoreById店舗IDで店舗情報を取得
searchStores店舗を検索
getStoresByAreaエリアで店舗を絞り込み

curlでのテスト例

初期化リクエスト:

curl -X POST https://sawayaka.manus.space/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {
        "name": "test-client",
        "version": "1.0.0"
      }
    }
  }'

店舗検索:

curl -X POST https://sawayaka.manus.space/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "searchStores",
      "arguments": {
        "query": "浜松"
      }
    }
  }'