Back to MCP Catalog

OpenDota MCP Server

GamingPython
Access real-time Dota 2 statistics, match data, and player information
Available Tools

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

The OpenDota MCP server provides a comprehensive interface for AI assistants to retrieve and analyze Dota 2 game data. It connects to the OpenDota API, allowing access to detailed player profiles, match statistics, professional player information, hero data, and more. With this MCP, AI assistants can help users track their Dota 2 performance, analyze match history, compare statistics with other players, and stay updated on professional matches. The server supports a wide range of queries from basic player lookups to detailed match analysis and hero statistics.

Installation

Prerequisites

  • Python 3.8 or higher
  • Git

Setup Instructions

  1. Clone the repository:
git clone https://github.com/asusevski/opendota-mcp-server.git
cd opendota-mcp-server
  1. Set up the environment:

    • Option 1: Use the automated setup script:
      ./scripts/setup_env.sh
      
    • Option 2: Manual installation with uv:
      uv add pyproject.toml
      # For development dependencies
      uv pip install -e ".[dev]"
      
  2. (Optional but recommended) Create an OpenDota API key:

    • Visit https://www.opendota.com/api-keys to generate your API key
    • Set the API key as an environment variable:
      export OPENDOTA_API_KEY=your_api_key_here
      
    • Alternatively, create a .env file based on the .env.example template

Running the Server

Direct Method

Run the server directly with Python:

python -m src.opendota_server.server

With Claude Desktop

To use with Claude Desktop, create a claude_desktop_config.json file in the appropriate location for your system:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add the following configuration (adjust paths as needed):

{
  "mcpServers": {
    "opendota": {
      "command": "python",
      "args": [
        "-m",
        "src.opendota_server.server"
      ],
      "cwd": "/path/to/opendota-mcp-server"
    }
  }
}

For WSL users, use this configuration:

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

Testing the Server

You can test the server using the included example client:

python -m src.client

Usage Examples

Once the server is running, you can use it with compatible AI assistants to:

  1. Look up player statistics:

    • "Show me the stats for player with ID 123456789"
    • "What are the recent matches for this player?"
  2. Analyze match data:

    • "Get details for match 6789012345"
    • "Which heroes were played in this match?"
  3. Research hero information:

    • "Show me the current hero statistics"
    • "What are the most successful heroes in the current meta?"
  4. Find professional players and matches:

    • "List recent professional Dota 2 matches"
    • "Find information about team OG"
  5. Search for players:

    • "Search for players named 'Miracle'"
    • "Who are the top-ranked players for Invoker?"

Related MCPs

VRChat API
GamingTypeScript

Access and interact with the VRChat API

Godot
GamingTypeScript

Interface with the Godot game engine to launch, run, and debug projects

Unity Editor Integration
GamingC#

Connect Unity Editor with AI models for game development assistance

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.