Cortex

Cortex

Analyzes a repository's history to generate structured .claude/docs/ context files for Claude Code, enabling informed code generation with historical insights, risk scores, and security notes.

Category
Visit Server

README

Cortex

Project knowledge base for Claude Code.

Cortex analyzes your repository and writes .claude/docs/ โ€” structured context files Claude Code reads before touching any file. It knows which parts of the codebase break most often, why certain decisions were made, and where the security risks are.

Not documentation you write. Knowledge extracted from your actual project history.


Install

curl -fsSL https://raw.githubusercontent.com/kovalenko-tech/cortex/main/install.sh | bash

Or with npx โ€” no install required:

npx @kovalenko-tech/cortex-ai analyze

Requires Python 3.11+.


Quick start

cd your-project
cortex setup    # interactive wizard

Or directly:

cortex analyze
git add .claude/
git commit -m "add cortex context"

What Claude Code sees

Before writing a single line of code, Claude Code gets this for every file:

> โšก Fresh โ€” analyzed 2026-03-22 UTC
> ๐Ÿ”ด HIGH RISK (score: 65/100) โ€” 12 bug fixes ยท no test coverage

## Historical Insights
- [Bug Fix] 2024-03-15: Session fails on UTC+0 timezone
  Fix: Always use datetime.timezone.utc

## Decisions & Context
- โœ… Chose JWT over sessions for stateless auth โ€” PR #234 @john
- ๐Ÿšซ Don't call authenticate() before db.init() โ€” PR #156 @maria

## Edit Checklist
- Run: pytest tests/test_auth.py -v
- Check: SESSION_TIMEOUT in config/settings.py

## Related Files
- tests/test_auth.py [co-change: 92%]
- middleware/session.py [co-change: 67%]

## Security Notes
- โœ… No issues found

Commands

cortex setup                      interactive setup wizard
cortex analyze                    analyze full project
cortex analyze --since HEAD~20    only changed files
cortex analyze --no-llm           skip AI summaries
cortex analyze --no-cache         force full re-analysis
cortex init                       generate CLAUDE.md
cortex context src/auth.py        show context for one file
cortex status                     analysis status + freshness + risk
cortex risks                      files sorted by risk score
cortex freshness                  context staleness per file
cortex security                   security audit only
cortex deps                       dependency vulnerability scan
cortex mine-prs                   mine GitHub PR decisions
cortex diff main                  update changed files vs branch
cortex install-hook               auto-update on every commit
cortex watch                      auto-update on new commits
cortex clean                      remove all context files
cortex mcp                        start MCP server for Claude Code

Claude Code integration

Add to .claude/settings.json for automatic context injection:

{
  "mcpServers": {
    "cortex": {
      "command": "cortex",
      "args": ["mcp"]
    }
  }
}

GitHub PR knowledge

Mine implicit decisions from PR discussions:

export GITHUB_TOKEN=ghp_...
cortex mine-prs
cortex analyze

AI summaries

export ANTHROPIC_API_KEY=sk-ant-...
cortex analyze

Uses Claude Haiku to generate a 2โ€“3 sentence technical overview per file. Optional โ€” all other features work without an API key.


Docs

Full documentation: https://kovalenko-tech.github.io/cortex/docs.html


License

MIT โ€” kovalenko-tech/cortex

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured