MCP Apps in Headless Mode
Learn how to use MCP Apps with the headless chat components for full control over your UI.
What is Headless Mode?
Headless mode gives you access to the underlying chat and MCP App functionality without the pre-built UI. This is useful when you want to:
- Build a custom chat interface with your own design
- Render MCP Apps in specific locations in your UI
- Control when and how MCP Apps are displayed
- Integrate chat functionality into an existing application
See it in action: Check out the Headless Chat example and Headless MCP example
Working with BotDojoChatProvider
When using the headless chat components with BotDojoChatProvider, MCP App data (HTML, arguments, results) is automatically managed for you:
Caching: The cacheKey is a unique identifier for your agent or flow instance. It's combined with the MCP App resource URI to create a unique cache entry, preventing MCP App HTML from being fetched repeatedly.
Complete Examples
See these full examples to learn how to use MCP Apps in headless mode: