MCP UI integration pattern - tools that return pre-formatted UI content

Hi Agno team!
I’m implementing an MCP UI integration pattern where MCP tools return pre-formatted UI content (HTML or JSON) that should be rendered directly by the client UI.

I’m using AgUI as my front-end framework, and I’d like advice on the most suitable approach to handle this pattern. Specifically:

  • How should MCP tools structure their output so AgUI can safely and consistently render it?

  • Is there a recommended schema or wrapper format for returning UI-ready HTML/JSON from MCP tools?

  • Should the client implement a custom renderer, or does AgUI provide an existing pattern for interpreting these responses?

  • Any best practices or examples for securely rendering HTML returned by MCP tools?

Would appreciate any guidance or reference implementations.
Thanks!

Hi @coderfalse_us, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.If it’s urgent, please let us know. We appreciate your patience!