Was this page helpful?
Runnable examples for CLI, Python, TypeScript, and cURL against the public MCP API.
POST /api/mcp/rpc
Bearer token (OAuth or atai_...)
JSON-RPC 2.0
npm install -g attribution-ai
# Interactive OAuth
attribution auth login
# Run a tool query
attribution data query --tool performance --args '{"start_date":"2026-01-01","end_date":"2026-01-31"}'
# Strict machine output
attribution data query --tool trends --strict-json# Retry on 429 and transient 5xx responses with exponential backoff. # Example: 1s, 2s, 4s, 8s (with jitter) then fail fast with diagnostics.
Use strict contracts for agents
--strict-json or parse MCPstructuredContent when available.Verify X-Shopify-Hmac-Sha256 signatures with your Shopify app secret before processing webhook payloads.
import crypto from 'crypto';
export function verifyShopifyWebhook(body: string, secret: string, signature: string): boolean {
const computed = crypto.createHmac('sha256', secret).update(body, 'utf-8').digest('base64');
const a = Buffer.from(computed, 'utf-8');
const b = Buffer.from(signature, 'utf-8');
if (a.length !== b.length) return false;
return crypto.timingSafeEqual(a, b);
}