Skip to content

Integration guides

Lottery data inside your AI assistant.

Connect Claude, Cursor, VS Code or your own agent to the Lottevo MCP server and let it read results, history, statistics and the ticket checker directly.

The Lottevo API is also a Model Context Protocol server. An MCP client connected to it can look up a game, read its latest results and its history, rank its numbers and check a ticket — without you writing an integration. It answers with the same data as /v1, under the same key, plan and quotas.

Connect

SettingValue
URLhttps://api.lottevo.com/mcp
TransportStreamable HTTP
Authenticationyour API key, as Authorization: Bearer lv_… (or X-Api-Key)

Claude Code

Code example
claude mcp add --transport http lottevo https://api.lottevo.com/mcp \
  --header "Authorization: Bearer lv_a1b2c3d4e5f6_…"

Cursor, VS Code and other clients with a JSON configuration — the key names differ slightly from one client to the next (mcpServers or servers, url, headers):

Code example
{
  "mcpServers": {
    "lottevo": {
      "url": "https://api.lottevo.com/mcp",
      "headers": { "Authorization": "Bearer lv_a1b2c3d4e5f6_…" }
    }
  }
}

Claude Desktop connects to remote servers through OAuth, which this server does not use yet, so it reaches it through mcp-remote:

Code example
{
  "mcpServers": {
    "lottevo": {
      "command": "npx",
      "args": ["mcp-remote", "https://api.lottevo.com/mcp", "--header", "Authorization: Bearer ${LOTTEVO_API_KEY}"],
      "env": { "LOTTEVO_API_KEY": "lv_a1b2c3d4e5f6_…" }
    }
  }
}

The server authenticates with an API key, not OAuth, so a client that can only connect through an OAuth sign-in cannot use it yet.

Give the assistant its own key: it only reads, so the read scopes are enough, and you can revoke it without touching your integration.

Tools

ToolWhat it answersNeeds
search_lotteriesFind a game by name or code, by country, US state or continentcatalog:read
get_lotteryOne game: rules, odds, ticket price, schedule, next jackpot, payouts, latest resultscatalog:read
get_latest_resultsThe latest result of every game, optionally in one countrydraws:read
get_draw_historyOne game's past results, between two datesdraws:read
get_drawOne result with its full prize breakdowndraws:read
get_lottery_statisticsMost drawn, least drawn and longest absent numbers, pairs and tripletsstatistics:read
get_lottery_distributionsHow the draws are spread — sums, odd/even, low/high, neighbours, positions, gaps — beside a fair draw, with a randomness teststatistics:read
check_ticketWhich past draws a ticket matched and what it would have wondraws:read and a plan with the ticket checker
generate_ticketsValid, distinct tickets under filters — odd/even, ranges, sums, never drawn, hot or cold numbers — with how many the filters allowstatistics:read
build_wheelA reduced system on the chosen numbers: tickets guaranteeing a number of matches whenever enough of the drawn numbers are among themstatistics:read

A client only sees the tools its key can call: a key without statistics:read, or on a plan without the ticket checker, is not offered those tools.

Quotas and limits

Each tool call is one request to the endpoint it reads — get_lottery is GET /v1/lotteries/{code} — and counts against your daily quota like any other. It shows up in the request log of your dashboard under that endpoint, with the user agent lottevo-mcp. Connecting and listing the tools cost nothing, but are held to your key's per-minute rate.

Everything the key is bound by holds here too: the games it covers, how far back your plan's history reaches, its expiry and its revocation.

Errors

A refused tool call comes back as a tool error whose text is the API's own JSON — the same code as on Errors, such as lottery_not_entitled, history_not_included or quota_exceeded with its retry_after. A missing, unknown or revoked key is refused when the client connects, with 401.