OP

OP.GG MCP Server: League, TFT, Valorant Data

Access OP.GG's MCP server for real-time League, TFT, and Valorant data—champion analytics, meta comps, esports schedules, and character stats.

Quick Install
npx -y @opgginc/opgg-mcp

Overview

OP.GG MCP Server is an open-source HTTP API that exposes OP.GG’s live and historical game data for League of Legends, Teamfight Tactics, and Valorant. It aggregates champion/agent statistics, meta compositions, esports schedules and match summaries into a consistent JSON API that can be consumed by dashboards, bots, analytics pipelines, and ML models. The server is designed to be a single source of truth for real-time and near-real-time game context data.

This repository is useful for developers who need reliable game-state and meta information without building scrapers or ingest pipelines. It can be run locally or deployed in production (Docker-friendly), and includes caching and configuration options to integrate with Redis/databases and to control rate limits and telemetry.

Features

  • RESTful JSON APIs for League, TFT, and Valorant
  • Champion/agent statistics (win rates, pick/ban, item builds)
  • Meta compositions and recommended team comps for TFT and LoL
  • Esports schedules, event metadata, and match listings
  • Cacheable endpoints with pluggable Redis support
  • Docker and local dev modes for quick setup
  • OpenAPI/Swagger documentation (served by the app)
  • Lightweight auth and rate-limit hooks for production deployment

Installation / Configuration

Clone and run locally:

git clone https://github.com/opgginc/opgg-mcp.git
cd opgg-mcp
# Install dependencies (example using npm)
npm install
# Create .env (see example below) and start
cp .env.example .env
npm run dev

Example .env (minimum):

PORT=3000
NODE_ENV=development
REDIS_URL=redis://localhost:6379
DATABASE_URL=postgres://user:pass@localhost:5432/opggmcp
API_TOKEN=your-internal-api-token
CACHE_TTL_SECONDS=60

Run with Docker Compose (example):

version: "3.8"
services:
  mcp:
    image: opgg/opgg-mcp:latest
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
      - REDIS_URL=redis://redis:6379
      - DATABASE_URL=postgres://user:pass@db:5432/opggmcp
  redis:
    image: redis:6
  db:
    image: postgres:13
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: opggmcp

Start with:

docker-compose up -d

Available Resources

  • GitHub: https://github.com/opgginc/opgg-mcp
  • OpenAPI/Swagger UI: typically exposed at /docs or /swagger in the running server
  • Postman / Collection: check the repo’s tools/ or docs/ directory for ready-to-import collections
  • Logs & Metrics: enable via environment variables (NODE_ENV, LOG_LEVEL); integrate with your monitoring stack

API surface (common base path): /mcp/v1

Example endpoint summary:

EndpointMethodDescription
/mcp/v1/lol/championsGETList champions with aggregated stats
/mcp/v1/lol/champions/{id}/statsGETDetailed stats for a champion (patch, queue filters)
/mcp/v1/tft/meta/compsGETPopular TFT comps with traits & winrates
/mcp/v1/valorant/agentsGETAgent pick/ban and performance data
/mcp/v1/esports/scheduleGETUpcoming events and match metadata

Use Cases

  1. Populate a champion selection assistant
    • Fetch champion stats to rank picks by pick-rate and win-rate.
    • Example:
curl "http://localhost:3000/mcp/v1/lol/champions?patch=13.7&queue=solo"
  1. Power an ML model for win prediction

    • Consume normalized champion/item/agent vectors and historical match data to train or score models.
    • Use the champion stats and matchup endpoints to create contextual features (recent win-rate, item popularity).
  2. Esports schedule widget

    • Display upcoming matches and streams; refresh on schedule changes.
curl "http://localhost:3000/mcp/v1/esports/schedule?from=2026-04-01&to=2026-04-10"
  1. Real-time meta monitoring for content/analytics
    • Monitor changes in TFT comp popularity or Valorant agent picks; trigger alerts when a comp’s win-rate moves beyond a threshold.

Example Response (abridged)

GET /mcp/v1/lol/champions

[
  {
    "id": 103,
    "name": "Ahri",
    "winRate": 0.51,
    "pickRate": 0.073,
    "banRate": 0.012,
    "recommendedItems": ["Luden's Tempest","Rabadon's Deathcap"]
  },
  { "...": "..." }
]

Tips for Developers

  • Use the OpenAPI spec to generate client SDKs or TypeScript types.
  • Cache responses locally or with Redis to reduce upstream load if your consumers poll frequently.
  • Start in development mode to access built-in docs at /docs and to inspect example responses.
  • Apply environment-based configuration for telemetry and rate limits when deploying to production.

For full reference and the latest