Quickstart Tools Connect docs
ESPRESSO CASH MCP

One URL for your agent.
It books and buys, paid in USDC.

Your AI agent books flights and hotels and buys from Shopify stores for its user, paid in USDC on Solana. The money waits in an on-chain escrow and is released only when the supplier confirms; anything else is refunded automatically.

MCP serverhttps://mcp.espressocash.com/mcp
โœˆ๏ธ FlightsLive airline inventory worldwide. The PNR comes back as soon as the ticket is issued.
๐Ÿจ HotelsSearch, compare rooms and rates, book, cancel within the hotel's terms.
๐Ÿ›๏ธ ShopAny Shopify store, delivered to the buyer's address. Up to 10 items per store checkout.
๐Ÿ†“ Free up to the purchaseSearching, quoting and reading cost nothing. Only the purchase is paid, into its own escrow.
๐Ÿ” No account, no keyThe buyer's Solana wallet is the identity: it funds the escrow and receives any refund.
๐ŸŽฎ Game play logsYour game's players' events, read every day by your coding agent to improve the game.
Building a site or a game that charges its users? That's Espresso Connect: docs.espressocash.com. This MCP is for agents buying on a user's behalf.

Connect

Streamable HTTP with plain JSON answers (no SSE stream, no session). Any MCP client that takes a URL works.

ClientHow
Claude (claude.ai, desktop)Settings โ†’ Connectors โ†’ Add custom connector โ†’ paste the URL.
Claude Codeclaude mcp add --transport http espresso https://mcp.espressocash.com/mcp
Codex CLIIn ~/.codex/config.toml: [mcp_servers.espresso] with url = "https://mcp.espressocash.com/mcp"
Cursor, Windsurf, others{"mcpServers": {"espresso": {"url": "https://mcp.espressocash.com/mcp"}}} in their mcp.json
ChatGPTTurn on developer mode in the connector settings, then add a connector with the URL.

Check it answers:

curl -s https://mcp.espressocash.com/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

What your agent needs

Quickstart: book a flight

Every purchase follows the same five steps. Pass every id (offer_id, intent_id) back exactly as you received it.

  1. search
  2. quote
  3. intent
  4. pay
  5. order
// 1. search (free). If status is "enriching", poll brij_get_flight_search_updates
brij_search_flights {"origin_iata": "LIS", "destination_iata": "JFK",
                     "depart_date": "2027-01-15", "adults": 1}
// โ†’ offers[]: offer_id, total_amount (all-in, USD), slices, airline

// 2. lock one offer: creates its escrow
brij_create_flight_intent {"offer_id": "<offer_id>", "funding_wallet": "<buyer wallet>"}
// โ†’ intent_id, expected_escrow_amount, customer_support_code (keep it!)

// 3. pay: the first call answers with the x402 payment requirements
brij_book_flight {"intent_id": "<intent_id>", "passengers": [{
  "given_name": "Ana", "family_name": "Silva", "born_on": "1990-04-02",
  "title": "ms", "gender": "f", "email": "[email protected]",
  "phone_number": "+351912345678"}]}
// โ†’ error with structuredContent = payment requirements. Sign them with the
//   funding wallet, then call again with _meta["x402/payment"] (or x402_payment).

// 4. follow it (free)
brij_get_intent {"intent_id": "<intent_id>"}
// โ†’ status โ€ฆ booked; booking_reference = the PNR. Relay it to the traveller.

Flows

Flights

brij_search_flights โ†’ (brij_get_flight_search_updates while status is enriching) โ†’ (brij_get_flight_offer_details) โ†’ brij_create_flight_intent โ†’ brij_book_flight โ†’ brij_get_intent

Hotels

(brij_find_hotel_places) โ†’ brij_search_hotels โ†’ brij_get_hotel_rates โ†’ brij_quote_hotel โ†’ brij_create_hotel_intent โ†’ brij_book_hotel โ†’ brij_get_hotel_order

brij_search_hotels {"location": "Lisbon", "check_in_date": "2027-01-15",
                    "check_out_date": "2027-01-18", "adults": 2}
brij_get_hotel_rates {"hotel_id": "<hotel_id>"}
brij_quote_hotel {"rate_id": "<rate_id>"}          // โ†’ offer_id "hotel:โ€ฆ"
brij_create_hotel_intent {"offer_id": "hotel:โ€ฆ", "funding_wallet": "<buyer wallet>"}
brij_book_hotel {"intent_id": "โ€ฆ", "guests": [{"given_name": "Ana", "family_name": "Silva"}],
                 "email": "[email protected]", "phone_number": "+351912345678"}

Shop (Shopify stores)

brij_shop_search โ†’ (brij_shop_product, brij_shop_store, brij_shop_stores) โ†’ brij_shop_quote โ†’ brij_create_shop_intent โ†’ brij_shop_buy โ†’ brij_get_shop_order

brij_shop_search {"query": "trail running shoes", "ships_to": "PT"}
brij_shop_quote {"variant_id": "<variant id>", "quantity": 1, "ship_to": {
  "first_name": "Ana", "last_name": "Silva", "street_address": "Rua Augusta 10",
  "city": "Lisboa", "postal_code": "1100-053", "country": "PT",
  "phone": "+351912345678"}}                   // โ†’ offer_id "shopcom:โ€ฆ", total
brij_create_shop_intent {"offer_id": "shopcom:โ€ฆ", "funding_wallet": "<buyer wallet>"}
brij_shop_buy {"intent_id": "โ€ฆ", "email": "[email protected]"}

Game play logs: a daily self-improvement loop

For a web game's creator and the coding agent that maintains it (Claude Code or Codex in a GitHub Action, every day). Players' browsers send small events; the agent reads them with brij_game_logs, finds where players fail, quit or get stuck, and changes the game.

  1. Register the game's site on Espresso Connect. Its host must be a verified site: connect.espressocash.com/developers, domain proven, status ACTIVE (lookup docs). The site's payout wallet is the creator. Check it:
    curl 'https://api.espressocash.com/connect/v2/sites/lookup?origin=https://tennis.example.com'
    # โ†’ 200 with "verified": true and your payout_wallet
    On GitHub Pages, register https://<you>.github.io: the proof file goes in your <you>.github.io repo (add an empty .nojekyll), and that one site covers all your games.
  2. Add the script to the game's page, before the game's own code:
    <script src="https://mcp.espressocash.com/games/brij-log.js"></script>
  3. Log what matters, at the moments that tell a story:
    brij.log("match_start", { level: 2, difficulty: "hard" });
    brij.log("point", { won: false, shot: "lob", rally: 7, ms: 840 });
    brij.log("quit", { screen: "settings", after_s: 95 });
    Nothing is sent until the game calls brij.log() once, so a game that asks its players first ("Share my playtest") sends nothing before they agree. After that the script also records session_start (screen size, language), hidden and session_end on its own, and sends a batch every 10 s and when the tab closes.
  4. Buy the logs key, once. From the payout wallet: brij_create_game_logs_key {"game": "tennis.example.com"} (x402, 0.01 USDC; the payment proves the wallet, any other payer is refused before being charged). It answers {"api_key": "brij_logs_โ€ฆ", "host": "tennis.example.com", "espresso_site_id": "site_โ€ฆ"}. The key is shown once, reads every game on that host, and buying a new one replaces it. Store it as a repository secret, GAME_LOGS_KEY.
  5. Read them every day. brij_game_logs {"game": "tennis.example.com", "game_logs_key": "โ€ฆ"} gives a summary by event type, then the events page by page (cursor, since, exclude_players to drop your own test runs: your player id is brij.player in the browser console). Or over HTTP:
    curl -s https://mcp.espressocash.com/games/logs/read \
      -H "X-Game-Logs-Key: $GAME_LOGS_KEY" -H 'Content-Type: application/json' \
      -d '{"game": "tennis.example.com", "since": "2026-11-26"}'

A GitHub Action for it, run each morning:

on:
  schedule: [{ cron: "0 6 * * *" }]
jobs:
  improve:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: |
          curl -s https://mcp.espressocash.com/games/logs/read \
            -H "X-Game-Logs-Key: ${{ secrets.GAME_LOGS_KEY }}" \
            -H 'Content-Type: application/json' \
            -d '{"game": "tennis.example.com"}' > playtest.json
      # then your coding agent: read playtest.json, find where players
      # struggle, change the game, open a pull request.
Rule
Game idThe page's host + folder: tennis.example.com, you.github.io/tennis. Override with data-game on the script tag.
Event type1โ€“40 characters of A-Z a-z 0-9 _ . : -
Event dataAn object, at most 2 KB, strings โ‰ค 200 characters, keys โ‰ค 40, 3 levels deep
PlayersAn anonymous id per browser. Log no names, emails or anything personal.
Limits200 events per batch, 20,000 events and 5 MB per game per day, kept 90 days. Only the game's own page can send (its Origin is checked).

For Espresso Connect: logs keys in the developer console

How the Espresso Connect developer console can offer "Game logs" on a site, with no new API on either side:

  1. On an ACTIVE, verified site, the console shows a Game logs button. It calls POST https://mcp.espressocash.com/games/keys {"game": "<the site's origin>"} and gets an x402 402 challenge: 0.01 USDC to BRIJ's fee wallet.
  2. The console has the site owner approve that payment from the site's payout wallet (passkey, in the app), then sends the same request again with the signed payment in the PAYMENT-SIGNATURE header.
  3. We check that the payer is the payout wallet your public lookup returns for that origin (verified: true, ACTIVE) before settling. Any other payer: 403 not_game_owner, nothing charged.
  4. The answer is {"api_key": "brij_logs_โ€ฆ", "host", "espresso_site_id", "espresso_site_name", "wallet"}. The console shows the key once ("copy it into your GitHub secrets as GAME_LOGS_KEY") or keeps it for the site's own tools. We store only its hash.
  5. Rotating = calling it again: the new key replaces the old one. If the site's payout wallet changes, old keys stop reading (not_game_owner) until the new wallet buys one.

Errors the console should show: game_not_registered (404, the origin is not a verified site), not_game_owner (403, wrong wallet), invalid_game (400).

Payment and refunds

  1. Intent. brij_create_*_intent takes the buyer's funding_wallet (and optionally a refund_wallet) and returns the escrow address, the amount and a customer_support_code. Keep the code: it is never shown again, and orders and refunds need it.
  2. Pay. The book/buy tool answers with x402 payment requirements for that escrow (as the tool error's structuredContent). Sign them with the funding wallet and call the same tool again with the payment in _meta["x402/payment"], or in the x402_payment argument (the base64 PAYMENT-SIGNATURE value) if your client cannot set _meta. The settlement comes back in _meta["x402/payment-response"].
  3. Outcome. Confirmed โ†’ captured. Anything else โ†’ refunded in full to the refund wallet, which was fixed when the intent was created and cannot be changed.

Quote the buyer the escrow amount: it is all-in (fare or stay or items + the service fee). Flights: 10 USDC + 2 %, at most 15 % of the fare. Hotels: 5 USDC + 2 %, at most 30. Shop: 2 USDC + 3 %.

A promo code the user gives you goes in promo_code on the intent. It is checked before anything is paid and waives the service fee when it applies.

Manual refund requests (brij_request_flight_refund) need the support code and the lead passenger's family name. They are reviewed by a person; the money can only go back to the refund wallet.

Limits and errors

Instead of a fee per call, calls are rate-limited per client and globally, by cost:

Kind of callPer client
Reads, polls, order status120 at once, 1 back a second
Flight search and offer details10, 1 back every 3 min
Hotel search, rates, quote40, 1 back every 10 s
Shop search, product, quote20, 1 back every 30 s
Creating an intent2, 1 back every 30 min
Refund requests3 an hour

The same call repeated within 15 minutes is free, so a pending search or quote can be polled. Paying (book/buy) is never rate-limited.

A refused call is a tool error with isError and a code: mcp_rate_limited or mcp_capacity_exhausted (429, with retry_after_seconds), intent_already_exists (409, with the existing intent_id), offer_not_found, promo_invalidโ€ฆ Nothing is ever charged for a refused call.

All tools

Generated from the server's own tools/list, so this list is always the live one. Each tool's full input schema is in tools/list.

Flights

brij_search_flightsSearch flights
brij_get_flight_search_updatesPoll a flight search
brij_get_flight_offer_detailsFlight offer details
brij_create_flight_intentLock a flight offer
brij_book_flightPay and book a flight (pays)
brij_get_intentRead an intent
brij_get_flight_orderFlight order status
brij_request_flight_refundRequest a flight refund
brij_list_airlinesSupported airlines

Hotels

brij_find_hotel_placesFind a city for a hotel search
brij_search_hotelsSearch hotels
brij_get_hotel_ratesHotel rooms and rates
brij_quote_hotelQuote a hotel rate
brij_create_hotel_intentLock a hotel quote
brij_book_hotelPay and book a hotel (pays)
brij_get_hotel_orderHotel booking status
brij_cancel_hotelCancel a hotel booking

Shop (Shopify stores)

brij_shop_searchSearch Shop's catalog
brij_shop_productRead one Shop product
brij_shop_storeA Shopify store's page
brij_shop_storesStores that deliver to a country
brij_shop_quoteQuote a Shop purchase
brij_create_shop_intentLock a Shop quote
brij_shop_buyPay for a Shop order (pays)
brij_get_shop_orderShop order status

Game logs

brij_create_game_logs_keyBuy your game's logs key (pays)
brij_game_logsRead your game's play logs

FAQ

When is the buyer charged?

The USDC leaves the wallet into the purchase's own escrow when the agent pays. It leaves the escrow only when the supplier confirms (ticket issued, hotel booked, store order placed). Every other outcome refunds it in full, to the refund wallet.

What if the price changes after the quote?

The purchase is never made above what was paid into the escrow: it fails cleanly and refunds. Search or quote again.

Can it book for several people?

Flights: search with adults and send that many passengers, lead first. Hotels: rooms, adults and child ages on the search, at least one guest per room on the booking.

The agent lost the customer_support_code.

It cannot be read again. Keep it when the intent is created: order status and refund requests need it.

Is it the same as the HTTP API?

Yes: every tool is one route of the API, with the same checks. Over HTTP each call costs a small x402 fee; over MCP only the purchase is paid.

Partners and affiliates

Partner key. An app relaying many users' agents from one server can get a key, sent as Authorization: Bearer brij_mcp_โ€ฆ. It gives each of its agents 5ร— the rate limits (keyed by an X-BRIJ-Agent header) and its own global pool. Ask us for one.

Affiliates. Pass referrer (your code) on a flight intent and earn 20 % of the service fee on bookings that are flown without refund. Get a code with POST https://mcp.espressocash.com/affiliates {"wallet": โ€ฆ} (free).