OpenDota MCP Server
OpenDota MCP 服务器
用于访问 OpenDota API 数据的模型上下文协议 (MCP) 服务器实现。该服务器使 LLM 和 AI 助手能够通过标准接口检索实时 Dota 2 统计数据、比赛数据、玩家信息等。
特征
访问球员资料、统计数据和比赛历史
检索详细的比赛信息
查找职业球员和球队
获取英雄统计数据和排名
按姓名搜索玩家
还有更多!
Related MCP server: MonkeyType MCP Server
安装
# 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]"用法
设置您的环境
(可选但推荐)在https://www.opendota.com/api-keys创建 OpenDota API 密钥
将您的 API 密钥设置为环境变量:
export OPENDOTA_API_KEY=your_api_key_here直接运行服务器
python -m src.opendota_server.server使用 Claude Desktop 运行服务器
遵循:https: //modelcontextprotocol.io/quickstart/user
如果您使用 WSL,假设您已经克隆了 repo 并设置了 python 环境,这就是我编写的 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"
]
}
}
}使用示例客户端
python -m src.client具体工具包括:
get_player_by_id - 通过账户 ID 检索玩家信息
get_player_recent_matches - 获取玩家最近的比赛
get_match_data - 获取特定匹配的详细数据
get_player_win_loss - 获取玩家的胜/负统计数据
get_player_heroes - 获取玩家玩得最多的英雄
get_hero_stats - 获取英雄统计数据
search_player - 按姓名搜索玩家
get_pro_players - 获取职业球员名单
get_pro_matches - 获取最近的专业比赛
get_player_peers - 获取与指定玩家一起玩过的玩家
get_heroes - 获取所有 Dota 2 英雄列表
get_player_totals - 获取玩家的总体统计数据
get_player_rankings - 获取玩家英雄排名
get_player_wordcloud - 获取玩家在聊天中最常用的词语
get_team_info - 获取有关团队的信息
get_public_matches - 获取最近的公开比赛
get_match_heroes - 获取特定比赛中使用的英雄
执照
麻省理工学院
Available Tools
17 toolsget_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
Scored across 17 tools
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.
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.
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.
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
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Related MCP Servers
- AlicenseBqualityDmaintenanceA 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.527MIT
- AlicenseAqualityBmaintenanceA 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.22MIT
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.12MIT
- FlicenseAqualityDmaintenanceA 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.101-