Tích hợp AI (MCP)
Ứng dụng khách MCP khác
Call the esimoa MCP server directly by sending JSON-RPC 2.0 over POST.
On this page
Ứng dụng AI khác#
Grok, Perplexity, Le Chat, Manus, Genspark, Cursor, VS Code và Microsoft Copilot Studio đều có thể thêm máy chủ MCP từ xa: tạo trình kết nối tùy chỉnh với URL ở trên và chọn không xác thực. Máy khách chỉ chạy máy chủ cục bộ (stdio) có thể dùng mcp-remote:
url
https://api.esimoa.com/mcpmcp-remote (stdio)json
{
"mcpServers": {
"esimoa": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.esimoa.com/mcp"] }
}
}Protocol#
Gửi JSON-RPC 2.0 qua POST. Mỗi yêu cầu được xử lý độc lập — không cần phiên.
Các phương thức được hỗ trợ là initialize, ping, tools/list, tools/call, resources/list và resources/read cho phiên bản giao thức 2024-11-05 đến 2025-11-25, cùng server/discover cho máy khách 2026-07-28 (không trạng thái, với header MCP-Protocol-Version và Mcp-Method). Không mở luồng SSE nên GET trả về 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" }
}
}'