AntiStagFlation
AntiStagFlation SHOP
Agent access
My Account

Developer guide — connect any AI assistant

Everything needed to connect an AI assistant to this shop over MCP (Model Context Protocol), on one page: endpoint, API keys, copy-paste client configuration, the ordering flow, store policies, rate limits, and the full tool reference. The machine-readable edition of this guide is llms-full.txt; the short summary is llms.txt.

Quick start — three steps

1Get an API key

Register a free account at account.antistagflation.com and create a key with the shop scope. Keys start with asf_ and are shown once — save yours in the client's credential store.

2Configure the client

Point any MCP-capable client at the endpoint, sending the key as a bearer :

POST https://mcp.antistagflation.com/mcp
Authorization: Bearer <your API key>

Copy-paste configuration blocks are below. Transport: MCP Streamable HTTP, protocol version 2024-11-05. Discovery metadata: server card. This server is also listed in the official MCP registry as com.antistagflation/shop.

3Search, review, confirm

The assistant searches, builds a cart and prepares checkout. The customer reviews the complete summary — items, shipping, tax, total — and only then is the order placed. Payment runs through Shop Pay; card details never pass through the assistant.

No key? Assistants that support OAuth 2.0 can skip step 1: connect to the endpoint with no header, follow the WWW-Authenticate discovery pointer (protected-resource metadata), and the customer just signs in at account.antistagflation.com and clicks Allow. The assistant receives a bearer access token (24 hours) plus a rotating refresh token — same scopes and limits as a key. For a first look, shop_search also works fully anonymously (up to 5 results per call, rate-limited); carts and orders need the connection.

Client configuration (copy-paste)

Generic MCP client (mcpServers format):

{
  "mcpServers": {
    "antistagflation-shop": {
      "url": "https://mcp.antistagflation.com/mcp",
      "headers": { "Authorization": "Bearer " }
    }
  }
}

VS Code / Cursor style (servers format):

{
  "servers": {
    "antistagflation-shop": {
      "type": "http",
      "url": "https://mcp.antistagflation.com/mcp",
      "headers": { "Authorization": "Bearer " }
    }
  }
}

Raw HTTP handshake (curl):

curl -X POST https://mcp.antistagflation.com/mcp \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"your-client","version":"1.0"}}}'

Calling a tool

The endpoint is stateless: the handshake returns no session id, and every request is an independent POST with the Authorization header (the notifications/initialized notification is harmless but not required). Tools are called with the standard MCP tools/call method:

curl -X POST https://mcp.antistagflation.com/mcp \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"shop_search","arguments":{"query":"olive oil"}}}'

A tool result arrives as JSON text inside the MCP result's content[0].text field, with an ok flag, the tool's own fields (items, totals, ids) and often a short human-readable note.

Ordering flow

  1. shop_search / shop_list_items — find products. Products are identified only by this shop's own 12-character product_id; never invent an id.
  2. shop_get_item — full details for one product.
  3. shop_create_cart, then shop_add_to_cart / shop_update_cart_item / shop_remove_from_cart — build the cart; shop_get_cart shows totals at any time.
  4. shop_prepare_checkout — returns the full summary and a one-time checkout_token (10 minutes, tied to the exact total). The customer reviews and confirms this summary.
  5. shop_place_order — with the checkout token and a unique idempotency_key; creates the order as awaiting payment and reserves stock. The customer pays through Shop Pay.
  6. shop_get_order / shop_cancel_order — track or cancel (unpaid, unshipped orders).

Policies, limits and errors

Tool reference — shopping (scope: shop)

shop_search

用自然语言在购物目录里搜已授权在售商品(混合搜索:语义向量+全文检索;只认购物目录,不返采集数据,未授权/未上架商品不会出现)。中英文自然语言都可,返回按相关度排序,含 product_id、price(结算价)、available 与 matched_via(命中来源:semantic/fts),meta.semantic 标明语义是否启用。需要 shop 权限。

shop_list_items

列出已授权正在销售的商品(购物专用,只认本站自有 12 位商品编号 product_id,商家 SKU/UPC 在购物里一律不认)。limit 每页最多 50(默认 20),offset 翻页。返回含 price(结算价)、available(可买数量)、in_stock。需要 shop 权限。

shop_get_item

按自有商品编号 product_id 查一件在售商品;未授权销售、未上架或已下架的商品会被统一屏蔽,回 not_sellable,不泄露价格与库存。需要 shop 权限。

shop_create_cart

新建一个购物购物车。需要 shop 权限。

Parameters: none.

shop_add_to_cart

把在售商品加入购物车(product_id 为自有商品编号)。需要 shop 权限。

shop_update_cart_item

改购物车里某件商品的数量(0 为移除)。需要 shop 权限。

shop_remove_from_cart

从购物车移除一件商品。需要 shop 权限。

shop_get_cart

看购物车内容与小计。需要 shop 权限。

shop_prepare_checkout

结账确认(下单前必经一步):算清逐件价、运费、税费与总计,返回 human_summary 摘要供人看清拍板,并发一次性确认码 checkout_token(10 分钟有效、单次使用、与金额绑定;价格或库存变化后下单会被拦下要求重新确认)。地址只收美国 50 州+DC 街道地址,领地/军事地址/纯 P.O. Box 会被拒并说明原因。substitution_policy 缺货策略:ask=先问本人(默认,不擅自替换)、refund=缺货退款。需要 shop 权限。

shop_place_order

用结账确认码下单(必须带 idempotency_key 防重复:同一 Key 重复提交只回原来那一单)。订单状态停在 created(待付款),库存会预留;顾客通过 Shop Pay 完成付款后订单转已付款、才安排发货,未发货前可取消。成功返回里带 pay_url 付款链接,把它转给顾客,顾客打开链接就能用 Shop Pay 付款。需要 shop 权限。

shop_get_order

按订单号查自己的订单状态,返回里 next_steps 会说明下一步该做什么(待付款/已取消等)。待付款订单的返回里带 pay_url 付款链接,转给顾客即可付款。需要 shop 权限。

shop_cancel_order

取消自己未发货(created 待付款)的订单并释放预留库存;重复取消是安全的,会回已取消、不会重复释放库存。需要 shop 权限。

Tool reference — data lookup (scopes: products, shelf)

Two additional tools expose SKU-level catalog data. They are not part of the shopping flow; most integrations only need the shopping tools above.

lookup_sku

按 SKU 精确查一件商品(名称、价格;Key 带 shelf 权限时含库位)。store 可选 costco(默认)、shoprite、bjs、restaurant-depot、stop-and-shop、aldi、cvs、walgreens、petco、staples。

search_products

按名称关键词搜商品(子串匹配),返回最多 limit 件。

Once connected, your assistant signs AI Visitors automatically. Questions: contact page.

Assistant names and logos are trademarks of their respective owners. Listing them shows compatibility only — not an official partnership.
← Back to the shop · Shipping · Returns · Privacy · Contact · Account · Wallet