Apps SDK Resources
Apps SDK Resources enable you to build widgets that are fully compatible with OpenAI’s Apps SDK, allowing your MCP server to provide rich interactive experiences in ChatGPT and other OpenAI-powered applications.Overview
The Apps SDK is OpenAI’s framework for creating interactive widgets that:- Render in ChatGPT conversations
- Support structured data injection
- Include security policies
- Provide tool invocation feedback
- Load external resources securely
Apps SDK Format
Apps SDK widgets use thetext/html+skybridge MIME type and include specific metadata:
Metadata Configuration
Widget Description
Describes what the widget does for accessibility and discovery:Content Security Policy
Define allowed external resources:Tool Invocation Status
Provide feedback during tool execution:Accessibility Options
Data Injection
Apps SDK widgets receive data throughwindow.openai.toolOutput:
Tool Integration
Apps SDK widgets are registered as both tools and resources:Pizzaz Reference Widgets
The Apps SDK template includes 5 reference widgets from OpenAI’s Pizzaz examples:1. Pizza Map Widget
Interactive map visualization:2. Pizza Carousel Widget
Image carousel component:3. Pizza Albums Widget
Gallery grid layout:4. Pizza List Widget
Structured list display:5. Pizza Video Widget
Video player component:External Resources
Apps SDK widgets can load external libraries and resources:Loading from CDNs
CDN Whitelist
Remember to add CDN domains to your CSP:Creating Custom Apps SDK Widgets
Step 1: Define the Widget Structure
Step 2: Register as UI Resource
Step 3: Create Corresponding Tool
Best Practices
1. Progressive Enhancement
2. Error Handling
3. Responsive Design
4. Accessibility
Security Considerations
1. Content Security Policy
Always define appropriate CSP:2. Input Validation
3. Sanitize User Content
Testing Apps SDK Widgets
Local Testing
- Start your MCP server:
- Test widget rendering:
- View in Inspector:
- Navigate to
http://localhost:3000/inspector - Execute tools to see widget output
ChatGPT Testing
- Configure your MCP server URL in ChatGPT
- Invoke tools that return Apps SDK widgets
- Verify widget rendering in conversation
Troubleshooting
Widget Not Rendering
- Check MIME type is
text/html+skybridge - Verify metadata structure
- Check for JavaScript errors in widget
- Validate CSP configuration
Data Not Available
- Check
window.openai.toolOutputexists - Verify tool returns
structuredContent - Check data structure matches expectations
External Resources Blocked
- Add domains to CSP whitelist
- Use HTTPS for all resources
- Check CORS headers if applicable
Next Steps
- MCP-UI Resources - MCP-UI framework guide
- Templates - Project templates
- UI Widgets - General widget guide
- Examples - Complete implementations