3.0.0
MCP Apps let your tools return interactive UIs — rendered in a sandboxed iframe right inside the host client’s conversation. Instead of returning plain text, a tool can show a chart, a sortable table, a form, or anything you can build with HTML.
FastMCP implements the MCP Apps extension and provides two approaches:
Prefab Apps (Recommended)
New in version3.1.0
Prefab UI is a declarative UI framework for Python. You describe layouts, charts, tables, forms, and interactive behaviors using a Python DSL — and the framework compiles them to a JSON protocol that a shared renderer interprets. It started as a component library inside FastMCP and grew into its own framework with comprehensive documentation.
pip install "fastmcp[apps]" and see Prefab Apps for the integration guide.
Custom HTML Apps
The MCP Apps extension is an open protocol, and you can use it directly when you need full control. You write your own HTML/CSS/JavaScript and communicate with the host via the@modelcontextprotocol/ext-apps SDK.
This is the right choice for custom rendering (maps, 3D, video), specific JavaScript frameworks, or capabilities beyond what the component library offers.

