# Shopping Cart (Apps SDK example) (ChatGPT App)

> Keeps cart state in sync across tool calls with widgetSessionId

- Type: app
- Publisher: OpenAI (official)
- Categories: Development
- Website: https://github.com/openai/openai-apps-sdk-examples/tree/main/shopping_cart_python
- Docs: https://developers.openai.com/apps-sdk
- Source: https://github.com/openai/openai-apps-sdk-examples
- GitHub stars: 2350
- Listed: 2025-12-07

## About

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.

## How to use

1. **Add 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.

2. **Use 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.

## Example prompts

- "Add two coffees and a croissant to my cart"
- "Increase the croissants to three"
- "What is in my cart right now?"

## Also available as

- plugin: [Codex Security](https://chatgptplugins.directory/plugins/codex-security.md)
- MCP server: [OpenAI Docs MCP](https://chatgptplugins.directory/mcp/openai-docs.md)

## Related

- [GitHub](https://chatgptplugins.directory/apps/github.md): Triage PRs, issues and CI across your repositories
- [Figma](https://chatgptplugins.directory/apps/figma.md): Create designs, diagrams and FigJam boards and ship them to code
- [MCP App Basics (Apps SDK example)](https://chatgptplugins.directory/apps/apps-sdk-mcp-app-basics.md): Eleven interactive widgets that each teach one MCP Apps API
- [Cards Against AI (Apps SDK example)](https://chatgptplugins.directory/apps/apps-sdk-cards-against-ai.md): Card game driven by ChatGPT with a real-time synced widget
- [Authenticated Server (Apps SDK example)](https://chatgptplugins.directory/apps/apps-sdk-authenticated.md): Demonstrates tools that require different levels of OAuth
- [Kitchen Sink Lite (Apps SDK example)](https://chatgptplugins.directory/apps/apps-sdk-kitchen-sink-lite.md): Minimal widget + server showing the full window.openai surface

---
Source: https://chatgptplugins.directory/apps/apps-sdk-shopping-cart · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
