A Model Context Protocol (MCP) server that provides seamless access to the OpenDota API for querying Dota 2 player statistics, match data, and hero information through AI assistants like Claude. - 20+ Tools across 5 categories for comprehensive Dota 2 data access - Natural Language Support - Fuzzy matching for hero names, lane positions, and stat fields - Dual Transport - Supports both stdio (loca
Add this skill
npx mdskills install hkaanengin/opendota-mcp-serverComprehensive MCP server with 20+ well-documented tools for Dota 2 data access
A Model Context Protocol (MCP) server that provides seamless access to the OpenDota API for querying Dota 2 player statistics, match data, and hero information through AI assistants like Claude.
Query player statistics, win/loss records, hero preferences, and performance metrics:
get_player_info - Get player profile, win rate, and favorite heroesget_player_win_loss - Win/loss stats with advanced filteringget_heroes_played - Detailed statistics for all heroes playedget_player_peers - Find frequent teammatesget_player_totals - Aggregated player statisticsget_player_histograms - Distribution of matches across statistical fieldsAccess hero information, matchups, and item builds:
get_heroes - List all heroes with attributesget_hero_matchups - Matchup data and win ratesget_hero_item_popularity - Popular item builds by game phaseget_hero_stats - Aggregated hero statistics and pick ratesRetrieve detailed match information and parsed data:
get_match_details - Comprehensive match informationget_parsed_match_details - Parsed match data with advanced analyticsget_player_recent_matches - Recent matches for a playerConvert names to IDs with fuzzy matching:
get_hero_id_by_name - Hero name → ID (handles typos)get_hero_by_id - Get hero details by IDconvert_lane_name_to_id - Lane/position → lane_role IDresolve_time_name - Time period names → OpenDota filter parametersSearch and utility functions:
search_players - Search for players by nameget_constants - Get OpenDota constants and reference dataget_player_counts - Get player count by rank tier# Clone the repository
git clone https://github.com/hkaanengin/opendota-mcp-server.git
cd opendota-mcp-server
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install with dev dependencies
pip install -e ".[dev]"
# Or install runtime only
pip install -e .
Best for Claude Desktop integration on your local machine.
Config file location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonRecommended: Using the installed command
After running pip install -e ., add to your claude_desktop_config.json:
{
"mcpServers": {
"opendota": {
"command": "/path/to/your/opendota-mcp-server/.venv/bin/opendota-mcp"
}
}
}
Note: Replace
/path/to/your/opendota-mcp-serverwith the actual path where you cloned this repository. On macOS/Linux, runpwdin the project directory to find this path. On Windows, runcdto see the full path.
Alternative: Using Python module directly
{
"mcpServers": {
"opendota": {
"command": "/path/to/your/opendota-mcp-server/.venv/bin/python",
"args": ["-m", "opendota_mcp.server"]
}
}
}
Alternative: Using the shell script
{
"mcpServers": {
"opendota": {
"command": "/path/to/your/opendota-mcp-server/start_mcp.sh"
}
}
}
Using Docker:
{
"mcpServers": {
"opendota": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "MCP_TRANSPORT=stdio",
"hkaanengin/opendota-mcp-server:latest"
]
}
}
}
After updating the config:
# Run the server directly
opendota-mcp
# Or using Python module
python -m opendota_mcp.server
# Or using the shell script
./start_mcp.sh
Access a deployed server from anywhere.
Use the publicly deployed server at:
https://opendota-mcp-server-jylza6gata-ew.a.run.app/mcp
Add to your claude_desktop_config.json:
{
"mcpServers": {
"opendota": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-remote-http",
"https://opendota-mcp-server-jylza6gata-ew.a.run.app/mcp"
]
}
}
}
https://opendota-mcp-server-jylza6gata-ew.a.run.app/mcpDeploy to Google Cloud Run or any container platform:
# Build Docker image
docker build -t opendota-mcp-server .
# Run in HTTP mode
docker run -p 8080:8080 \
-e MCP_TRANSPORT=http \
-e PORT=8080 \
opendota-mcp-server
Create a .env file in the project root (or copy from .env.example):
# OpenDota API Key (optional)
# Get your API key from: https://www.opendota.com/api-keys
OPENDOTA_API_KEY=
# Logging level (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFO
# Transport mode (stdio or http)
MCP_TRANSPORT=stdio
# HTTP server port (for HTTP mode)
PORT=8080
An API key is optional but recommended for higher rate limits and better performance.
Rate Limits:
How to get an API key:
.env file:
OPENDOTA_API_KEY=your-api-key-here
The server will automatically detect and use the API key when configured. You'll see a confirmation message in the logs:
✅ OpenDota API key configured (higher rate limits enabled)
Contributions are welcome! Please:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)For issues, questions, or contributions:
Made with ❤️ for the Dota 2 community
Install via CLI
npx mdskills install hkaanengin/opendota-mcp-serverOpenDota MCP Server is a free, open-source AI agent skill. A Model Context Protocol (MCP) server that provides seamless access to the OpenDota API for querying Dota 2 player statistics, match data, and hero information through AI assistants like Claude. - 20+ Tools across 5 categories for comprehensive Dota 2 data access - Natural Language Support - Fuzzy matching for hero names, lane positions, and stat fields - Dual Transport - Supports both stdio (loca
Install OpenDota MCP Server with a single command:
npx mdskills install hkaanengin/opendota-mcp-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
OpenDota MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.