- Notifications
You must be signed in to change notification settings - Fork0
License
heroku-examples/pizzaz-mcp-heroku
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Based on theOpenAI Apps SDK Examples. This version has been adapted for Heroku deployment.
An interactive Model Context Protocol (MCP) server that brings rich pizza-themed widgets to ChatGPT. Demonstrates the full capabilities of the OpenAI Apps SDK with five different interactive widget types.
This MCP server exposes 5 interactive tools that render beautiful widgets in ChatGPT:
- 🗺️Pizza Map - Interactive map showing pizza locations with markers
- 🎠Pizza Carousel - Swipeable carousel of pizza spots
- 📸Pizza Albums - Photo album gallery viewer
- 📋Pizza List - Scrollable list view
- 🎥Pizza Video - Video player widget
Each widget is fully interactive and demonstrates different UI patterns available in the ChatGPT Apps SDK.
This server uses:
- FastMCP - Python MCP server framework
- FastAPI - Web framework for HTTP/SSE transport
- Model Context Protocol - OpenAI's standard for connecting tools to LLMs
- OpenAI Apps SDK - Framework for rendering widgets in ChatGPT
The widgets are served from OpenAI's CDN (persistent.oaistatic.com) and render as interactive iframes in ChatGPT.
Click the button below to deploy this MCP server to Heroku in one click:
After deployment, your MCP server will be available at:
https://your-app-name.herokuapp.com/mcpClone this repository:
git clone https://github.com/dsouza-anush/pizzaz-mcp-heroku.gitcd pizzaz-mcp-herokuCreate a Heroku app:
heroku create your-app-name
Deploy:
git push heroku main
Your MCP endpoint will be:
https://your-app-name.herokuapp.com/mcp
Enable Developer Mode in ChatGPT (requires access)
- See theOpenAI Developer Mode guide
Add your MCP server:
- Go to ChatGPTSettings →Connectors
- ClickCreate and add your Heroku URL with
/mcppath:https://your-app-name.herokuapp.com/mcp
Test the widgets:
- Start a chat in ChatGPT
- Try: "Show me a pizza map" or "Display a pizza carousel"
- The interactive widgets will render inline in your conversation!
Install dependencies:
pip install -r requirements.txt
Run the server:
python main.py
Test locally:
- Server runs at
http://localhost:8000 - MCP endpoint:
http://localhost:8000/mcp
- Server runs at
Expose locally with ngrok (to test with ChatGPT):
ngrok http 8000
- Use the ngrok URL +
/mcpin ChatGPT Connectors
- Use the ngrok URL +
.├── main.py # MCP server implementation├── requirements.txt # Python dependencies├── Procfile # Heroku process configuration├── runtime.txt # Python version specification├── app.json # Heroku deploy button configuration└── README.md # This file- Tool Registration: Server registers 5 pizza widget tools with ChatGPT
- Tool Invocation: When user requests a widget, ChatGPT calls the tool
- Resource Response: Server returns HTML pointing to pre-built widget assets
- Widget Rendering: ChatGPT renders the HTML in an iframe with full interactivity
- User Interaction: Users can click, scroll, and interact with the widgets
Each widget includes:
- OpenAI Metadata: Links tool calls to widget templates
- HTML Template: Iframe-compatible HTML with CSS/JS from CDN
- Structured Content: Data that ChatGPT can understand and reference
- Interactive UI: Full React components with state management
To add OAuth authentication to your MCP server:
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-mcp-auth-proxy -a your-app-name
This buildpack adds authentication to protect your MCP endpoints.
MIT License - Based on OpenAI's Apps SDK Examples
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Languages
- Python99.5%
- Procfile0.5%