MCP Protocol Guide
Complete reference for the Model Context Protocol integration with ZaLinkAI
MCP Server URL
https://api.zalink.ai/mcp/jsonrpcTransport Options
HTTP JSON-RPC
Standard request/response over HTTPS. Send a JSON-RPC 2.0 POST request to the server URL. Best for single tool calls.
Content-Type: application/jsonServer-Sent Events (SSE)
Stream real-time updates via SSE. Connect to /mcp/sse for long-running operations or live data feeds. Ideal for session-based interactions.
Content-Type: text/event-streamAvailable Tools
Resources
| store://info | Store name, description, currency, language, and business hours |
| store://products | Full product catalog with categories and variants |
| store://categories | Category hierarchy with product counts |
| store://shipping | Shipping methods, zones, and estimated delivery times |
| store://policies | Return, refund, and privacy policies |
| store://promotions | Active promotions and discount rules |
Permissions
products.readSearch and view product details
orders.readView order status and history
orders.writeCreate and modify orders
cart.readView cart contents
cart.writeCreate, update, and checkout carts
customers.readView customer profiles
promotions.readView promotions and validate coupons
analytics.readView store analytics data
Error Handling
MCP errors follow JSON-RPC 2.0 error format. Common error codes:
| Code | Name | Description | Retry |
|---|---|---|---|
| -32700 | Parse error | Invalid JSON received | No |
| -32600 | Invalid request | JSON-RPC structure is invalid | No |
| -32601 | Method not found | Tool or method does not exist | No |
| -32602 | Invalid params | Required parameters missing or invalid | No |
| -32603 | Internal error | Server-side failure | Yes |
| -32000 | Rate limited | Too many requests (100/min) | Yes |
| -32001 | Unauthorized | Invalid or expired token | No |
| -32002 | Forbidden | Missing required permission scope | No |
Retry Logic
For retryable errors, use exponential backoff: wait 1s, 2s, 4s, 8s, then give up after 4 retries. Always check the "retry" field in error metadata.