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

@damatjs/mcp

v0.6.0

Published

Model Context Protocol (MCP) server for discovering and installing Damat modules with AI

Readme

@damatjs/mcp

A Model Context Protocol (MCP) server that lets an AI assistant discover and install Damat modules.

@damatjs/mcp exposes the Damat module registry and the damat module CLI to any MCP client (Claude Code, Claude Desktop, Cursor, …). With it connected, an assistant can search a registry for an existing module, inspect it, and install it into your app — copying the module, registering it in damat.config.ts, syncing env vars, and installing npm packages — all without you leaving the conversation.

It is intentionally dependency-free: it speaks the MCP stdio transport (newline-delimited JSON-RPC 2.0) directly and shells out to the damat CLI for the actual install. Run it with Bun — no build step.

Part of the Damat monorepo · Full guide · Internals

Install

The server runs straight from source with Bun:

bun run packages/mcp/bin/damat-mcp.ts

Inside a generated Damat app, add it as a dependency and use the damat-mcp bin:

bun add -D @damatjs/mcp

Quick start (Claude Code)

Add an .mcp.json to your project root (this repo already ships one):

{
  "mcpServers": {
    "damat-modules": {
      "command": "bun",
      "args": ["run", "packages/mcp/bin/damat-mcp.ts"],
      "env": {
        "DAMAT_MODULE_REGISTRY": "https://registry.damatjs.dev/index.json",
        "DAMAT_APP_DIR": ".",
        "DAMAT_CLI": "damat"
      }
    }
  }
}

In a published app, point args at the installed bin instead:

{ "command": "bunx", "args": ["damat-mcp"] }

Then ask your assistant: "Find a Damat auth module and install it." It will call search_modulesmodule_infoadd_module, then tell you to run migrations.

Tools

| Tool | What it does | |------|--------------| | list_modules | List every module in the configured registry (ref, description, latest version, verification, owner). | | search_modules | Filter the registry by a query matched against ref, description and keywords. | | module_info | Full registry details for one ref (e.g. damatjs/[email protected]) — read before installing. | | list_installed | Scan the app's src/modules for installed modules (via their module.json). | | add_module | Install a module by running damat module add <source> (registry ref, path, github shorthand, or git URL). Path/git sources are refused unless allowUnverified: true is passed; dependency lifecycle scripts stay off unless allowScripts: true. |

Installs are default-deny for anything a registry has not verified: the assistant must set allowUnverified explicitly (after the user approved that exact source) before a git/path install proceeds, and bun add runs with --ignore-scripts unless allowScripts is set.

Configuration

All configuration is via environment variables (set them in .mcp.jsonenv):

| Variable | Default | Description | |----------|---------|-------------| | DAMAT_MODULE_REGISTRY | — | Registry index location: an http(s) URL to the index JSON, a path to a registry.json, or a directory containing one. Without it, registry tools return guidance and you can still install from git/local paths. | | DAMAT_APP_DIR | process.cwd() | Working directory of the target app. Installs and "installed" scans run here. | | DAMAT_CLI | damat | Command used to invoke the CLI. May include args, e.g. bun /abs/packages/cli/damat/src/cli.ts. | | DAMAT_MODULE_VERIFY | warn | Forwarded to the CLI: off | warn | require — the install-time verification policy. |

A sample registry index is provided in registry.example.json. The registry schema matches @damatjs/module's registry entry types.

How it fits

  • Depends on: nothing at runtime. It reads the registry index itself and invokes the damat CLI (@damatjs/damat-cli) for installs.
  • Built on: the same module contract as @damatjs/module — registry refs, the module.json manifest, and the verification gate.

Documentation

License

MIT