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 🙏

© 2025 – Pkg Stats / Ryan Hefner

riot-mcp

v1.0.0

Published

Riot Games MCP server, Express integration, and AI SDK toolkit for League of Legends data.

Readme

Riot MCP Server (TypeScript)

This project implements an MCP-compatible Riot Games data server using the @modelcontextprotocol/sdk.

Prerequisites

  • Node.js 18+
  • A Riot Games Developer API key (RIOT_API_KEY)

Setup

npm install

Create a local .env (or otherwise export the variable) with your Riot key:

export RIOT_API_KEY="your-riot-api-key"

If you prefer using a file, create .env alongside the project with:

RIOT_API_KEY=your-riot-api-key

Running

  • Development (TS with live reload):

    npm run dev
  • Production build + run:

    npm run build
    npm start

The server listens on stdio, so hook it into an MCP-compatible client (e.g. Claude Desktop, VS Code MCP, MCP Inspector) by configuring the command npm run dev (or the built build output) as the server entrypoint.

Available Tools

| Tool ID | Description | Key Arguments | | --- | --- | --- | | riot.getTopChampions | Lists the champions a player has the highest mastery on. | gameName, tagLine, optional platformRouting (default na1), optional regionalRouting, optional language (default en_US), count (max 10). | | riot.getChampionMastery | Returns mastery stats for a specific champion. | Same region/language args as above plus championName (locale aware). | | riot.getMatchHistory | Retrieves recent matches with win/loss, KDA, vision, CS, and damage statistics. | count (max 10), optional start, optional queue filter, plus standard routing args. | | riot.getMatchSummary | Detailed stats for a single match for the specified player. | matchId, either puuid or gameName+tagLine, plus routing args. | | riot.getPlayerSummary | Aggregates profile info, ranks, top champions, and recent match stats. | matchCount and topChampionCount control list sizes; accepts routing and language overrides. |

Region & Routing

  • platformRouting corresponds to the platform shard (e.g. na1, euw1, kr, br1, sg2).
  • regionalRouting corresponds to the match/account routing group (americas, europe, asia, sea). If omitted, it is derived from the platform automatically; you can override it when necessary (e.g. TFT or Valorant endpoints).

Localization

Champion names are pulled from Data Dragon using the requested language (default en_US). Invalid locales result in a descriptive error.

Development Notes

  • npm run dev uses tsx watch for a fast development loop.
  • npm run build outputs compiled files in dist/.
  • The code caches champion metadata per language to avoid repeated Data Dragon requests.
  • All tool responses include both a readable text summary and structuredContent validated against Zod schemas, making the data easy for clients to consume programmatically.

License

MIT License.