HO

hkaanengin/opendota-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 4 forks 质量 73 趋势 33

MCP server providing AI assistants with access to Dota 2 statistics via OpenDota API. 20+ tools for player stats, hero data, and match analysis with natural language support.

概览

A Model Context Protocol (MCP) server that provides seamless access to the OpenDota API for querying Dota 2 player statistics, match data, and hero information through AI assistants like Claude. - across 5 categories for comprehensive Dota 2 data access - - Fuzzy matching for hero names, lane positions, and stat fields - - Supports both stdio (local) and HTTP (remote) modes - - Built-in protection respecting OpenDota API limits - - Fast lookups with local hero/item data Query player statistics, win/loss records, hero preferences, and performance metrics: - get_player_info - Get player profile, win rate, and favorite heroes - get_player_win_loss - Win/loss stats with advanced filtering - get_heroes_played - Detailed statistics for all heroes played - get_player_peers - Find frequent teammates - get_player_totals - Aggregated player statistics - get_player_histograms - Distribution of matches across statistical fields Access hero information, matchups, and item builds: - get_heroes -...

README

以下为原文 README 节选,完整内容请查看原文。

OpenDota MCP Server

A Model Context Protocol (MCP) server that provides seamless access to the OpenDota API for querying Dota 2 player statistics, match data, and hero information through AI assistants like Claude.

Features

  • 20+ Tools across 5 categories for comprehensive Dota 2 data access
  • Natural Language Support - Fuzzy matching for hero names, lane positions, and stat fields
  • Dual Transport - Supports both stdio (local) and HTTP (remote) modes
  • Rate Limiting - Built-in protection respecting OpenDota API limits
  • Reference Data Caching - Fast lookups with local hero/item data

Available Tools

Player Tools (6 tools)

Query player statistics, win/loss records, hero preferences, and performance metrics:

  • get_player_info - Get player profile, win rate, and favorite heroes
  • get_player_win_loss - Win/loss stats with advanced filtering
  • get_heroes_played - Detailed statistics for all heroes played
  • get_player_peers - Find frequent teammates
  • get_player_totals - Aggregated player statistics
  • get_player_histograms - Distribution of matches across statistical fields

Hero Tools (4 tools)

Access hero information, matchups, and item builds:

  • get_heroes - List all heroes with attributes
  • get_hero_matchups - Matchup data and win rates
  • get_hero_item_popularity - Popular item builds by game phase
  • get_hero_stats - Aggregated hero statistics and pick rates

Match Tools (3 tools)

Retrieve detailed match information and parsed data:

  • get_match_details - Comprehensive match information
  • get_parsed_match_details - Parsed match data with advanced analytics
  • get_player_recent_matches - Recent matches for a player

Lookup Tools (4 tools)

Convert names to IDs with fuzzy matching:

  • get_hero_id_by_name - Hero name → ID (handles typos)
  • get_hero_by_id - Get hero details by ID
  • convert_lane_name_to_id - Lane/position → lane_role ID
  • resolve_time_name - Time period names → OpenDota filter parameters

Misc Tools (3 tools)

Search and utility functions:

  • search_players - Search for players by name
  • get_constants - Get OpenDota constants and reference data
  • get_player_counts - Get player count by rank tier

Installation

Prerequisites

  • Python 3.10 or higher
  • pip package manager

Install from Source

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

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install with dev dependencies
pip install -e ".[dev]"

# Or install runtime only
pip install -e .

Usage

Option 1: Local Server (stdio mode)

Best for Claude Desktop integration on your local machine.

Using Claude Desktop

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
在 GitHub 查看完整 README

安装

docker run -i --rm -e MCP_TRANSPORT=stdio hkaanengin/opendota-mcp-server:latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "opendota": { "command": "/path/to/your/opendota-mcp-server/.venv/bin/opendota-mcp" } } }