RegistryRouter MCP

A source-routing interface for AI coding agents.

RegistryRouter gives agents a structured way to classify a task, identify authoritative sources, check policy, and produce a preflight report before implementation begins.

Local scaffold

Run locally from source

RegistryRouter MCP is available as a local development scaffold. Clone the repository to run the CLI and MCP server on your own machine.

1 — clone and install
git clone https://github.com/Meteoryte/brainn-dev-site.git
cd brainn-dev-site
npm install
2 — run the smoke test
npm run registryrouter:smoke
3 — mcp client config (local path)
{
  "mcpServers": {
    "registryrouter": {
      "command": "node",
      "args": ["/absolute/path/to/brainn-dev-site/packages/registryrouter-mcp/bin/server.js"],
      "env": {
        "REGISTRYROUTER_POLICY": "./registryrouter.policy.json"
      }
    }
  }
}
Status

Local scaffold · not yet on npm

The MCP server and CLI run from source. Run npm run registryrouter:smoke to verify the local setup before connecting a client. npm publication will follow local testing.

Planned

Future npm install path

Once local testing is complete and the package is published, the MCP server will be installable via npx without cloning the repository.

future: mcp client config (npm)
{
  "mcpServers": {
    "registryrouter": {
      "command": "npx",
      "args": ["@brainn/registryrouter-mcp"],
      "env": {
        "REGISTRYROUTER_POLICY": "./registryrouter.policy.json"
      }
    }
  }
}
Not yet published

@brainn/registryrouter-mcp

This package is not yet published to npm. Do not use the npx command above until the package is available and verified. Use the local scaffold path until then.

Tools

The MCP surface

Each tool is designed to make the agent pause, choose a better source, and explain the risk before it writes code.

Tool
Purpose
Returns
Review behavior
classify_task
Classify the software layer.
Layer, confidence, required checks.
Clarifies the source category.
resolve_registry
Choose authoritative sources.
Primary sources, fallbacks, agent instruction.
Highlights trusted references.
compare_sources
Compare libraries, vendors, APIs, registries.
Fit, risks, cost model, what to verify.
Supports source selection.
check_policy
Apply project or team rules.
Allowed, blocked, requires approval.
Creates explicit gates.
generate_preflight_report
Generate a reviewable report.
Markdown and JSON.
Shown before coding.
Agent instructions

Copyable operating prompts

Use these prompts to make an agent treat source selection as a required step instead of an afterthought.

preflight-before-coding
Before writing code, use RegistryRouter to classify the task, identify the authoritative registry/source, check relevant risks, and determine whether human approval is required. Do not invent package names, APIs, pricing, config keys, or capabilities. Return the preflight result before implementation.
safe-dependency-install
Use RegistryRouter to identify the official package registry and docs for this dependency. Verify package identity, current install command, supported versions, license, maintenance status, security concerns, and rollback path. Then produce an implementation plan with pinned versions where appropriate.
ui-source-evaluation
Use RegistryRouter to evaluate candidate UI component sources. Prefer source-owned or accessible primitives when the app has an existing design system. Check visual fit, accessibility, dependency footprint, bundle impact, license, and whether the component can be restyled without fighting the product's visual language.
mcp-tool-evaluation
Use RegistryRouter to evaluate the MCP server or agent tool before connecting it. Check tool identity, source authority, permissions, transport, authentication, data access, logging behavior, prompt-injection risk, installation method, and human approval requirements.
!
Trust boundary: RegistryRouter is a routing and review layer. It should not install packages, execute arbitrary code, or connect to sensitive systems on behalf of the agent.