Skip to main content
This page covers the legacy direct integration. For new integrations, use Clawdot Hub.Sign in at hub.clawdot.net and open 文档中心 (Docs center) to download the full pack for each capability (Delivery / Errand / Retail), or follow the guide for the platform you use. This page is no longer updated. Go to Hub →The recommended integration is the Task API: delivery, errand, and retail at one endpoint. See Task API.
Clawdot Gateway exposes food-delivery capabilities to AI Agents as MCP tools. This guide first connects you to MCP, then walks a single sequence of tool calls to run a complete order from scratch.

1. Connect over MCP

The gateway serves MCP over Streamable HTTP (FastMCP):
  • Endpoint: https://eleme-gateway.hicaspian.com/mcp/v1
  • Transport: Streamable HTTP
  • Connection-layer auth: every MCP request carries the header Authorization: Bearer clw_your_api_key
Create an Agent on the 我的密钥 (My keys) page of the Clawdot Developer Center to obtain your API Key (clw_ prefix). Configure it in your MCP client:
Once connected, your Agent can see all 24 delivery MCP tools. Errand (same-city delivery-run) is a separate endpoint with 19 tools of its own — see Errand MCP.
Two-layer identity: the connection-layer API Key (clw_ prefix) identifies your Agent and is required on every MCP request; the consent grant (cg_ prefix) identifies an authorized food-delivery user and is passed as the business-tool parameter consent_grant_id (not as a header). The binding tools request_user_bind / verify_user_bind are the exception — they are the entry point for obtaining authorization and take no consent_grant_id. See Authentication.

2. Place an order with MCP tools

Examples are given as tool name + JSON parameters. Except for the binding tools, every business tool carries consent_grant_id.
1

Bind user authorization

Placing an order acts on behalf of a real food-delivery user, so have them authorize first (SMS code mode). The binding tools need only the Agent identity (connection-layer API Key) and take no consent_grant_id.
Once you have consent_grant_id, every business tool call below carries it.
H5 mode is also supported: request_user_bind(auth_type="h5") returns h5_url; the user opens it to authorize, then you call verify_user_bind(auth_type="h5", request_id) and poll until you get consent_grant_id. See Request Binding.
2

Choose a delivery address

Pin down “where to deliver” first; obtain address_id, then search shops that can deliver to it.
You can also use an existing address’s address_id directly. This address_id is used both to search shops next and for later quoting / previewing.
3

Search shops

Search shops that can deliver to the chosen address (provide at least one of address_id or lat/lng). Each shop carries a shop_id and a cart_id (the cart_id encapsulates the shop and delivery coordinates; pass it back as-is in later steps). Omit keyword to browse nearby (up to 20 shops).
4

Browse the menu, pick items

Supports keyword / limit / offset for progressive loading. Note the item_id and sku_id of what you want to buy.
5

Quote the cart

All amount fields are in cents (integers); 1500 means ¥15.00.
6

Preview the order

Coupons usable on the current order are the returned available_coupons. To apply a coupon, pick available_coupons[].coupon_id and call preview_order again with coupon_ids=[...] to re-price (the account-level coupon list is available via list_coupons).
7

Place the order

Use the preview_id + confirmation_token returned by the preview (confirmation_token is the idempotency key):
You may pass an optional callback_url: every status change on the order is pushed as a callback, and the payment-outcome one carries event=order_payment.
8

Check the order

After placing the order, you can check its current status and details anytime.
No-password payment signing (account-level, one-time): no-password payment requires the user to sign once; afterwards subsequent no-password orders are charged automatically. It is an account-level, one-time prerequisite — not bound to any single order and not done per order — so it is independent of the order flow above. Use get_sign_action(consent_grant_id, return_url) (takes no order_id) to get the H5 signing link for the user to complete, then check signing progress with get_sign_status. See Initiate No-Password Signing.

The full flow at a glance

select_address (-> address_id) -> search_shops (with address_id, -> shop_id + cart_id) -> get_shop_menu (-> item_id / sku_id) -> quote_cart (-> quote_id) -> preview_order (-> preview_id + confirmation_token) -> create_order (-> order_id) -> get_order_status Every cross-step ID (shop_id / cart_id / address_id / preview_id …) is issued by the gateway and passed back as-is — never construct them yourself or mix them across flows.

Next steps

MCP Tools

Full request / response for the 24 delivery MCP tools

Authentication

API Key + consent grant in detail

Order Flow

End-to-end order and payment sequence

Error Handling

Unified error codes and handling