OpenDota MCP Server for Real-Time Dota 2 Statistics
Access real-time Dota 2 stats, match and player data via an MCP server using OpenDota API for seamless LLM and AI assistant integration.
npx -y @asusevski/opendota-mcp-serverOverview
This MCP (Model Context Protocol) server exposes OpenDota API data over a simple, MCP-compatible interface so language models and AI assistants can access live Dota 2 statistics. The server translates common OpenDota REST endpoints into MCP tools that an LLM can call directly, removing the need for custom API wiring inside the model pipeline.
It is useful when you want to augment conversational agents, dashboards, or automation scripts with up-to-date match details, player profiles, hero metrics, and pro match information. The design targets developers who want a plug-and-play MCP service that integrates OpenDota data into LLM tools, desktops like Claude Desktop, or other MCP-aware clients.
Features
- Player profile and summary retrieval (by account ID)
- Recent matches and full match details
- Hero statistics, rankings and most-played heroes per player
- Search and lookup for players, teams, and professional players/matches
- Utility endpoints: player win/loss, peers, totals, wordclouds, public matches
- Lightweight MCP server process that can run locally or in WSL
- Example client and simple integration guidance for MCP-aware frontends
Installation / Configuration
Prerequisites: Python 3.9+, pip, and optionally uv (union-virtualenv) for environment management.
- Clone the repository:
- (Optional) Automated setup script:
# works in bash/zsh
- Manual environment setup (example using virtualenv/uv):
# install dependencies according to pyproject.toml
# for development extras
- (Recommended) Create and export an OpenDota API key:
# sign up for a key at https://www.opendota.com/api-keys
- Run the server:
# or
Installing via Smithery (one-line):
Example Claude Desktop configuration using WSL:
Run the example client:
Available Tools
The server exposes a set of MCP tools that map to OpenDota functionality. Common tools include:
| Tool name | Purpose |
|---|---|
| get_player_by_id | Return profile and summary for a given account ID |
| get_player_recent_matches | List recent matches for a player |
| get_match_data | Fetch detailed data for a match (events, players, heroes) |
| get_player_win_loss | Player win/loss total and breakdown |
| get_player_heroes | Most-played heroes for a player |
| get_hero_stats | Aggregate statistics and rankings for heroes |
| search_player | Search players by display name |
| get_pro_players | Retrieve professional player listing |
| get_pro_matches | List recent professional matches |
| get_player_peers | Players that commonly play with a given account |
| get_heroes | Static list of Dota 2 heroes |
| get_player_totals | Totals (kills, assists, etc.) for a player |
| get_player_rankings | Hero rankings for a player |
| get_player_wordcloud | Most common words used by a player in chat |
| get_team_info | Team metadata and members |
| get_public_matches | Recent public matchmaking games |
| get_match_heroes | Heroes played in a specific match |
Each tool returns JSON compatible with MCP messaging so an LLM can parse and act on results.
Use Cases
- LLM game helper: Attach the MCP server to a chat assistant so users can ask “How did player 12345678 perform in their last 5 matches?” and the assistant calls get_player_recent_matches and summarizes results.
- Scout and analytics pipelines: Periodically pull pro match lists and player hero stats to feed a scouting dashboard or automated scouting reports.
- Live match enrichment: When a match ID appears in chat or logs, fetch get_match_data to present full lineup, hero items, and event timeline to viewers or analysts.
- Automated alerts: Trigger notifications for high-impact pro matches or notable player performances (e.g., rare win streaks) using get_pro_matches and get_player_totals.
- Research and model conditioning: Use hero statistics and player rankings to condition LLM prompts for tactical suggestions or commentary generation.
Security & License
- The server relies on your OpenDota API key; keep it secret and store it in environment variables or a secrets manager.
- License: MIT. The code and integrations are open-source; review dependencies and assess risk before deploying publicly.
Tips for Developers
- Start with the example client to see request/response patterns.
- If integrating with a desktop MCP client (Claude Desktop, etc.), validate command/args paths for virtual environments and WSL.
- Combine multiple tool calls in a single MCP session to build higher-level features (e.g., get_player_by_id -> get_player_heroes -> get_player_rankings) while keeping responses small and focused.