app
Shopping Cart (Apps SDK example)
Keeps cart state in sync across tool calls with widgetSessionId
A Python MCP server showing how _meta["widgetSessionId"] carries widgetState between tool calls so the model and widget share the same shopping cart. UI actions like changing quantities feed back into shared state so the assistant sees the latest cart.
Also available as
How to use
- 1Add it in ChatGPT
Open Shopping Cart (Apps SDK example) in ChatGPT's Plugin directory (sidebar → Plugins, then search), select + to add it and sign in if asked.
- 2Use it in a chat
Type @ in the composer and pick Shopping Cart (Apps SDK example), or start your message with its name. ChatGPT may also suggest it when it fits what you ask.
Things to ask
- “Add two coffees and a croissant to my cart”
- “Increase the croissants to three”
- “What is in my cart right now?”