Codebase-Memory-MCP: High-Performance Code Intelligence for AI Agents
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Codebase-Memory-MCP is an exceptionally fast and efficient code intelligence engine tailored for AI coding agents. It transforms your codebase into a persistent knowledge graph, indexing an average repository in milliseconds and supporting 158 languages. This tool significantly reduces token usage and integrates seamlessly with various agents as a single, dependency-free binary.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Codebase-Memory-MCP is an exceptionally fast and efficient code intelligence engine tailored for AI coding agents. It transforms your codebase into a persistent knowledge graph, indexing an average repository in milliseconds and even the Linux kernel in just 3 minutes. Supporting 158 languages through Tree-sitter and Hybrid LSP, it enables sub-millisecond structural queries and drastically reduces token consumption for AI interactions. Packaged as a single, static binary with zero dependencies, it offers plug-and-play integration across 11 popular coding agents.
Installation
Getting started with Codebase-Memory-MCP is straightforward.
For macOS / Linux, use the following one-line command:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
To include the built-in graph visualization UI, use:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
For Windows (PowerShell), download and run the installer:
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
.\install.ps1
After installation, restart your coding agent. You can then instruct your agent with "Index this project" to begin. To keep your installation up to date, simply run:
codebase-memory-mcp update
Examples
Codebase-Memory-MCP provides a powerful command-line interface (CLI) for direct interaction. Here are some examples:
- Index a repository:
codebase-memory-mcp cli index_repository '{"repo_path": "/path/to/your/repo"}' - Search for functions matching a pattern:
codebase-memory-mcp cli search_graph '{"name_pattern": ".*Handler.*", "label": "Function"}' - Trace inbound calls to a specific function:
codebase-memory-mcp cli trace_path '{"function_name": "ProcessOrder", "direction": "inbound"}' - Execute a Cypher-like graph query:
codebase-memory-mcp cli query_graph '{"query": "MATCH (f:Function) RETURN f.name LIMIT 5"}'
Additionally, if you installed the UI variant, you can explore your codebase's knowledge graph visually by running codebase-memory-mcp --ui=true --port=9749 and opening http://localhost:9749 in your browser.
Why Use Codebase-Memory-MCP
Codebase-Memory-MCP stands out with several compelling features:
- Extreme Indexing Speed: Indexes the Linux kernel (28M LOC) in 3 minutes and an average repository in milliseconds, thanks to a RAM-first pipeline.
- Broad Language Support with Hybrid LSP: Parses 158 languages using vendored Tree-sitter grammars, enhanced by a lightweight C implementation of language type-resolution algorithms (Hybrid LSP) for 10+ languages, providing semantic accuracy without external language servers.
- Exceptional Token Efficiency: Achieves up to a 99.2% reduction in tokens for AI agents, replacing dozens of grep/read cycles with single graph queries.
- Plug and Play Simplicity: Delivered as a single static binary for macOS, Linux, and Windows, requiring zero runtime dependencies or API keys.
- Seamless Multi-Agent Integration: Automatically configures MCP entries, instruction files, and pre-tool hooks for 11 popular coding agents, including Claude Code, Codex CLI, and Gemini CLI.
- Team-Shared Graph Artifacts: Supports committing a compressed knowledge graph snapshot to your repository, allowing teammates to skip full re-indexing and accelerate onboarding.
- Comprehensive Security: Ensures trust with SLSA Level 3 cryptographic build provenance, VirusTotal scans on all binaries, Sigstore keyless signatures, and zero runtime dependencies.
- Powerful MCP Tools: Offers 14 specialized tools for architecture overview, semantic search, call graph analysis, dead code detection, cross-service linking, and Cypher-like queries.
Links
- GitHub Repository: DeusData/codebase-memory-mcp
- Research Paper (arXiv): Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP
Source repository
Open the original repository on GitHub.