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" }
}
}'