Back to Documentation

MCP Protocol Guide

Complete reference for the Model Context Protocol integration with ZaLinkAI

MCP Server URL

https://api.zalink.ai/mcp/jsonrpc

Transport 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/json

Server-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-stream

Available Tools

Resources

store://infoStore name, description, currency, language, and business hours
store://productsFull product catalog with categories and variants
store://categoriesCategory hierarchy with product counts
store://shippingShipping methods, zones, and estimated delivery times
store://policiesReturn, refund, and privacy policies
store://promotionsActive promotions and discount rules

Permissions

products.read

Search and view product details

orders.read

View order status and history

orders.write

Create and modify orders

cart.read

View cart contents

cart.write

Create, update, and checkout carts

customers.read

View customer profiles

promotions.read

View promotions and validate coupons

analytics.read

View store analytics data

Error Handling

MCP errors follow JSON-RPC 2.0 error format. Common error codes:

CodeNameDescriptionRetry
-32700Parse errorInvalid JSON receivedNo
-32600Invalid requestJSON-RPC structure is invalidNo
-32601Method not foundTool or method does not existNo
-32602Invalid paramsRequired parameters missing or invalidNo
-32603Internal errorServer-side failureYes
-32000Rate limitedToo many requests (100/min)Yes
-32001UnauthorizedInvalid or expired tokenNo
-32002ForbiddenMissing required permission scopeNo

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.

Start Building with MCP