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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bgg-mcp

v1.0.3

Published

MCP server exposing BoardGameGeek APIs as MCP tools (search, details, collections, plays, user info, hot items).

Readme

bgg-mcp - README

bgg-mcp

Overview & quick usage

bgg-mcp is a small Model Context Protocol (MCP) server written in TypeScript that exposes BoardGameGeek (BGG) APIs as MCP tools. It uses the MCP SDK and xml2js to parse BGG's XML APIs and returns human-readable responses. The package compiles to dist/ and includes a small CLI wrapper so it can be executed with npx or npm.

Quick run (local build):

npm ci
npm run build
node dist/index.js

Quick run (npx, GitHub-backed):

npx stevenpfiggins/bgg-mcp

If you publish to npm, npx bgg-mcp will work once the package is published.

What this repo contains

  • src/ - TypeScript source (MCP tool registration)
  • dist/ - compiled output (generated by npm run build)
  • bin/bgg-mcp.js - small CLI wrapper used by the bin entry
  • Dockerfile, docker-compose.yml, .dockerignore - docker artifacts
  • package.json - build/publish scripts and metadata

Available MCP tools

These tools are registered in src/index.ts. Each returns an object typically shaped like:

{ content: [{ type: 'text', text: '...' }], isError?: true, results?: [...] }
  • search_games — Search BGG by free text.

    • Input: { query: string }
    • Output: human-readable text, plus results: [{ id, name, year }, ...] for programmatic use.
  • get_game_details — Fetch detailed info for a game.

    • Input: { id: string }
  • get_user_collection — Fetch a user's collection with filters.

    • Input: { username: string, subtype?: string, own?: string, rated?: string, played?: string, rating?: string, maxresults?: number }
  • get_user_plays — Get a user's plays.

    • Input: { username: string, mindate?: string, maxdate?: string, id?: string }
  • get_user_info — Fetch a user's public profile.

    • Input: { name: string }
  • get_hot_items — Fetch trending items.

    • Input: { type?: string }

Examples

Below are example mcp.json tool invocation snippets you can use with an MCP host that supports calling registered tools.

  1. Search games by query
{
	"tool": "search_games",
	"input": { "query": "catan" }
}
  1. Get details for a game id
{
	"tool": "get_game_details",
	"input": { "id": "13" }
}
  1. Get a user's collection (first 10 items)
{
	"tool": "get_user_collection",
	"input": { "username": "exampleuser", "maxresults": 10 }
}
  1. Get a user's plays in a date range
{
	"tool": "get_user_plays",
	"input": { "username": "exampleuser", "mindate": "2023-01-01", "maxdate": "2023-12-31" }
}

Implementation notes

  • Responses are parsed from BGG's XML using xml2js and formatted into text. search_games also exposes structured results for programmatic consumption.
  • Most endpoints implement retry logic when BGG responds with HTTP 202 (queued).

Docker & environment (setup)

You can run the server inside Docker. The image uses a multi-stage build so TypeScript is compiled during image build and only production dependencies are installed in the runtime image.

Quick Docker build & run:

docker build -t bgg-mcp:latest . ;
docker run --rm -p 8080:8080 --name bgg-mcp bgg-mcp:latest

Or with docker-compose:

docker compose up --build

Local development tips

  • Use npm run build after editing TypeScript sources to refresh dist/.
  • For faster iteration you can run the TypeScript directly with tsx or ts-node (devDependency installed). Example:
npm ci
npx tsx src/index.ts

Troubleshooting

  • If you see could not determine executable to run when using npx, ensure the package has been published or use the GitHub short-hand npx <owner>/<repo> which installs from the repo.
  • If BGG APIs return HTTP 202 (queued), the implementation retries; you may still need to increase retry counts for large collections.

License

MIT — see LICENSE file.