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

mcp-osrs-stats

v1.0.7

Published

MCP server providing OSRS player statistics and leaderboard data to AI assistants

Downloads

21

Readme

OSRS Player Stats MCP Server

CI codecov npm version

A Model Context Protocol (MCP) server that provides real-time Old School RuneScape (OSRS) player statistics and leaderboard data to AI assistants.

Features

  • Player Statistics: Get comprehensive stats for any OSRS player including skills, activities, and boss kill counts
  • Skill Leaderboards: View top players for any skill across different game modes
  • Activity/Boss Leaderboards: Check rankings for activities, minigames, and boss encounters
  • Player Comparison: Compare multiple players' statistics side-by-side
  • Multiple Game Modes: Support for main, ironman, hardcore ironman, ultimate ironman, deadman, and seasonal modes

Installation

Via npx (Recommended)

npx mcp-osrs-stats

Via npm

npm install -g mcp-osrs-stats
mcp-osrs-stats

Usage

Claude Desktop Configuration

Add this to your Claude Desktop configuration file:

{
  "mcpServers": {
    "osrs-player-stats": {
      "command": "npx",
      "args": ["-y", "mcp-osrs-stats"]
    }
  }
}

Remote Access via Supergateway

For remote access or HTTP integration, use Supergateway to expose the MCP server over HTTP:

# Start the server with Streamable HTTP endpoint
npx supergateway --stdio "npx mcp-osrs-stats" --outputTransport streamableHttp --port 3000

# Server will be available at: http://localhost:3000/mcp

Example HTTP requests:

# List available tools
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

# Get player stats
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_player_stats","arguments":{"username":"zezima"}},"id":2}'

Deployment Options:

  • Deploy Supergateway + MCP server to any cloud provider
  • Use with serverless functions or containers
  • Integrate with web applications via HTTP endpoints
  • Connect multiple AI systems to the same OSRS data source

Available Tools

1. get_player_stats

Retrieve comprehensive statistics for a specific OSRS player.

Parameters:

  • username (required): OSRS player username (1-12 characters)
  • gamemode (optional): Player game mode (default: "main")

Example:

{
  "username": "Zezima",
  "gamemode": "main"
}

2. get_skill_leaderboard

Get top players for a specific skill.

Parameters:

  • skill (required): Skill name (e.g., "attack", "woodcutting", "overall")
  • gamemode (optional): Player game mode filter (default: "main")
  • page (optional): Page number (default: 1, 25 players per page)

Valid Skills: overall, attack, defence, strength, hitpoints, ranged, prayer, magic, cooking, woodcutting, fletching, fishing, firemaking, crafting, smithing, mining, herblore, agility, thieving, slayer, farming, runecrafting, hunter, construction

3. get_activity_leaderboard

Get top players for activities (bosses, minigames, clues).

Parameters:

  • activity (required): Activity or boss name
  • gamemode (optional): Player game mode filter (default: "main")
  • page (optional): Page number (default: 1, 25 players per page)

Valid Activities:

  • Clue Scrolls: clue_scrolls_all, clue_scrolls_beginner, clue_scrolls_easy, etc.
  • Bosses: zulrah, vorkath, chambers_of_xeric, theatre_of_blood, etc.
  • Other: lms_rank, bounty_hunter_hunter, soul_wars_zeal, etc.

4. compare_players

Compare statistics between multiple OSRS players.

Parameters:

  • usernames (required): Array of 2-5 player usernames
  • focus (optional): Comparison focus ("skills", "bosses", "activities", or "all")

Example:

{
  "usernames": ["Player1", "Player2", "Player3"],
  "focus": "skills"
}

Game Modes

  • main: Regular accounts
  • ironman: Ironman accounts
  • hardcore_ironman: Hardcore ironman accounts
  • ultimate_ironman: Ultimate ironman accounts
  • deadman: Deadman mode accounts
  • seasonal: Seasonal/League accounts

Error Handling

The server provides detailed error messages for common issues:

  • Invalid usernames (wrong format, too long, etc.)
  • Invalid skill/activity names
  • Player not found
  • API connectivity issues

All errors include helpful information to guide correct usage.

Technical Details

  • Runtime: Node.js 18+
  • Language: TypeScript
  • API: Uses osrs-json-hiscores library for OSRS data
  • Protocol: Model Context Protocol (MCP)
  • Validation: Zod schema validation for all inputs

Contributing

  1. Review CLAUDE.md for complete technical specification and development patterns
  2. Check DECISIONS.md for architectural context and decision history
  3. Follow existing code patterns and ensure all changes are properly typed and validated
  4. Run the full test suite before submitting PRs

License

MIT

Support

For issues and feature requests, please check the project's issue tracker.