FastMCP 3.2 is all about Apps.
“Chat with your <whatever>” is one of the more useful ideas AI has produced, and MCP turned it into a protocol: your database, your API, your codebase, your calendar, each one a conversation partner. Most of the time, that’s powerful. But chat isn’t the right interface for everything. Sometimes you don’t want to read about your data; you want to see it.
Until now, MCP tools have only returned structured data that the agent has to interpret before showing anything to the user. Data comes back as markdown. Charts come back as… paragraphs describing charts.
MCP Apps is the first official extension to the MCP protocol, and it gives tools a second channel. A tool can now return an interactive application — a chart, a dashboard, a form, a file uploader, a map — that renders directly inside the conversation. The model gets a compact structured result it can reason over; the user gets a real UI without ever leaving the conversation; and the data that drives the UI never touches the context window.
FastMCP 3.2 makes it easy to ship fully interactive tools or complete applications directly from your MCP server, all in Python. Here’s an embedded dashboard that demonstrates what’s now possible in all MCP clients that support Apps:
See the Python code and edit this example live in the Prefab Playground →
MCP applications
As the maintainers of the framework that powers a huge fraction of the MCP ecosystem, we get a privileged view of where MCP is actually being deployed. And what we see, overwhelmingly, is that companies are using MCP to replace internal tooling: the admin panels, workflow controls, and dashboards that run a business day-to-day. While the headline use case for MCP Apps is letting a company ship its consumer-facing app inside a chat window, we think the far more common use case will be much quieter: interactive data and visualizations that finally replace the static, out-of-date dashboards most companies depend on today.
The teams we see building these servers are overwhelmingly Python teams, not frontend engineers, and the last thing they want is to stand up a React codebase to put a chart next to a tool call. What they actually need is a library of purpose-built components (tables, charts, forms, dashboards) that they can compose in Python and drop into their MCP server… and that’s exactly what we’ve built. The components come from Prefab, a composable Python UI framework we announced at the MCP Dev Summit. FastMCP natively wires them to the MCP Apps protocol. See the Prefab post for the full story on the framework itself.
Interactive tools
In FastMCP, the easiest way to build an MCP App is by making your tools return interactive UIs. There are only two steps:
- set
app=Truein your tool decorator - return any Prefab component or app
FastMCP takes care of compiling, serializing, and rendering it:
from fastmcp import FastMCPfrom prefab_ui.components import DataTable
mcp = FastMCP("Server")
@mcp.tool(app=True)def team_directory(department: str) -> DataTable: employees = db.query(department) return DataTable( data=[ {"name": e.name, "role": e.role, "email": e.email} for e in employees ], searchable=True, )When the model calls this tool, the user gets a sortable, searchable table — and the fifty rows of employee records never touch the context window. The model gets a compact acknowledgment instead. Here’s what that looks like in a client like Goose:
FastMCP Apps
Returning an interactive UI from a tool is great when the tool just produces a view. But real applications need the UI to call back into the server to save a contact, trigger an action, or refresh a row, and routing every click through the model is expensive and slow. The new FastMCPApp class lets you use your FastMCP server as a full backend for your MCP Application.
FastMCPApp separates what the model sees from what the UI calls. Decorate a function that returns Prefab components with @app.ui() to define your app’s entrypoint, then use @app.tool() to define the backend tools the UI calls directly. The helper tools stay private and never bloat the model’s tool list.
from fastmcp import FastMCP, FastMCPAppfrom prefab_ui.actions.mcp import CallToolfrom prefab_ui.app import PrefabAppfrom prefab_ui.components import Button, Column, ForEach, Form, Input, Text
app = FastMCPApp("Contacts")
@app.tool()def save_contact(name: str, email: str) -> list[dict]: db.append({"name": name, "email": email}) return list(db)
@app.ui()def contact_manager() -> PrefabApp: with PrefabApp(state={"contacts": list(db)}) as view: with Column(gap=4): ForEach("contacts", lambda c: Text(c.name)) with Form(on_submit=CallTool("save_contact")): Input(name="name", required=True) Input(name="email", required=True) Button("Save") return view
mcp = FastMCP("Server", providers=[app])FastMCPApp is implemented as a FastMCP Provider, which means it composes with everything else in the 3.0 architecture: transforms, namespaces, auth, the full pipeline.
Generative UI
Sometimes you don’t know what the user will ask for, and you don’t want to ship a separate tool for every chart they might want. Prefab’s Python DSL is token-efficient and streaming-compatible, which means an LLM can compose an interface on the fly and stream it to the renderer as it generates.
The GenerativeUI provider wires up the whole flow in one line:
from fastmcp.apps.generative_ui import GenerativeUI
mcp.add_provider(GenerativeUI())It ships batteries-included, with a generative endpoint and the component-discovery tools an agent needs to figure out what it can build. Here’s Claude streaming a dashboard as an MCP App in real time:
For the full story on why Prefab is a good substrate for generative UI, see the Prefab announcement.
Built-in providers
3.2 ships five providers for common interaction patterns, each a single add_provider() call:
- FileUpload — drag-and-drop file upload with session-scoped storage
- FormInput — validated forms generated from Pydantic models
- Approval — human-in-the-loop confirmation gates
- Choice — clickable option selection
- GenerativeUI — agent-generated interfaces streamed to the user
Dev server
fastmcp dev apps launches a browser-based preview for your app tools, so you can pick a tool, provide arguments, and see the rendered UI without ever connecting to an MCP host. It also includes an MCP message inspector for debugging the protocol traffic underneath.
Security
FastMCP 3.2 also includes a security hardening pass: SSRF and path traversal protections, JWT algorithm restrictions in JWKS flows, OAuth scope enforcement, CSRF fixes in consent flows, and defensive improvements across proxying, auth, and install paths. FastMCP is crossing the line from framework to production infrastructure, and the security layer needs to keep up.
Get started
To upgrade to FastMCP 3.2 with full apps support, run:
pip install "fastmcp[apps]" -U- Read the FastMCP Docs
- Follow the Apps Quickstart
- Star us on GitHub
- Check out Prefab
Happy context engineering!
Subscribe
Comments
Join the conversation by posting on social media.
No comments yet...
🦗🦗🦗