AI 整合(MCP)
其他 MCP 用戶端
透過 POST 直接傳送 JSON-RPC 2.0 呼叫 esimoa MCP 伺服器的方法。
其他 AI 應用#
Grok、Perplexity、Le Chat、Manus、Genspark、Cursor、VS Code 和 Microsoft Copilot Studio 都可以新增遠端 MCP 伺服器:建立自訂連接器,填入上面的 URL,驗證選擇「無」。只支援本機(stdio)伺服器的用戶端可以使用 mcp-remote:
url
https://api.esimoa.com/mcpmcp-remote (stdio)json
{
"mcpServers": {
"esimoa": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.esimoa.com/mcp"] }
}
}協定#
透過 POST 傳送 JSON-RPC 2.0,無需工作階段,每個請求獨立處理。
支援的方法為 initialize、ping、tools/list、tools/call、resources/list 與 resources/read(協定 2024-11-05 至 2025-11-25),並為 2026-07-28 用戶端支援 server/discover(無狀態,使用 MCP-Protocol-Version 與 Mcp-Method 標頭)。不開啟 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" }
}
}'