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

@kinqs/brainrouter-mcp-server

v0.3.6

Published

BrainRouter MCP server — the cognitive memory engine. Exposes recall, capture, focus scenes, persona, contradictions, skills, and graph queries as MCP tools for any MCP-speaking agent.

Readme

@kinqs/brainrouter-mcp-server

The cognitive memory engine behind BrainRouter — exposed as a Model Context Protocol server so any MCP-speaking agent (Claude Desktop, Cursor, @kinqs/brainrouter-cli, custom clients) can recall, capture, and reason over long-term memory.

Ships the brainrouter-mcp binary.


What it gives you

  • Long-term memory — sensory log + cognitive extraction (L1 facts, L2 focus scenes, L3 persona) with decay, contradiction tracking, and citation reinforcement.
  • Recall surfacememory_recall, memory_search, memory_graph_query, memory_file_history, memory_failed_attempts, memory_explain_recall.
  • Working memorymemory_working_context / memory_working_offload for in-flight payloads that shouldn't bloat the LLM context.
  • Skill cataloguelist_skills, get_skill, search_skills, get_persona — ships with 70+ canonical skills bundled at publish time.
  • HTTP and stdio transports — run as a hosted service (HTTP/SSE) or spawn as a stdio child from any MCP client.

Install

npm install -g @kinqs/brainrouter-mcp-server

The -g flag is required so brainrouter-mcp lands on your $PATH. See @kinqs/brainrouter-cli's README for the sudo / nvm caveats — the same rules apply.

Verify:

which brainrouter-mcp
brainrouter-mcp --version    # prints 0.3.5

Configure

The server reads its config from a .env file. The challenge for a globally-installed package is that you don't know where the package lives, and even if you did, it's typically in a path you can't easily edit (/usr/local/lib/node_modules/... or similar). To fix that, the server looks for .env in three places, in order:

  1. $BRAINROUTER_ENV_FILE — explicit override (set this when you want a per-project or per-deployment config).
  2. ~/.config/brainrouter/server.env — the canonical user location.
  3. ./.env — current working directory (matches the classic dotenv behavior; useful for monorepo dev).

At startup the server prints which path it loaded from, so there's never any ambiguity:

env: loaded 17 vars from /Users/you/.config/brainrouter/server.env

One-time setup

brainrouter-mcp init             # scaffolds ~/.config/brainrouter/server.env
$EDITOR ~/.config/brainrouter/server.env

init copies the package's bundled .env.example to ~/.config/brainrouter/server.env and chmods it to 0600. It won't overwrite an existing file.

Minimum fields to set

# Cognitive extraction LLM (any OpenAI-compatible endpoint:
# OpenAI, OpenRouter, LM Studio, Ollama, vLLM…)
BRAINROUTER_LLM_API_KEY=sk-...
BRAINROUTER_LLM_ENDPOINT=https://api.openai.com/v1/chat/completions
BRAINROUTER_LLM_MODEL=gpt-4o-mini

# Embeddings — required for vector recall. Key falls back to BRAINROUTER_LLM_API_KEY.
BRAINROUTER_EMBEDDING_ENDPOINT=https://api.openai.com/v1/embeddings
BRAINROUTER_EMBEDDING_MODEL=text-embedding-3-small
BRAINROUTER_EMBEDDING_DIMENSIONS=1536

# Server auth — change before exposing the server
BRAINROUTER_ADMIN_PASSWORD=change_me_before_use
BRAINROUTER_JWT_SECRET=replace_with_a_long_random_secret  # `node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"`

Full knob list (reranker, prewarming, focus-scene triggers, sweep intervals, JWT, CORS) lives in the bundled .env.example — view it after init ran, or directly with:

cat "$(npm root -g)/@kinqs/brainrouter-mcp-server/.env.example"

Run

# HTTP transport on :3747 — what the CLI connects to via login
brainrouter-mcp --http --port 3747

# stdio transport — for clients that spawn the server themselves
brainrouter-mcp

The server writes logs to stderr. To leave it running detached, use a process manager (launchd / systemd / tmux / nohup) of your choice.


Docs


License

MIT