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

@happyvertical/sdk-mcp

v0.89.12

Published

MCP server for HAVE SDK - Routes queries to package experts using AGENT.md files

Readme

@happyvertical/sdk-mcp

MCP server for the HAVE SDK that routes developer queries to package documentation. It scans each package's AGENT.md file at startup, builds a keyword-indexed registry, and exposes three MCP tools: ask (AI-powered Q&A), list-packages, and get-docs.

Installation

pnpm install @happyvertical/sdk-mcp

Published to public npm. No scoped registry configuration is required.

Usage

As an MCP Server

The package provides a stdio-based MCP server. Run it directly:

npx sdk-mcp

Or configure it in your MCP client (e.g., Claude Desktop) to launch as a subprocess.

Claude Code Context CLI

Copy AGENT.md and metadata into your project's .claude/ directory for AI-assisted development:

npx have-sdk-mcp-context

Environment Variables

The ask tool requires an AI provider. Set one of:

  • HAVE_AI_API_KEY — Fallback API key for any provider
  • HAVE_AI_TYPE — Provider type (openai, anthropic, gemini)
  • OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY

The list-packages and get-docs tools work without AI configuration.

MCP Tools

ask

Ask a question about the SDK. Routes to relevant packages via keyword matching and synthesizes a response using AI (top 3 matches).

{
  "query": "How do I send an email with an attachment?",
  "packages": ["email", "messages"]
}
  • query (required) — The question to ask
  • packages (optional) — Explicit package names to consult instead of auto-routing

list-packages

List all discovered SDK packages with descriptions and keywords. No parameters.

get-docs

Get the full AGENT.md content for a specific package.

{
  "packageName": "ai"
}

How It Works

  1. Registry — On first call, scans packages/*/AGENT.md and builds a Map<string, PackageMetadata> keyed by package name. Each entry includes the description (extracted from AGENT.md), keywords (from a static mapping in registry.ts), and the full documentation content.

  2. Routing — Splits the user query into tokens and scores each package by keyword overlap (exact match = 10 pts, partial = 5 pts, name bonus = 15 pts). Packages below a minimum score threshold are excluded.

  3. Synthesis — The ask tool loads AGENT.md for the top 3 matched packages, builds a system prompt with that context, and calls @happyvertical/ai to generate a response.

Adding a New Package

  1. Create an AGENT.md in the new package directory
  2. Add a keyword entry in src/registry.ts (PACKAGE_KEYWORDS)
  3. Rebuild: pnpm run build

The package will be discovered automatically on the next server startup.

API

Registry (registry.ts)

| Export | Description | |--------|-------------| | PackageMetadata | Interface: name, path, description, claudeMd, keywords | | PACKAGE_KEYWORDS | Static keyword-to-package mapping used for routing | | buildPackageRegistry() | Scans packages directory and returns cached Map<string, PackageMetadata> | | getPackage(name) | Get metadata for a single package | | getAllPackages() | Get all package metadata as an array | | getPackageDocs(name) | Get raw AGENT.md content for a package | | clearCache() | Clear the in-memory registry cache |

Router (router.ts)

| Export | Description | |--------|-------------| | PackageMatch | Interface: package, score, matchedKeywords | | routeQuery(query, minScore?) | Score and rank packages against a query string | | getPackagesByNames(names) | Look up packages by explicit name list | | getTopPackages(query, limit?) | Shorthand for routeQuery + slice |

Tools (tools/)

| Export | Description | |--------|-------------| | ask(input) | AI-powered Q&A tool | | listPackages() | List all packages | | getDocs(packageName) | Get package documentation |

Dependencies

  • @happyvertical/ai — AI provider for the ask tool
  • @modelcontextprotocol/sdk — MCP protocol implementation

Development

pnpm run build       # Build
pnpm test            # Run tests
pnpm run dev         # Watch mode (build + test)

License

MIT