Skip to main content
Glama
OpenDota MCP Server

OpenDota MCP Server

by asusevski

OpenDota MCP Server

A Model Context Protocol (MCP) server implementation for accessing OpenDota API data. This server enables LLMs and AI assistants to retrieve real-time Dota 2 statistics, match data, player information, and more through a standard interface.

Features

  • Access player profiles, statistics, and match history

  • Retrieve detailed match information

  • Look up professional players and teams

  • Get hero statistics and rankings

  • Search for players by name

  • And more!

Related MCP server: MonkeyType MCP Server

Installation

Installing via Smithery

To install OpenDota API Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @asusevski/opendota-mcp-server --client claude

Manual Installation

# Clone the repository
git clone https://github.com/asusevski/opendota-mcp-server.git
cd opendota-mcp-server

# Option 1: Automated setup (works with bash, zsh, and other shells)
./scripts/setup_env.sh

# Option 2: Manual installation with uv
uv add pyproject.toml

# For development dependencies
uv pip install -e ".[dev]"

Usage

Setting up your environment

  1. (Optional but recommended) Create an OpenDota API key at https://www.opendota.com/api-keys

  2. Set your API key as an environment variable:

export OPENDOTA_API_KEY=your_api_key_here

Running the server directly

python -m src.opendota_server.server

Running the server with Claude Desktop

Follow this: https://modelcontextprotocol.io/quickstart/user

If you use WSL, assuming you have cloned the repo and set up the python environment, this is how I wrote the claude_desktop_config.json:

{
  "mcpServers": {
    "opendota": {
      "command": "wsl.exe",
      "args": [
        "--",
        "bash",
        "-c",
        "cd ~/opendota-mcp-server && source .venv/bin/activate && python src/opendota_server/server.py"
      ]
    }
  }
}

Using the example client

python -m src.client

Specific tools included:

  • get_player_by_id - Retrieve player information by account ID

  • get_player_recent_matches - Get recent matches for a player

  • get_match_data - Get detailed data for a specific match

  • get_player_win_loss - Get win/loss statistics for a player

  • get_player_heroes - Get a player's most played heroes

  • get_hero_stats - Get statistics for heroes

  • search_player - Search for players by name

  • get_pro_players - Get list of professional players

  • get_pro_matches - Get recent professional matches

  • get_player_peers - Get players who have played with a specified player

  • get_heroes - Get list of all Dota 2 heroes

  • get_player_totals - Get player's overall stats totals

  • get_player_rankings - Get player hero rankings

  • get_player_wordcloud - Get most common words used by player in chat

  • get_team_info - Get information about a team

  • get_public_matches - Get recent public matches

  • get_match_heroes - Get heroes played in a specific match

Security

License

MIT

Available Tools

17 tools
get_heroesB

Get list of all Dota 2 heroes.

Returns:
    List of all heroes with basic information

Inputs: no named parameters. Returns: result

get_hero_statsB

Get statistics for heroes.

Args:
    hero_id: Optional hero ID to get stats for a specific hero

Returns:
    Hero statistics including win rates by skill bracket

Inputs: hero_id. Returns: result

get_match_dataB

Get detailed data for a specific match.

Args:
    match_id: ID of the match to retrieve

Returns:
    Detailed match information including players, scores, and stats

Inputs: match_id (required). Returns: result

get_match_heroesB

Get heroes played in a specific match.

Args:
    match_id: ID of the match to retrieve

Returns:
    List of heroes played by each player in the match

Inputs: match_id (required). Returns: result

get_player_by_idB

Get a player's information by their account ID.

Args:
    account_id: The player's Steam32 account ID

Returns:
    Player information including rank, matches, and statistics

Inputs: account_id (required). Returns: result

get_player_heroesB

Get a player's most played heroes.

Args:
    account_id: Steam32 account ID of the player
    limit: Number of heroes to retrieve (default: 5)

Returns:
    List of most played heroes with stats

Inputs: account_id (required), limit. Returns: result

get_player_peersA

Get players who have played with the specified player.

Args:
    account_id: Steam32 account ID of the player
    limit: Number of peers to retrieve (default: 5)

Returns:
    List of players frequently played with

Inputs: account_id (required), limit. Returns: result

get_player_rankingsC

Get player hero rankings.

Args:
    account_id: Steam32 account ID of the player

Returns:
    Player's hero rankings

Inputs: account_id (required). Returns: result

get_player_recent_matchesA

Get recent matches played by a player.

Args:
    account_id: Steam32 account ID of the player
    limit: Number of matches to retrieve (default: 5)

Returns:
    List of recent matches with details

Inputs: account_id (required), limit. Returns: result

get_player_totalsB

Get player's overall stats totals.

Args:
    account_id: Steam32 account ID of the player

Returns:
    Summary of player's total stats

Inputs: account_id (required). Returns: result

get_player_win_lossB

Get win/loss statistics for a player.

Args:
    account_id: Steam32 account ID of the player

Returns:
    Win/loss record

Inputs: account_id (required). Returns: result

get_player_wordcloudB

Get most common words used by player in chat.

Args:
    account_id: Steam32 account ID of the player

Returns:
    List of player's most frequently used words

Inputs: account_id (required). Returns: result

get_pro_matchesB

Get recent professional matches.

Args:
    limit: Number of matches to retrieve (default: 5)

Returns:
    List of recent professional matches

Inputs: limit. Returns: result

get_pro_playersB

Get list of professional players.

Args:
    limit: Number of players to retrieve (default: 10)

Returns:
    List of professional players

Inputs: limit. Returns: result

get_public_matchesB

Get recent public matches.

Args:
    limit: Number of matches to retrieve (default: 5)

Returns:
    List of recent public matches

Inputs: limit. Returns: result

get_team_infoC

Get information about a team.

Args:
    team_id: Team ID

Returns:
    Team information

Inputs: team_id (required). Returns: result

search_playerB

Search for players by name.

Args:
    query: Name to search for

Returns:
    List of matching players

Inputs: query (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting different resources (heroes, matches, players, teams, pro scene). However, some player-focused tools like get_player_heroes and get_player_rankings could potentially overlap in retrieving hero-related player data, though descriptions clarify their specific focuses.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with get_ prefix and snake_case throughout. The naming is highly predictable and readable, making it easy to understand each tool's function at a glance.

    Tool Count4/5

    17 tools is slightly high but reasonable for a comprehensive Dota 2 statistics server. The count supports detailed player analysis, match data, hero stats, and professional scene coverage without being overwhelming for the domain scope.

    Completeness5/5

    The toolset provides excellent coverage of the OpenDota API domain with comprehensive player analysis (stats, matches, heroes, peers, rankings), match data (public, pro, detailed), hero statistics, team info, and search functionality. No obvious gaps exist for typical agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A community-developed Model Context Protocol server that integrates with the Riot Games API to provide League of Legends data, enabling AI assistants to retrieve player information, ranked stats, champion mastery, and match summaries through natural language queries.
      5
      27
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables LLMs to interact with all MonkeyType API endpoints, providing access to typing test data, user profiles, leaderboards, and statistics through natural language.
      20
      30 npm
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that enables LLMs to retrieve NBA data including player stats, team information, game logs, and league standings through the nba_api library.
      10
      1
      -