Option A: Scaffold a New Project
1
Create the project
2
Run it
Option B: Convert an Existing MCP Server
Already have a FastMCP server? Change one import:@app.tool() decorators keep working. You’ve now got access to stages, transitions, state, and provider modes.
Build a Shopping Workflow
Let’s build an e-commerce flow with three stages: browse, cart, and checkout.What Happens at Runtime
Add a Provider Mode
Want to reduce context even further? Switch to code mode:the agent writes Python instead of making individual tool calls:execute_code tool and writes scripts like:
Deploy
Next Steps
Transitions
Deep dive into stages and transitions
State
Learn about persistent session state
Backends
Plain, Search, Plan, and Code execution modes
Platform
Inspector, logs, evaluation, analytics