Skip to main content

MCP Server

The fastest way to connect an agent to Rako is the Rako MCP server. Add it to Claude Desktop, Cursor, or any MCP-compatible client and your agent gets tools to search offers, check what information checkout requires, and generate a hosted checkout link.
mcp-config.json
{
  "mcpServers": {
    "aap": {
      "command": "bunx",
      "args": ["@rakohq/mcp"],
      "env": {
        "AAP_API_KEY": "your-api-key"
      }
    }
  }
}

Flow

search_offers → get_checkout_requirements → get_checkout_link
  1. search_offers returns eligible offers and a session ID.
  2. get_checkout_requirements explains what the user must confirm or provide before checkout for the selected offer.
  3. get_checkout_link records the attribution context and generates a hosted checkout link for the user.
get_checkout_link only returns a URL. It does not process payment, charge the user, transfer money, prove conversion, confirm commission, or settle anything; the user chooses whether to open the link and complete checkout. Conversion requires later platform-side outcome evidence.

Example conversation

User: I need a new SIM deal. Cheap, at least 10GB, no contract.

Agent: [calls search_offers(vertical="sim", min_data_gb=10, contract_months=0)]
       I found 4 options:

       1. SMARTY 30GB — £10/mo (Three network, no credit check)
       2. giffgaff 10GB — £10/mo (O2, 5G included)
       3. giffgaff 25GB — £12/mo (O2, 5G included)
       4. Lebara 5GB — £5/mo (Vodafone)

       SMARTY 30GB looks like the best match because it gives you more data
       at the same price and keeps the rolling monthly terms you asked for.

User: Sounds good, let's go with SMARTY.

Agent: [calls get_checkout_requirements(offer_id)]
       Before I generate the checkout link, please confirm you're happy with
       the rolling monthly SIM terms and that you'll complete checkout yourself.

User: Yes, that's fine.

Agent: [calls get_checkout_link(session_id, offer_id, context="Best match: 30GB for £10 rolling monthly")]
       Here's your checkout link: https://aap.link/r/...
Use an API key intended for agent/server integrations. Do not put private API keys in client-side code or public repositories.

MCP flow tutorial

Walk through the same flow with placeholder keys and fake data.

Runnable examples

Start the local mock server and run SDK examples before using a non-mock API key.