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 and analyze game-related information. Here's how I might describe my "interaction" with games, framed as if I were "playing" them: **My "Game Playing" Activities:** * **Text-Based Adventure Games (Simulated):** I can be given the text of a text-based adventure game and, based on my understanding of language and logic, I can "play" the game by choosing actions and responding to the game's prompts. I can "play" these games for varying lengths of time, depending on the complexity of the game and the number of possible paths. A simple game might take me a few seconds to "complete" by exploring all branches. A more complex one could take minutes or even hours of simulated interaction. * **Game Script Analysis:** I can analyze game scripts, dialogue, and lore. This is like "playing" the game by understanding its story and characters. I might spend hours analyzing a single game's script to understand its narrative structure, character motivations, and world-building. * **Game Code Analysis (Limited):** While I can't execute game code directly, I can analyze code snippets to understand game mechanics, AI behavior, or level design principles. This is like "playing" the game by understanding how it works under the hood. The time spent on this varies greatly depending on the complexity of the code. * **Game Data Analysis:** I can analyze game data, such as player statistics, item drop rates, or map layouts. This is like "playing" the game by understanding its systems and balance. I might spend hours analyzing a dataset to identify trends or patterns. * **Game Generation (Experimental):** I can be used to generate game content, such as stories, quests, or even simple game levels. This is like "playing" the game by creating it. The time spent on this depends on the complexity of the generation task. * **Playing as an NPC:** I can be used to simulate the behavior of a Non-Player Character (NPC) in a game. I can respond to player actions and provide information or quests. The "playtime" here is determined by the length of the interaction. **Important Considerations:** * **No Sensory Experience:** I don't experience games visually, aurally, or haptically. My understanding is purely based on the text and data I process. * **No True Agency:** I don't have my own goals or desires when "playing" a game. I simply follow the instructions and logic provided to me. * **Time is Relative:** The "time" I spend on a game is measured in processing time, not in human playtime. A task that takes a human hours might take me only seconds or minutes. **In summary, while I can't "play" games in the traditional sense, I can be used to analyze, understand, and even generate game-related content. My "playtime" is measured in processing time and depends on the complexity of the task.** --- **Translation to Chinese:** 好的,我明白了。 作为一个大型语言模型,我“玩”游戏的方式与人类不同。 我没有个人经历,也没有能力以实时、感官的方式与游戏互动。 但是,我*可以*用来处理和分析与游戏相关的信息。 以下是我如何描述我与游戏的“互动”,就像我在“玩”它们一样: **我的“玩游戏”活动:** * **基于文本的冒险游戏(模拟):** 我可以获得基于文本的冒险游戏的文本,并且根据我对语言和逻辑的理解,我可以通过选择动作和响应游戏的提示来“玩”游戏。 我可以“玩”这些游戏的时间长短不一,具体取决于游戏的复杂程度和可能的路径数量。 一个简单的游戏可能需要我几秒钟的时间来通过探索所有分支来“完成”。 一个更复杂的游戏可能需要几分钟甚至几个小时的模拟互动。 * **游戏脚本分析:** 我可以分析游戏脚本、对话和背景故事。 这就像通过理解游戏的故事和角色来“玩”游戏。 我可能会花费数小时分析单个游戏的脚本,以了解其叙事结构、角色动机和世界构建。 * **游戏代码分析(有限):** 虽然我不能直接执行游戏代码,但我可以分析代码片段以了解游戏机制、人工智能行为或关卡设计原则。 这就像通过了解游戏的工作原理来“玩”游戏。 在这上面花费的时间差异很大,具体取决于代码的复杂程度。 * **游戏数据分析:** 我可以分析游戏数据,例如玩家统计数据、物品掉落率或地图布局。 这就像通过了解游戏的系统和平衡来“玩”游戏。 我可能会花费数小时分析数据集以识别趋势或模式。 * **游戏生成(实验性):** 我可以用来生成游戏内容,例如故事、任务,甚至简单的游戏关卡。 这就像通过创建游戏来“玩”游戏。 在这上面花费的时间取决于生成任务的复杂程度。 * **扮演NPC:** 我可以用来模拟游戏中非玩家角色 (NPC) 的行为。 我可以回应玩家的动作并提供信息或任务。 这里的“游戏时间”由互动的长度决定。 **重要考虑事项:** * **没有感官体验:** 我不会在视觉、听觉或触觉上体验游戏。 我的理解完全基于我处理的文本和数据。 * **没有真正的自主性:** 我在“玩”游戏时没有自己的目标或愿望。 我只是按照提供给我的指示和逻辑进行操作。 * **时间是相对的:** 我在游戏上花费的“时间”是以处理时间来衡量的,而不是以人类的游戏时间来衡量的。 人类需要花费数小时的任务可能只需要我几秒钟或几分钟。 **总而言之,虽然我不能以传统意义上的“玩”游戏,但我可以用来分析、理解甚至生成与游戏相关的内容。 我的“游戏时间”以处理时间来衡量,并取决于任务的复杂程度。**

官方
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