@damatjs/mcp is a Model Context Protocol server
that lets an AI assistant (Claude Code, Claude Desktop, Cursor, …) discover and
install modules for you. It wraps the registry and the damat module add flow
in safe tools — the assistant can never do more than the CLI would let you do.
Wire it up
Add the server to your assistant's MCP config (e.g. .mcp.json in your app):
{
"mcpServers": {
"damat-modules": {
"command": "bunx",
"args": ["damat-mcp"],
"env": {
"DAMAT_MODULE_REGISTRY": "https://registry.damatjs.com/index.json",
"DAMAT_APP_DIR": ".",
"DAMAT_CLI": "damat"
}
}
}
}
The three env vars:
| Variable | Meaning | Default |
|---|---|---|
DAMAT_MODULE_REGISTRY | Registry index — a URL, a registry.json path, or a directory | (unset — discovery tools report no registry) |
DAMAT_APP_DIR | The app the assistant installs into | current directory |
DAMAT_CLI | How to invoke the CLI | damat |
The tools
| Tool | Purpose | Key inputs |
|---|---|---|
list_modules | List everything in the registry | — |
search_modules | Find modules by keyword | query |
module_info | Inspect one module — versions, owner, verification | ref |
list_installed | What's already in the app | — |
add_module | Install (runs damat module add) | source, plus optional name, dir, force, allowUnverified, allowScripts |
add_module honors the same trust gate as the CLI: unverified path/git sources
need an explicit allowUnverified: true, and registry verification follows
your DAMAT_MODULE_VERIFY policy (see
Installing modules).
list_installed reads damat.lock.json, which remains authoritative even when
a source module's routes, jobs, events, and pipelines are distributed across
the backend.
module_info accepts a bare name even when the registry stores only namespaced
keys, provided exactly one key or entry name matches. If two publishers expose
the same name, use the canonical namespace from the ambiguity response.
Using it
Just ask: "Find a Damat auth module and install it." The assistant chains
search_modules → module_info → add_module, reports what changed
(copied capabilities, packages, and backend-owned integration instructions),
and reminds you to review the wiring and apply migrations:
bun run db:migrate
To extend the server with your own tools, see the MCP internals.