Skip to main content
Glama

OpenDota MCP 服务器

用于访问 OpenDota API 数据的模型上下文协议 (MCP) 服务器实现。该服务器使 LLM 和 AI 助手能够通过标准接口检索实时 Dota 2 统计数据、比赛数据、玩家信息等。

特征

  • 访问球员资料、统计数据和比赛历史

  • 检索详细的比赛信息

  • 查找职业球员和球队

  • 获取英雄统计数据和排名

  • 按姓名搜索玩家

  • 还有更多!

Related MCP server: MCP Riot 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]"

用法

设置您的环境

  1. (可选但推荐)在https://www.opendota.com/api-keys创建 OpenDota API 密钥

  2. 将您的 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 - 获取特定比赛中使用的英雄

执照

麻省理工学院

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/asusevski/opendota-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server