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

cortex-kb

v1.0.4

Published

Cortex MCP Knowledge Base CLI

Readme

Cortex MCP

Cortex is an advanced Model Context Protocol (MCP) server that supercharges your AI assistant with Domain-Driven Design Topology and Vector Mathematics.

It is designed to solve the two biggest problems with AI coding assistants:

  1. They hallucinate architectural boundaries (e.g. telling your frontend to query your database directly).
  2. They get lost in large codebases due to context limits.

Cortex acts as a localized brain for your repository, mapping your codebase into a strict Topological Graph, and cross-referencing it with a native SQLite Vector Database.

Setup & Installation

Setting up Cortex is a simple process. Navigate to your project root and choose your AI assistant below to copy-paste the complete initialization block:


Setup for Cursor

Run this block in your project root to install Cortex globally, auto-index your documentation, and automatically attach the MCP server to Cursor:

npm install -g cortex-kb
cortex init cursor
cursor mcp add cortex -- cortex

(Prefer manual GUI setup? See the Cursor MCP Documentation.)

Setup for Antigravity (AGY)

Run this block in your project root to install Cortex globally, auto-index your documentation, and automatically attach the MCP server to Antigravity:

npm install -g cortex-kb
cortex init antigravity
agy mcp install cortex cortex

(Prefer manual GUI setup? See the Antigravity MCP Documentation.)

Setup for GitHub Copilot

Run this block in your project root to install Cortex globally, auto-index your documentation, and automatically attach the MCP server to Copilot:

npm install -g cortex-kb
cortex init copilot
codex mcp add cortex -- cortex

(Prefer manual JSON setup? See the GitHub Copilot MCP Documentation.)

Setup for Claude CLI

Run this block in your project root to install Cortex globally, auto-index your documentation, and automatically attach the MCP server to the Claude CLI:

npm install -g cortex-kb
cortex init claude
claude mcp add cortex -- cortex

(Using Claude Desktop instead of the CLI? See the Claude Desktop MCP Documentation.)

Setup for Codex

Run this block in your project root to install Cortex globally, auto-index your documentation, and automatically attach the MCP server to Codex:

npm install -g cortex-kb
cortex init codex
codex mcp add cortex -- cortex

Setup for Windsurf

Run this block in your project root to install Cortex globally and auto-index your documentation:

npm install -g cortex-kb
cortex init windsurf

Then, configure the server manually. (See the Windsurf MCP Documentation.)


The CLI Wrapper

Cortex isn't just for AI. Engineers can use the built-in CLI:

  • cortex start Starts the MCP server (this is what your AI runs).
  • cortex init [provider|file] Bootstraps Cortex, injects AI rules, and auto-indexes the repository.
  • cortex index Indexes all markdown documentation in the current directory into the vector DB.
  • cortex query <term> Performs a lightning-fast natural language semantic search across your codebase directly from your terminal.
  • cortex visualize Generates an interactive HTML visualization of your software architecture graph.

The MCP Tools

When connected, your AI assistant will have access to the following tools:

Graph Tools

  • add_entity: Maps a new component/service into the architecture graph.
  • add_edge: Defines relationships between entities (e.g., DEPENDS_ON).
  • search_entities: Finds existing entities by name or type.
  • get_blast_radius: Analyzes the impact of a component by fetching its rich markdown and all connected dependencies.
  • expand_ontology: Adds new allowed node/edge types dynamically.
  • run_custom_query: Runs custom SQLite SELECT queries against the knowledge base for advanced topology analysis.

Vector Tools

  • index_directory: Recursively chunks and embeds markdown documentation.
  • index_file: Embeds a specific file.
  • semantic_search: Finds relevant documentation based on natural language meaning using local L2 distance vector search.

License

MIT