Dota 2数据访问服务

OpenDota MCP Server是一个通过标准接口为LLMs和AI助手提供实时Dota 2统计数据、比赛数据、玩家信息等访问服务的协议服务器实现。

  • by lieyanqzu
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 lieyanqzu/opendota-mcp-server

使用说明

OpenDota MCP服务器

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

特性

  • 访问球员资料、统计数据和比赛历史记录
  • 检索详细的匹配信息
  • 查找职业球员和球队
  • 获取英雄统计数据和排名
  • 按名字搜索玩家
  • 还有更多!

安装

通过Smithery安装

通过以下方式自动安装Claude Desktop的opendota mcp服务器 史密瑟里:

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

手动安装

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

# Install with uv and only uv (pip is for nerds)
uv add pyproject.toml

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

用法

设置您的环境

  1. (可选但推荐)在以下位置创建OpenDota API密钥https://www.opendota.com/api-keys
  2. 将API密钥设置为环境变量:
export OPENDOTA_API_KEY=your_api_key_here

直接运行服务器

python -m src.opendota_server.server

使用Claude Desktop运行服务器

请遵循以下步骤:https://modelcontextprotocol.io/quickstart/user

如果你使用WSL,假设你已经克隆了仓库并设置了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_liss-获取玩家的输赢统计信息
  • get_player_heroes-获取玩家玩得最多的英雄
  • get_hero_sts-获取英雄的统计数据
  • 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-获取在特定比赛中扮演的英雄

许可证

麻省理工学院