这是一个用于访问 OpenDota API 数据的 Model Context Protocol (MCP) 服务器实现。此服务器使 LLM 和 AI 助手能够通过标准接口检索实时的 Dota 2 统计数据、比赛数据、玩家信息等。
要通过 Smithery 自动安装 OpenDota API 服务器到 Claude Desktop:
npx -y @smithery/cli install @asusevski/opendota-mcp-server --client claude
# 克隆仓库
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]"
export OPENDOTA_API_KEY=your_api_key_here
python -m src.opendota_server.server
请参考: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
MIT