https://mcp.opencommerce.sh/mcp with your Commerce SDK credentials as Authorization: Bearer <YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>. See Connect your agent.
Behavior: Changes state. Not safe to repeat when confirm is true.
What it does
Buys what a shopper asks for at real stores, and plans and books trips. One call searches, picks, builds a cart, or confirms, depending on what the shopper said. Agentcard keeps one open purchase for eachshopper_id and thread_id.
Show the cart and its total before you confirm. Set confirm to true only on the shopper’s explicit yes to that cart, when they ask to check out, say they added the card for a waiting cart, say they approved, or ask for the approval link again. Interest is not a yes.
Inputs
Returns
A missing field means Agentcard returned nothing, not zero. Money is
{ amount_cents, currency } in integer cents. A failed call returns { error: { code, message, retryable } } instead.
Example call
Notes
- Each call answers within about 45 seconds. When
turn_continuesistrue, tell the shopper you’re on it and readget_conversationorget_updateslater. Never send the samebuyagain. - A second
buyfor the same shopper and chat while one runs returns the errorbusy, and nothing is sent. Readget_conversationbefore calling again. - Hand each link to the shopper verbatim, unless your app shows links itself. In that case, when
link_sentistrue, tell the shopper a link is waiting. - See Connect your agent for the whole purchase flow.