esports-ai-coach
v0.6.1
Published
MCP server that turns Claude into a personalized esports AI coach. Analyzes matches, computes GPI, provides improvement plans.
Downloads
4
Maintainers
Readme
Esports AI Coach — MCP Server
Turn Claude into your personal League of Legends coach. Not just stats — AI that explains why you lost and how to improve.
What is this?
An MCP server that connects Claude (or any MCP-compatible AI) to the Riot Games API. Instead of dashboards and numbers, you get a coaching conversation:
You: "Why did I lose my last game?"
Claude: "You played Jinx ADC and went 4/7/3 in 28 minutes. The main issue was
your lane phase — you were down 15 CS at 10 minutes against Caitlyn,
which is expected in this matchup. However, you died twice before 10
minutes trying to trade aggressively. Against Caitlyn's range advantage,
you should farm safely until BF Sword and look for all-ins only when
your support lands CC. Your vision score (8) was also very low — buy
a control ward on every back."How it's different from OP.GG MCP
| | OP.GG MCP | Esports AI Coach | |---|---|---| | Approach | Raw data lookup | Coaching intelligence layer | | Output | Stats tables | Analysis with explanations | | GPI Scoring | No | 8-metric performance index | | Improvement Plans | No | Personalized with rank benchmarks | | Match Analysis | Basic stats | Lane phase, key moments, death review | | Coaching Dialogue | No | Context-aware Q&A |
Quick Start
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"esports-coach": {
"command": "npx",
"args": ["esports-ai-coach"],
"env": {
"RIOT_API_KEY": "RGAPI-your-key-here"
}
}
}
}Claude Code / VS Code
claude mcp add esports-coach -- npx esports-ai-coachSet your API key:
export RIOT_API_KEY=RGAPI-your-key-hereGet a Riot API Key
- Go to developer.riotgames.com
- Sign in with your Riot Account
- Copy your Development API Key from the Dashboard
Dev keys expire every 24 hours. For production use, apply for a Production key.
Tools (12)
Free Tier
| Tool | Description |
|------|-------------|
| analyze_match | Full match breakdown: KDA, CS, vision, lane phase, key moments, recommendations |
| get_profile | Player profile: rank, LP, win rate, top champion mastery |
| get_live_game | Check if player is in-game, show both teams with champions |
| suggest_build | Optimal runes, items, and spells for a champion/role/matchup |
| get_matchup | Detailed champion vs champion advice (laning, mid game, late game) |
| ask_coach | Free-form League of Legends coaching Q&A |
| get_champion_stats | Player's stats by champion: games, win rate, KDA, CS/min |
| get_match_history | Recent matches with results, champions, KDA |
| get_meta | Current meta tier list by role and rank |
| compare_to_rank | Compare your stats to rank averages |
Pro Tier (coming soon)
| Tool | Description |
|------|-------------|
| compute_gpi | Gamer Performance Index — 8 skill scores (Fighting, Farming, Vision, Toughness, Aggression, Objectives, Consistency, Versatility) |
| get_improvement_plan | Personalized plan with GPI analysis, rank benchmarks, drills, and goals |
Example Conversations
"Analyze my last game"
Calls
analyze_match→ Returns lane phase breakdown, CS@10 diff, key deaths with timestamps, what went well, and specific improvements.
"What's my GPI?"
Calls
compute_gpi→ Calculates 8 performance metrics across 20 ranked games, shows radar chart and top strengths/weaknesses.
"How do I climb from Gold to Platinum?"
Calls
get_improvement_plan→ Compares your stats to Gold/Plat benchmarks, identifies highest-impact areas, gives weekly goals.
"What should I build on Jinx vs Caitlyn?"
Calls
suggest_build→ Matchup-specific runes, items, trading patterns, and power spike timings.
Supported Regions
NA1, EUW1, EUN1, KR, BR1, LA1, LA2, OC1, TR1, RU, JP1, PH2, SG2, TH2, TW2, VN2
Roadmap
- [x] Phase 1 — League of Legends MVP (12 tools)
- [ ] Phase 2 — Valorant + TFT support, cloud deployment
- [ ] Phase 3 — Dota 2 + CS2, ML win probability models
- [ ] Phase 4 — VOD analysis, live coaching overlay
Development
git clone https://github.com/Ruslan-Ts/esports-ai-coach.git
cd esports-ai-coach
npm install
cp .env.example .env # Add your RIOT_API_KEY
npm run build # Build with tsup
npm run dev # Dev mode with tsx
npm run test # Run tests (36 tests)
npm run lint # ESLint
npm run inspector # MCP Inspector UITech Stack
- MCP SDK —
@modelcontextprotocol/sdkv1.29 - Rate Limiting — Bottleneck with token bucket + 429 retry
- Caching — In-memory TTL cache (matches: 24h, profiles: 10min)
- Validation — Zod v4
- Static Data — Riot Data Dragon v16.7.1
- Build — tsup, TypeScript, ESM-only
- Tests — Vitest
License
MIT
