PatrickSys/codebase-context

View on GitHub ↗

Codebase Context gives AI agents understanding of your codebase through semantic code search, team conventions, patterns, and memory, so they use fewer tokens, spend less time, and produce better, more familiar output.

61 ★14 forksTypeScriptUpdated 1mo ago

What you need to know

An MCP server and CLI that maps a team's conventions before an AI agent searches, providing a bounded conventions map, pattern signals, golden files, and team memory.

Install

claude mcp add codebase-context -- npx -y codebase-context
Or run in HTTP mode with the --http flag

Usage

  • Start with npx -y codebase-context map to see architecture and golden files
  • Search with intent to get a preflight decision card before editing
  • Record conventions with the remember tool
  • Add the provided CLAUDE.md snippet to steer agents

Key features

  • 10 tools including search_codebase, get_team_patterns, remember, get_memory, and detect_circular_dependencies
  • Bounded conventions map with pattern drift and golden files
  • Preflight decision cards for edit intent
  • Team memory with confidence decay and auto-extraction from conventional commits
  • Multi-project routing
  • Tree-sitter symbol extraction for 10 languages, 30+ with indexing
  • Local-first with optional cloud embedding provider

Best for

Engineering teams who want AI agents to follow existing repo conventions instead of guessing.

Caveats

  • First indexing can take 2-5 minutes for ~30k files
  • Elastic-2.0 license
Clients: Claude Code · Claude Desktop · Cursor · Windsurf · Codex · VS Code Copilot · OpenCode

Reviewed 2026-08-11

Topics

ai-agentsai-codingclaudecode-intelligencecontext-engineeringcopilotcursordeveloper-toolsevidence-scoringhybrid-searchlocal-firstmcpmcp-servermodel-context-protocolpattern-detectionpreflightrerankingsecond-brainsemantic-searchteam-memory
Stars
61★
Forks
14
Language
TypeScript
License
NOASSERTION
Created
2025-11-24
Last push
2026-07-26