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.
npx -y @opgginc/opgg-mcpOverview
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:
# Install dependencies (example using npm)
# Create .env (see example below) and start
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:
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:
| Endpoint | Method | Description |
|---|---|---|
| /mcp/v1/lol/champions | GET | List champions with aggregated stats |
| /mcp/v1/lol/champions/{id}/stats | GET | Detailed stats for a champion (patch, queue filters) |
| /mcp/v1/tft/meta/comps | GET | Popular TFT comps with traits & winrates |
| /mcp/v1/valorant/agents | GET | Agent pick/ban and performance data |
| /mcp/v1/esports/schedule | GET | Upcoming events and match metadata |
Use Cases
- Populate a champion selection assistant
- Fetch champion stats to rank picks by pick-rate and win-rate.
- Example:
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).
Esports schedule widget
- Display upcoming matches and streams; refresh on schedule changes.
- 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
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