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

v1.0.6

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 its declared capabilities into your app. Source installs leave shared configuration, environment values, and call-site wiring to the backend owner and return an integration report for review.

It is intentionally dependency-free at runtime: 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; the repository build gate strictly type-checks the published source without transpiling it.

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.com/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 (for example user or damatjs/[email protected]) — read before installing. | | list_installed | Read authoritative module installation records from damat.lock.json, including distributed source capabilities. | | add_module | Install a registry, path, Git, npm, or tarball source with the transactional installer. Security and experimental package modes require explicit opt-ins. | | remove_module | Plan or remove installer-owned files and uniquely owned packages. Modified owned files require yes: true; database migrations are not rolled back. | | update_module | Re-fetch the origin recorded in damat.lock.json, show the owned-file plan, and apply after explicit confirmation where needed. |

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 damat.lock.json reads 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. For a bare module_info ref, an exact bare key wins; otherwise the server resolves one unique namespaced key or matching entry name. Multiple namespace matches return an ambiguity error listing the canonical refs to choose from.

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 damat.json manifest, and the verification gate.

Documentation

License

MIT