Overview
The MCP (Model Context Protocol) server lets you serve your widgets to ChatGPT. Once your MCP server is running, ChatGPT can discover and render your widgets. sunpeak includes an MCP server implementation that lets your render your App out-of-the-box.What is MCP?
MCP is the protocol ChatGPT uses to communicate with widget servers. It handles:- Widget registration and discovery
- Runtime API communication
- Tool invocation and state synchronization
Learn more in the Model Context Protocol documentation.
Quick Start
1
Build your app
Build your app first.
2
Start the MCP server
Start the MCP server on port 6766:
3
Run a tunnel
In another terminal, run a tunnel to expose your local server:Copy the forwarding URL (e.g.,
https://abc123.ngrok.io)4
Connect to ChatGPT
Open ChatGPT in developer mode and connect your app:
- Go to
User > Settings > Apps & Connectors > Create - Enter your tunnel URL with the
/mcppath:https://abc123.ngrok.io/mcp - Complete the connection flow
5
Test your widget
Send
show app to ChatGPT to see your widget in action!Dive Deeper
MCP API
Complete sunpeak server configuration reference