Download Latest Version v3.2.0_ Show Don_t Tool source code.tar.gz (26.4 MB)
Email in envelope

Get an email when there's a new version of FastMCP

Home / v3.2.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-03-30 25.4 kB
v3.2.0_ Show Don_t Tool source code.tar.gz 2026-03-30 26.4 MB
v3.2.0_ Show Don_t Tool source code.zip 2026-03-30 27.2 MB
Totals: 3 Items   53.6 MB 1

FastMCP 3.2 is the Apps release. The 3.0 architecture gave you providers and transforms; 3.1 shipped Code Mode for tool discovery. 3.2 puts a face on it: your tools can now return interactive UIs — charts, dashboards, forms, maps — rendered right inside the conversation.

FastMCPApp

FastMCPApp is a new provider class for building interactive applications inside MCP. It separates the tools the LLM sees (@app.ui()) from the backend tools the UI calls (@app.tool()), manages visibility automatically, and gives tool references stable identifiers that survive namespace transforms and server composition — without requiring host cooperation.

:::python
from fastmcp import FastMCP, FastMCPApp
from prefab_ui.actions.mcp import CallTool
from prefab_ui.components import Column, Form, Input, Button, ForEach, 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])

The UI is built with Prefab, a Python component library that compiles to interactive UIs. You write Python; the user sees charts, tables, forms, and dashboards. FastMCP handles the MCP Apps protocol machinery — renderer resources, CSP configuration, structured content serialization — so you don't have to.

For simpler cases where you just want to visualize data without server interaction, set app=True on any tool and return Prefab components directly:

:::python
@mcp.tool(app=True)
def revenue_chart(year: int) -> PrefabApp:
    with PrefabApp() as app:
        BarChart(data=revenue_data, series=[ChartSeries(data_key="revenue")])
    return app

Built-in Providers

Five ready-made providers you add with a single add_provider() call:

  • FileUpload — drag-and-drop file upload with session-scoped storage
  • Approval — human-in-the-loop confirmation gates
  • Choice — clickable option selection
  • FormInput — generate validated forms from Pydantic models
  • GenerativeUI — the LLM writes Prefab code at runtime and the result streams to the user as it's generated

Dev Server

fastmcp dev apps launches a browser-based preview for your app tools — pick a tool, provide arguments, and see the rendered UI without connecting to an MCP host. Includes an MCP message inspector for debugging the protocol traffic.

Security

This release includes a significant security hardening pass: SSRF/path traversal prevention, JWT algorithm restrictions, OAuth scope enforcement, CSRF fixes, and more. See the changelog for the full list.

Everything Else

forward_resource flag on all OAuth providers for IdPs that don't support RFC 8707. Clerk auth provider. FileResource encoding parameter. SSL verify parameter. client_log_level setting. MCP conformance tests in CI. And contributions from 13 new contributors.

What's Changed

New Features 🎉

Breaking Changes ⚠️

Enhancements ✨

Security 🔒

Fixes 🐞

Docs 📚

Examples & Contrib 💡

Dependencies 📦

New Contributors

Full Changelog: https://github.com/PrefectHQ/fastmcp/compare/v3.1.0...v3.2.0

Source: README.md, updated 2026-03-30