OpenDota MCP Server

OpenDota MCP Server

模型上下文协议服务器,它使大型语言模型和人工智能助手能够通过标准化接口检索实时的 Dota 2 统计数据、比赛数据、玩家信息和游戏指标。

游戏与游戏化
访问服务器

README

OpenDota MCP 服务器

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

特性

  • 访问玩家个人资料、统计数据和比赛历史
  • 检索详细的比赛信息
  • 查找职业选手和战队
  • 获取英雄统计数据和排名
  • 按名称搜索玩家
  • 还有更多!

安装

# 克隆仓库
git clone https://github.com/asusevski/opendota-mcp-server.git
cd opendota-mcp-server

# 选项 1:自动设置(适用于 bash、zsh 和其他 shell)
./scripts/setup_env.sh

# 选项 2:使用 uv 手动安装
uv add pyproject.toml

# 用于开发依赖项
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 - 获取特定比赛中使用的英雄

许可证

MIT

推荐服务器

steam

steam

Okay, I understand. As a large language model, I don't "play" games in the same way a human does. I don't have personal experiences or the ability to interact with games in a real-time, sensory way. However, I can be used to *process* information about games. Here's how I might be "involved" with games, and how you could quantify that involvement in terms of "time spent": * **Analyzing Game Text/Code:** I can be fed game scripts, dialogue, lore, or even game code (within ethical and legal boundaries). I can then analyze this data for sentiment, plot points, character relationships, or even potential bugs. The "time spent" would be the duration it takes to process the data. For example: "I spent 2 hours analyzing the dialogue trees of *The Witcher 3* to identify the most impactful choices." * **Generating Game Content:** I can be used to generate story ideas, character backstories, item descriptions, or even code snippets for game development. The "time spent" would be the duration of the content generation process. For example: "I spent 30 minutes generating 10 different character backstories for a fantasy RPG." * **Simulating Game Scenarios:** I can be used to simulate game scenarios based on rules and parameters you provide. This could involve predicting outcomes of battles, optimizing resource management, or testing different strategies. The "time spent" would be the duration of the simulation. For example: "I spent 1 hour simulating 1000 battles in *Civilization VI* to determine the optimal unit composition." * **Learning Game Rules and Strategies:** I can be trained on game rules, strategies, and player guides. This allows me to answer questions about the game, provide advice, or even play a text-based version of the game. The "time spent" would be the duration of the training process. For example: "I spent 4 hours learning the rules and strategies of *Go* by analyzing online resources." * **Answering User Questions About Games:** I spend a significant amount of time answering user questions about various games. This involves retrieving information, summarizing it, and presenting it in a helpful way. The "time spent" is the cumulative time spent answering these queries. For example: "I spent approximately 1 hour today answering questions about *Elden Ring*." **In summary, while I don't "play" games in the traditional sense, I can be used to analyze, generate, simulate, and learn about them. The "time spent" is the duration of these processes.** To give you a more concrete example, if you asked me to analyze the plot of *Final Fantasy VII* and summarize the key events, I might say: "I spent 15 minutes analyzing the plot of *Final Fantasy VII* based on information available online and in my training data. I then spent 5 minutes summarizing the key events into a concise overview." **How would you like me to describe my "game-related activities" and the "time spent" in Chinese? Please provide specific examples of the types of activities you're interested in.**

官方
Chess Analysis Assistant

Chess Analysis Assistant

使用 Stockfish 帮助您分析国际象棋局面并获得专业评估。

本地
TypeScript
mcp-minecraft

mcp-minecraft

允许人工智能模型通过一个机器人来观察和与 Minecraft 世界互动。

本地
TypeScript
Minecraft Docker MCP

Minecraft Docker MCP

允许AI通过RCON与Docker容器内运行的Minecraft服务器进行交互,从而使模型能够以编程方式创建Minecraft建筑并管理服务器。

本地
Python
Lichess MCP

Lichess MCP

一个 MCP 服务器,它支持与 Lichess 国际象棋平台进行自然语言交互,允许用户通过 Claude 来下棋、分析棋局、管理账户以及参与比赛。

JavaScript
WebGL-MCP Server

WebGL-MCP Server

一个模型上下文协议服务器,提供分析和优化 WebGL 游戏的一系列工具,包括性能洞察、内存使用分析以及特定于模板的优化建议。

JavaScript