MCP Agent Flow Tutorial
This tutorial shows the canonical Rako MCP flow for an agent that helps a user compare eligible offers, collect checkout requirements, and generate a hosted checkout link.This tutorial uses placeholder credentials and fake IDs only. It does not process payment, collect payment details, confirm an order, prove a conversion, or mutate production/live data.
What you will learn
By the end, you should understand how an agent can:- Search for offers that match a user’s request.
- Ask what information is needed before checkout.
- Collect only the required fields from the user in plain language.
- Request a checkout link for the selected offer.
- Hand the user off to hosted checkout outside the agent.
Placeholder MCP config
Use placeholder credentials when running against the local mock server from the runnable examples.mcp-config.json
sess_mock_001, offer_mock_sim_001, and https://checkout.example.invalid/mock.
1. Search offers
The agent starts with the user’s shopping intent.session_id and selected offer_id, and avoid saying the user has bought anything.
2. Get checkout requirements
Before asking for user details, the agent asks what fields are required.3. Generate a checkout link
Once the user has provided the required fields, the agent requests a hosted checkout link.Mock transcript
Run it locally
Runnable examples
Start the mock AAP server and run the SDK examples with fake data.
Mock conversion artifact
Learn how a later fake conversion payload references the checkout context.
examples/mcp-agent-flow.