How do I connect an AI agent to Cartroute with MCP?
Add https://cart-route.com/mcp as a remote MCP server with the header Authorization: Bearer cr_live_.... The server speaks Streamable HTTP, exposes 7 tools, and works with Claude Code, Claude Desktop, Cursor and any client that supports remote servers. Discovery needs no key; the four data tools cost one credit per call.
How do I add it to Claude Code?
claude mcp add --transport http cartroute https://cart-route.com/mcp \ --header "Authorization: Bearer $CARTROUTE_API_KEY"
How do I add it to Cursor or another JSON-configured client?
{
"mcpServers": {
"cartroute": {
"url": "https://cart-route.com/mcp",
"headers": {
"Authorization": "Bearer cr_live_..."
}
}
}
}
What if my client only supports local (stdio) servers?
Bridge it with mcp-remote, which runs locally and forwards to the remote server:
{
"mcpServers": {
"cartroute": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://cart-route.com/mcp",
"--header",
"Authorization:${CARTROUTE_AUTH}"
],
"env": {
"CARTROUTE_AUTH": "Bearer cr_live_..."
}
}
}
}
Which tools does the server expose?
| Tool | What it does |
|---|---|
search_products | Search 12 US retailers (Amazon, Walmart, Best Buy, Costco, Target, Newegg, B&H, Home Depot, Lowe's, Sam's Club, Staples, Micro Center) in one call. Returns matched products, each with every retailer offer, landed price (price + shipping), the best applicable coupon, effective price after that coupon, and a 90-day price verdict. Natural-language price bounds in the query ("under $400") are understood. Costs 1 credit. |
get_product | Full product record: specs, every retailer offer, applicable coupons and price verdict. Accepts a product id (prd_...), slug, GTIN or MPN. Costs 1 credit. |
get_price_history | Daily lowest price and per-retailer series for one product. Use it to judge whether today's price is a real deal. Costs 1 credit. |
find_coupons | Active coupon codes and automatic promotions, with redemption success rate and sample size. Filter by retailer, category or product. Costs 1 credit. |
list_retailers | Retailer ids, membership requirements, free-shipping thresholds, return windows and refresh intervals. Free. |
list_categories | Category names with product counts, for use as the `category` filter. Free. |
get_account | Remaining credits and whether the email-verification bonus is still available. Free; needs an API key. |
Every tool is read-only and annotated readOnlyHint: true, so clients that confirm side-effecting tools can run these without prompting. Full input schemas are returned by tools/list and published in the server card.
Which resources and prompts are there?
cartroute://retailers,cartroute://categories,cartroute://pricing: reference data as JSON resources.- Prompt
find_best_deal(argumentsproduct, optionalbudget_usd): instructs the model to search, compare on effective price, flag membership and eligibility requirements, and recommend one retailer with its reasoning.
What does a raw call look like?
curl https://cart-route.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer $CARTROUTE_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_products","arguments":{"query":"robot vacuum under $600","in_stock":true,"limit":3}}}'
The result's structuredContent is the same envelope the REST search returns, and content[0].text carries it as JSON text for clients that only read text.
What happens when a tool fails?
It returns a normal result with isError: true and a JSON body using the REST error code values (insufficient_credits, validation_error, not_found). A missing key produces an isError result that says how to get one, so the model can explain the next step to its user. See errors.
Which protocol details should client authors know?
- Transport: Streamable HTTP, stateless.
POSTcarries JSON-RPC; responses areapplication/json.GET /mcpreturns 405 because the server opens no server-initiated streams. - Protocol versions: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05. The server echoes the client's requested version when supported, otherwise the newest.
- Notifications (for example
notifications/initialized) receive202 Acceptedwith no body. JSON-RPC batches are answered for older clients. - Authentication: a bearer API key in the
Authorizationheader. An invalid key returns HTTP 401 with aWWW-Authenticateheader. - Rate limits are shared with the REST API: 120 requests per minute per key.