AI assistants (MCP)

Ask Claude, Cursor or any MCP client about CS2 matches, teams and players, answered from the esportsodds.gg API through the official MCP server.

The official Python client includes an MCP (Model Context Protocol) server. Add it to an AI assistant and the assistant can answer questions from the API: a team's recent form, the vetoes of a match, a head-to-head record, a player's career figures.

It runs on your own machine, uses your API key, and only reads data. Every tool call is one request against your allowance.

Set it up

You need an API key (ESPORTSODDS_API_KEY). With uv installed there is nothing else to install: uvx fetches the package the first time the assistant starts the server.

To try it first, with no account, use the public sample key eo_sample_public. It reads a fixed sample of past matches, so questions about those matches work, and team, player and ranking questions answer sandbox_scope (not counted). For evaluation; our Terms apply.

Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json) use the same shape:

json
{
  "mcpServers": {
    "esportsodds": {
      "command": "uvx",
      "args": ["esportsodds", "mcp"],
      "env": { "ESPORTSODDS_API_KEY": "eo_sample_public" }
    }
  }
}

When you have a key of your own, swap in your own key:

json
{
  "mcpServers": {
    "esportsodds": {
      "command": "uvx",
      "args": ["esportsodds", "mcp"],
      "env": { "ESPORTSODDS_API_KEY": "eo_live_..." }
    }
  }
}

Claude Code reads the key from your shell:

bash
export ESPORTSODDS_API_KEY="eo_sample_public"  # or your own key
claude mcp add --transport stdio --env ESPORTSODDS_API_KEY="$ESPORTSODDS_API_KEY" esportsodds -- uvx esportsodds mcp

Prefer pip? pip install esportsodds, then use esportsodds-mcp as the command with no arguments. If the assistant cannot find it, give the full path that which esportsodds-mcp prints.

What it can do

24 read-only tools, one per API read. Each takes the same arguments as the endpoint it calls.

AreaTools
Matchesmatches_list, matches_get, matches_maps, matches_stats, matches_vetoes, matches_rounds, matches_lineups
Market lineodds_list
Teamsteams_list, teams_get, teams_h2h, teams_form, teams_maps, teams_results, teams_players
Tournamentstournaments_list, tournaments_get, tournaments_teams
Playersplayers_list, players_get, players_career, players_matches
Rankings and mapsrankings_list, maps_list

Some questions to try:

  • "How has Vitality done in their last ten matches?"
  • "What did each team pick and ban in the last match between FaZe and Spirit?"
  • "Which maps has MOUZ won most often this year?"

Good to know

  • List tools return 20 rows unless the assistant asks for more with limit, which keeps answers short. A list that has more rows returns next_cursor; the assistant passes it back as cursor for the next page.
  • Ids: matches use their id (a UUID). Teams, players and tournaments also take a slug, and the assistant can find one by name: their list tools take q (Python client 0.4.0 and later; uvx fetches the newest).
  • A whole match in one call: matches_get takes include (for example maps,stats,vetoes), so the assistant gets a match and its parts in one request instead of one per part. Python client 0.4.2 and later tells the assistant so.
  • Errors come back to the assistant as text (the error code, its message and the request id), so it can correct itself. invalid_api_key means the key in the env block is wrong; with no key at all, the server says so before calling the API.
  • A sandbox key works too, inside its sample only: the sample's matches (with their maps, stats, vetoes, rounds, lineups and market line) and its tournaments. Team, player and ranking questions answer sandbox_scope, which is not counted; they need a paid key.
  • It speaks every MCP revision from 2024-11-05 to 2026-07-28, so older and newer clients both work.
  • The server is open source, in the Python client.