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

fri3d-badge-mcp

v0.1.0

Published

MCP server providing Fri3d Camp 2026 badge and MicroPython documentation lookup.

Readme

fri3d-badge-mcp

A Model Context Protocol server that gives LLM clients structured access to MicroPython documentation and the Fri3d Camp 2026 badge documentation.

It can run locally as a stdio MCP server (via npx) or be deployed to Vercel as an HTTP MCP endpoint using the mcp-handler package.

Sources

Nothing is bundled or pre-indexed — everything is fetched on demand and cached in memory and on disk so the server stays current with upstream docs without redeploys.

Tools exposed

| Tool | Description | | ---- | ----------- | | search_micropython_docs | Keyword search across the MicroPython docs (Sphinx index). | | get_micropython_page | Fetch & clean a MicroPython doc page (path or full URL). | | list_micropython_modules | Curated list of common MicroPython modules + quick-references. | | search_fri3d_badge_docs | Substring search across all Fri3d badge_2026 pages. | | get_fri3d_badge_page | Fetch & clean a Fri3d badge_2026 page. | | list_fri3d_badge_pages | List all known Fri3d badge_2026 pages and sections. | | search_micropythonos_docs | Substring search across all MicroPythonOS docs pages. | | get_micropythonos_page | Fetch & clean a MicroPythonOS docs page. | | list_micropythonos_pages | List all known MicroPythonOS docs pages and sections. |

All tools return text content suitable for direct consumption by an LLM.

Local usage via npx (stdio transport)

The easiest way to use this MCP server locally is via npx. Add it to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "fri3d-badge": {
      "command": "npx",
      "args": ["fri3d-badge-mcp"]
    }
  }
}

Or start it manually to test:

npx fri3d-badge-mcp

Caching

The local server caches all fetched search indices and pages using a two-layer strategy:

| Layer | Scope | TTL | |-------|-------|-----| | In-memory | current process | 15 min – 1 h | | Disk (os.tmpdir()/fri3d-badge-mcp/) | survives restarts | same TTL |

Stale-while-revalidate: when the disk cache has data older than its TTL (but less than 2× TTL), the server returns the stale data immediately while refreshing in the background, so the next call already gets fresh results. Data older than 2× TTL is always re-fetched synchronously.

Architecture

api/
  server.ts            # Vercel MCP handler — wires tools to source modules
src/
  server.ts            # Standalone stdio MCP server (npx entry point)
  tools.ts             # Shared tool registrations (used by both transports)
  lib/
    cache.ts           # TTL cache with disk persistence + stale-while-revalidate
    fetch.ts           # fetch() wrapper with timeout + UA
    html.ts            # Lightweight HTML → markdown-ish text extractor
  sources/
    micropython.ts     # MicroPython search + page fetch
    fri3d.ts           # Fri3d badge docs search + page fetch
    micropythonos.ts   # MicroPythonOS docs search + page fetch
scripts/
  test-client.mjs      # Sample MCP client for local smoke testing
vercel.json            # Routes everything to /api/server, 60s max duration

Deploy on Vercel

  1. Push this repo to GitHub.
  2. Import it on Vercel and deploy. No env vars required.
  3. Enable Fluid compute for better warm-start reuse of the in-memory cache.
  4. (Pro/Enterprise) bump vercel.json maxDuration to 800 if you want long searches to never time out.

The MCP endpoint is then:

https://<your-deployment>.vercel.app/mcp

Uses streamable-HTTP transport only (the current MCP spec).

Local development (Vercel dev server)

npm install
npm start            # runs `vercel dev` on http://localhost:3000
node scripts/test-client.mjs http://localhost:3000

Notes & limitations

  • The MicroPython search uses Sphinx's searchindex.js, which contains stemmed tokens. The implementation does prefix matching plus title/object weighting; it is intentionally simple but covers typical lookups (machine.Pin, interrupt, neopixel, wifi, …).
  • The Fri3d badge_2026 and MicroPythonOS sources both use MkDocs Material's search/search_index.json and currently perform weighted substring matching over title and body text.
  • Page fetches are restricted to the documentation hostnames as a small SSRF guard.