An offline MCP server that indexes your codebase for semantic search, code search, and git history retrieval.
code-memory is easy to set up with strong trust signals. Check agent compatibility and use-case fit before adding it to your workflow.
gh repo view kapillamba4/code-memory --webOpen the official README and confirm the supported install method.
Add the server entry to your MCP client config.
Restart your agent and verify that the server tools appear.
Code-memory is a tool that helps you find code in your projects without sending data anywhere. It indexes your code locally and lets you search by meaning, not just keywords. You can also search through git history to understand why changes were made.
code-memory is a Model Context Protocol (MCP) server that provides a deterministic, high-precision code intelligence layer for your codebase. It runs entirely offline with zero telemetry and no API key required. The tool indexes your code using AST parsing for structural understanding and sentence-transformers for semantic embeddings. It offers three search tools: search_code for finding definitions and references via BM25 and dense vectors, search_docs for architectural understanding via semantic/fuzzy search, and search_history for git history analysis. The index_codebase tool handles parsing and embedding generation. It supports full AST parsing for Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, Ruby, Kotlin, and fallback indexing for many other languages. Files matching .gitignore are automatically skipped. The tool is designed to save tokens by retrieving precise code snippets instead of entire files, reducing context window usage by up to 50%.
Strong trust signals; still review the README and permissions before production use.
Last commit was about 18 days ago.
41 GitHub stars indicate community interest.
3 open issues signal maintenance load.
MIT license detected.
Quickly find function definitions and references in a large codebase without manual grep.
Understand the architecture and workflow of an unfamiliar project by semantic search.
Debug regressions by searching git history for intent and changes.
Integrate with AI coding assistants to provide relevant context without leaking code.
Index and search personal or proprietary codebases entirely offline.
The first run downloads a ~600MB embedding model from Hugging Face, which requires internet access.
Ensure the tool is run in a trusted environment as it indexes all files not in .gitignore.
41
Stars
10
Forks
3
Issues
MIT
License
Local codebase intelligence CLI and MCP server for AI coding agents with change-safety gates and audit evidence.
Official MCP reference servers from Anthropic. Includes servers for filesystem, GitHub, Postgres, Slack, and more.
An MCP server that transforms large codebases into searchable, hierarchical feature graphs using RAG, AST, and spectral clustering.
2 security/trust notes recorded.
Setup difficulty is 2/5.