docs/python-sdk/fastmcp-cli-apps_dev.mdx
fastmcp.cli.apps_devDev server for previewing FastMCPApp UIs locally.
Starts the user's MCP server on a configurable port, then starts a lightweight Starlette dev server that:
The host page uses @modelcontextprotocol/ext-apps to connect to the MCP server and render the selected UI tool inside an iframe.
@modelcontextprotocol/sdk/… imports to use concrete esm.sh URLs.v4.mjs (which
only re-exports {z, default}) to v4/classic/index.mjs (which
correctly exports every named Zod v4 function). Import maps apply to the
full module graph in the document, including cross-origin esm.sh modules.run_dev_apps <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/apps_dev.py#L1690" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>run_dev_apps(server_spec: str) -> None
Start the full dev environment for a FastMCPApp server.
Starts the user's MCP server on mcp_port, starts the Prefab dev UI on dev_port (with an /mcp proxy to the user's server), then opens the browser.