League of Legends MCP Server avatar

League of Legends MCP Server

Pricing

from $8.00 / 1,000 results

Go to Apify Store
League of Legends MCP Server

League of Legends MCP Server

Connect AI assistants to League of Legends data via MCP. 26 tools cover player profiles, ranked stats, match history, champion mastery, live game, league standings, clash, challenges and AI coaching. No Riot API key needed, and it works with Claude Desktop, ChatGPT and any MCP client.

Pricing

from $8.00 / 1,000 results

Rating

0.0

(0)

Developer

Jordan Byte

Jordan Byte

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

4 days ago

Last modified

Share

Connect AI assistants to League of Legends data via MCP. 26 tools cover player profiles, ranked stats, match history, champion mastery, live game, league standings, clash, challenges and AI coaching. No Riot API key needed by end users — you (the operator) supply one — and it works with Claude Desktop, ChatGPT and any MCP client.

Architecture

  • Transport: MCP over Streamable HTTP (POST /mcp, stateless — a fresh McpServer per request).
  • Runtime: Apify Actor in Standby mode — a persistent Express server, not a run-to-completion Actor.
  • Billing: Apify pay-per-event (.actor/pay_per_event.json) — data-retrieval ($0.002), match-data ($0.004), ai-analysis ($0.016). Charged only after a tool call succeeds. Prices are set for a ~55% profit margin (Apify takes a 20% platform commission on top of the price, so profit = 0.8 × price − cost, and price = cost ÷ 0.25 for a 55% margin target). Cost assumptions: ~$0.0005 compute per lightweight call, ~$0.001 per match-data call, ~$0.004 per ai-analysis call (OpenRouter/Haiku 4.5 tokens + compute). Re-tune if you switch LLM models or your real Apify compute usage differs once measured in production.
  • Data sources: Riot Games REST API (regional + platform routing) and Data Dragon (champion/item/ rune/summoner-spell name resolution, cached in memory).
  • AI analysis: the four lol_analyze_* / lol_compare_players / lol_get_improvement_tips tools call OpenRouter (OpenAI-compatible), defaulting to a cheap Claude model — override with OPENROUTER_MODEL.

Required environment variables (Apify secret input / env vars)

VariablePurpose
RIOT_API_KEYRiot Games API key. Get a free personal key (24h expiry) or apply for a production key (no expiry) at the Riot Developer Portal.
OPENROUTER_API_KEYPowers the AI-coaching tools. Get one at openrouter.ai/keys.
OPENROUTER_MODELOptional. Defaults to anthropic/claude-haiku-4.5.

Never commit real values for these — set them as Apify Actor secrets (Console → Actor → Settings → Environment variables) or a local .env (see .env.example).

Local development

npm install
npm run build
RIOT_API_KEY=... OPENROUTER_API_KEY=... ACTOR_STANDBY_PORT=4321 node dist/main.js

Then point an MCP client at http://localhost:4321/mcp with Authorization: Bearer <apify-token> (or ?token=) — the server validates the token against the Apify API before allowing any tool call.

Tools (26)

Account & Profile (data-retrieval / match-data): lol_get_account, lol_get_summoner, lol_get_ranked, lol_get_player_profile.

Match Data (match-data): lol_get_match_history, lol_get_match_details, lol_get_match_timeline, lol_get_live_game.

Champion Mastery (data-retrieval): lol_get_champion_mastery, lol_get_mastery_by_champion.

Leagues & Ranked Ladders (data-retrieval): lol_get_league_top, lol_get_league_entries, lol_get_league_by_id, lol_get_league_entries_exp.

Clash (data-retrieval): lol_get_clash_player, lol_get_clash_team, lol_get_clash_tournaments.

Challenges (data-retrieval): lol_get_challenges, lol_get_player_challenges.

Utility (data-retrieval): lol_get_champion_rotation, lol_get_featured_games, lol_get_server_status.

AI Analysis (ai-analysis): lol_analyze_performance, lol_analyze_champion, lol_get_improvement_tips, lol_compare_players.

Known limitations of this build

  • Rank benchmarks used by the AI-coaching tools (src/ai/benchmarks.ts) are heuristic midpoints, not official Riot statistics — good for directional coaching, not precise percentile claims.
  • Auth performs a live call to api.apify.com/v2/users/me to validate the token (cached 5 min); Apify's Standby routing layer is expected to be the authoritative gate in production.
  • No automated test suite yet — verified via a real MCP handshake (Client + InMemoryTransport) confirming all 26 tools register with valid schemas and the error-handling path works end to end.