npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

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.

npm version License: MIT

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-coach

Set your API key:

export RIOT_API_KEY=RGAPI-your-key-here

Get a Riot API Key

  1. Go to developer.riotgames.com
  2. Sign in with your Riot Account
  3. 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 UI

Tech Stack

  • MCP SDK@modelcontextprotocol/sdk v1.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