AI 整合(MCP)
其他 MCP 用戶端
透過 POST 直接傳送 JSON-RPC 2.0 呼叫 esimoa MCP 伺服器的方法。
協定#
透過 POST 傳送 JSON-RPC 2.0,無需工作階段,每個請求獨立處理。
支援的方法為 initialize、tools/list、tools/call 與 ping。不開啟 SSE 串流,因此 GET 回傳 405。
initialize#
initializeshell
curl -X POST https://api.esimoa.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "my-client", "version": "1.0.0" }
}
}'tools/call#
tools/call · search_esimsshell
curl -X POST https://api.esimoa.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-API-Key: esk_live_your_key_here" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_esims",
"arguments": { "country": "Japan", "days": 7, "sort": "price", "limit": 3, "lang": "en" }
}
}'