talira

codebase-memory-mcp

Local code intelligence for AI agents: a persistent knowledge graph of your code over MCP

open sourceMITself-hostablefreeMCP

codebase-memory-mcp is a local MCP server, written in C, that indexes a repository into a persistent knowledge graph of functions, classes, call chains, HTTP routes, cross-service links, documentation and infrastructure (Dockerfiles, Kubernetes, Helm, Terraform, CI). Coding agents query it through 17 MCP tools (structural, full-text and semantic search, call path tracing, git diff impact analysis, Cypher-like queries, code snippets) instead of reading file after file, and the same queries run from its CLI. It uses tree-sitter grammars plus LSP type resolution for supported languages, bundles its embedding model, and needs no API key or hosted service. The installer configures dozens of coding agents with skills and hooks, and CBM Lens (open beta) is an optional visual explorer. Collects no telemetry. MIT.

Problems it solves

  • my coding agent wastes tokens reading file after file to understand a large codebase
  • give Claude Code or Cursor a map of my repository's functions, callers and dependencies
  • find what calls a function and what a change could break before editing it
  • trace a Kubernetes service back to the Dockerfile and code it runs
  • keep a code index between agent sessions without sending code to a hosted service
  • semantic code search for an AI agent that runs locally without an API key

Features

  • 17 MCP tools: index, search_graph, trace_path, detect_changes, query_graph, get_code_snippet and more
  • structural, BM25 and local semantic search with bundled embeddings
  • call path, data flow and cross-service tracing
  • maps a git diff to affected symbols and their blast radius
  • indexes documentation, ADRs, Dockerfiles, Kubernetes, Helm, Terraform and CI configuration
  • hybrid LSP type resolution for supported languages
  • persistent indexes kept in sync while agent sessions run
  • installer sets up MCP config, skills, agent profiles and hooks for many coding agents
  • CBM Lens visual explorer (open beta)
  • native C binary with no language runtime; no telemetry

Limitations

  • Smart CI test selection is experimental and uses per-test coverage only for supported C/C++ test harnesses1

Capabilities

Has a command line toolplan not known
Has an MCP serverplan not known

Alternatives

The same job

These do what codebase-memory-mcp does.

  1. CodeGraphContext Index local code into a graph database to give AI assistants and developers repository-wide context
  2. AOCI-CODE Git-versioned codebase index that coding agents read first

Compare codebase-memory-mcp with the top 3