# OpenDota MCP

> OpenDota gives your AI client direct access to one of the largest Dota 2 match databases. Pull player profiles, analyze full match histories, check team rosters, and track all-time records for heroes and players—all without needing an API key for basic use. This is how you pull raw esports data into conversation.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** esports, match-parsing, player-stats, team-analytics, game-data

## Description

**OpenDota MCP Server - Analyze Dota 2 Match Data**

You're getting your AI client direct access to one of the largest Dota 2 match databases out there. Instead of spending time on complicated websites or juggling a dozen APIs, you just ask natural questions and get structured data back. This lets you pull raw esports metrics straight into conversation.

To track individual player performance, use `get_player` to grab current details like their rank tier, MMR estimate, total matches played, and country. For a quick look at recent form, `get_player_recent_matches` pulls the last twenty games. If you need a full career rundown, `get_player_matches` lists every single match they've played, including the hero used, result, KDA, and duration, sorted by what happened most recently.

For deep performance checks, `get_benchmarks` compares any player’s stats—like their win rate or damage output—against how the entire Dota 2 population performs. You can also run `get_player_wl` to see exactly how many times a specific player won versus lost with every hero they've ever played. To identify all-time personal high scores, `get_player_records` shows every record a player holds, listing the match ID and the metric value (like their highest kill count).

When you need to understand what's going down in professional play, start with the team level. Use `get_team` to pull detailed intel on a pro squad, including their current roster, rating, and win/loss track record. To review any single game, `get_match` returns every piece of data from that match: all ten heroes, their item builds, KDA, damage totals, and objectives hit in professional contests. For the general league overview, you can use `list_leagues` for a directory of pro leagues, giving you IDs, tiers, regions, and tournament dates.

For meta-game analysis across the whole population, `get_distributions` shows you how many players are sitting in every single rank bracket, from Herald all the way up to Immortal. You can also check overall player status using `list_recent_matches`, which returns up to 500 recent public matches and includes MMR averages and the winner for fast browsing. If you're looking at team listings generally, `list_teams` lists every professional team, sorted by their rating, along with basic stats like wins/losses and when they last played.

To pull data on a player's hero usage across their entire career, run `get_player_heroes`, which calculates performance metrics specifically for all the heroes that given player has used. To see what records are held universally, use `get_records` to identify all-time record holders for various game metrics like kills or gold per minute across every public match. The database also keeps track of system constants; you can pull predefined data sets using `get_constants`, such as lists that define different game modes or lobby types.

When you're hunting down IDs and names—say, finding a player when you only know their common name—use the `search` tool. If you need to dive into advanced meta-game trends or run complex queries nobody else can handle, `run_explorer_query` executes custom SQL against the whole database for deep analysis. To get basic reference points, `list_heroes` returns the full roster of all 124 Dota 2 heroes and their key attributes, roles, and details.

## Tools

### get_benchmarks
Compares any player’s statistics—like win rate or damage output—against the overall performance of the Dota 2 player base.

### get_constants
Pulls predefined data sets, such as lists defining different game modes or lobby types.

### get_distributions
Shows the count of players in every rank bracket (Herald through Immortal), helping you map the overall player base's MMR health.

### run_explorer_query
Executes a custom SQL query string against the entire database for advanced, deep-dive analysis.

### get_match
Returns a complete breakdown for one match, including all 10 heroes, their items, KDA, and damage metrics in professional games.

### get_player
Retrieves a player's current profile picture, rank tier, MMR estimate, total matches, and win rate.

### get_player_heroes
Calculates performance metrics specifically for all the heroes a given player has used throughout their career.

### get_player_matches
Lists every match played by a user, including hero, result, KDA, and duration. Sorted by most recent first.

### get_player_recent_matches
Provides the last 20 matches for quick viewing of a player's current form and primary heroes.

### get_player_records
Shows all-time personal records for a player, listing the match ID and specific metric value (e.g., highest kills).

### get_player_wl
Displays how many times a player has won versus lost with each hero they've played.

### get_records
Identifies the all-time record holders for various game metrics (like kills, gold per min) across all public matches.

### get_team
Pulls detailed info on a professional team, including their current roster, rating, and win/loss track record.

### list_heroes
Returns the full list of all 124 Dota 2 heroes and key details like roles and attributes.

### list_leagues
Provides a directory of professional leagues, giving their IDs, tiers, regions, and tournament dates.

### list_recent_matches
Returns up to 500 recent public matches, including MMR averages and the winner for quick browsing.

### list_teams
Lists all professional teams sorted by their rating, showing basic stats like wins/losses and last match time.

### search
Finds IDs and names for players, teams, leagues, or heroes when you only know their common name.

## Prompt Examples

**Prompt:** 
```
Search for the player 'Arteezy'.
```

**Response:** 
```
Found Arteezy (account ID: 87276347). Real name: Artour Babaev. Country: Canada. Current rank: Immortal. Profile picture and full stats available. Use get_player for detailed profile or get_player_recent_matches for recent games.
```

**Prompt:** 
```
Show me all Dota 2 heroes.
```

**Response:** 
```
Found 124 heroes. Notable heroes include: Anti-Mage (agi, carry), Invoker (int, mid), Pudge (str, offlane), Phantom Assassin (agi, carry), Crystal Maiden (int, support), Axe (str, offlane) and 118 more. Each with primary attribute, attack type and role classifications.
```

**Prompt:** 
```
What are the all-time records for most kills in a single match?
```

**Response:** 
```
All-time kill record: 75 kills in a single match by a player on Morphling. Other top records include 70 kills (Phantom Assassin), 65 kills (Medusa) and 60 kills (Juggernaut). These are from public matches tracked by OpenDota.
```

## Capabilities

### Player Profile Retrieval
Get specific player data like rank tier, MMR estimate, total matches played, and country using `get_player`.

### Match History Analysis
Pull a player's full match history or recent games to review performance trends and hero usage patterns via `get_player_matches` or `get_player_recent_matches`.

### Deep Match Detailing
Get every piece of data from a single professional match, including item builds, damage metrics, objectives, and chat logs using `get_match`.

### System Data Querying
Run advanced custom SQL queries against the entire dataset using `run_explorer_query`, allowing for deep meta-game trend identification.

### Hero Pool Comparison
Identify a player's strongest and weakest heroes by pulling their win/loss records for each hero via `get_player_wl`.

## Use Cases

### Scouting a Rival Team's Weak Spot
A coach needs to know if their rival team relies too heavily on one hero. They run `search` for the team, then use `get_player_recent_matches` for each player. Finally, they use `get_player_wl` to see which heroes have a disproportionately high loss rate for those players.

### Tracking All-Time Records
A researcher wants to find the highest recorded Gold Per Minute (GPM) in Dota 2 history. They skip manual searches and run `get_records` with 'gold_per_min' as the field, instantly retrieving the top record holders.

### Profiling a New Player
A scout needs to assess an unknown player. They use `search` first to get the Steam ID, then run `get_player` for their basic stats and `get_player_matches` to see if they have enough data points to be worth looking at.

### Understanding League Depth
An analyst wants to know if a pro league is dominated by one MMR bracket. They use `list_leagues` to find the tournament, and then run `get_distributions` to visualize how the entire player population falls across all ranks.

## Benefits

- See a player's full performance history. Instead of relying on anecdotal evidence, use `get_player_matches` to pull thousands of records for pattern analysis.
- Benchmark opponents accurately. `get_benchmarks` compares a single user against the entire Dota 2 population, giving you hard data points—not just 'good' or 'bad'.
- Identify meta trends instantly. By listing heroes with `list_heroes`, then querying rank distributions with `get_distributions`, you see where the player base is congregating.
- Deep dive into specific games. When a coach needs to review one crucial moment, `get_match` pulls every single detail—damage, items, objectives—so you don't have to read minutes of text.
- Find hidden data relationships using SQL. If the specialized tools fall short, use `run_explorer_query` with custom SQL to join metrics across tables.

## How It Works

The bottom line is: you chain specialized data calls together in a conversation, building a full picture from raw match IDs and stats.

1. First, use `search` to find the specific IDs for players, teams, or leagues you are interested in.
2. Next, run a targeted tool—like `get_player_recent_matches`—to pull the raw data set (e.g., match ID, KDA).
3. Finally, feed that result into another tool (or ask your agent to synthesize it) using `get_match` or `run_explorer_query` for detailed analysis.

## Frequently Asked Questions

**Do I need an API key?**
No! OpenDota provides free access with 60,000 requests/hour without any API key. An optional free API key is available from opendota.com for higher rate limits, but it's not required.

**How do I find a player's account ID?**
Use the search tool with the player's name (e.g. 'Arteezy', 'SumaiL', 'Topson'). The results include their Steam account ID which you can then use with player-specific tools. You can also find account IDs on sites like dotabuff.com or stratz.com.

**What data is available for matches?**
Match data includes: all 10 players' heroes, items, KDA, GPM, XPM, hero damage, tower damage, healing, lane positions, draft picks, chat logs, team objectives, ability builds and more. Professional matches have even more detailed data including observer ward placements and rune pickups.

**How many heroes are in Dota 2?**
Dota 2 currently has 124 heroes, each with unique abilities and roles. Use list_heroes to see the complete list with their IDs, names, primary attributes (Strength, Agility, Intelligence, Universal) and roles (carry, support, offlane, mid).

**What are the rate limits when using get_player or other stat tools?**
The server provides 60k requests per hour for basic access. If you're building a large-scale application, check the Vinkius documentation for advanced usage options or dedicated batch endpoints.

**How do I use run_explorer_query to analyze player performance?**
You provide a full SQL query string that defines your desired calculation. The service runs this against the database and returns results as a structured array of data rows for immediate analysis.

**What is get_constants for, and how do I use it?**
This tool retrieves specific constant sets that define game context (like 'game_mode' or 'patch'). You specify the resource name to understand parameters not available in standard player stats.

**Before running get_benchmarks, how do I find a hero ID?**
You must call list_heroes first. This tool returns all 124 heroes and their corresponding IDs, which you then use to accurately benchmark any player's performance.