Code Memory
Local semantic code search over indexed source, docs, and Git history, with no API key.
- CCM score
- 82 of 100
- GitHub stars
- 50
- tools
- 4
- transport
- STDIO
- env vars
- 2
- last updated
- May 20, 2026
Own this MCP server? Claim it
What it does
- Finds code with
search_code, covering definitions, call graphs, and semantic matches;search_docssearches READMEs, markdown, and docstrings for architecture questions - Traces intent and regressions with
search_history, and builds or refreshes the index withindex_codebase; the server is read-only over the codebase itself - Runs locally over stdio or a shared SSE endpoint, with embeddings from sentence-transformers and a one-time download of about 600MB
- Designed for large repositories where precise retrieval saves context tokens compared with dumping whole files
Tools
4 toolsPublic tool metadata for what this MCP can expose to an agent.
index_codebaseIndexes or re-indexes source files and documentation in the given directory.
Indexes or re-indexes source files and documentation in the given directory.
No parameter schema in public metadata yet.
search_codePerform semantic search and find structural code definitions, locate where functions/classes are defined, or map out dependency references (call graphs).
Perform semantic search and find structural code definitions, locate where functions/classes are defined, or map out dependency references (call graphs).
No parameter schema in public metadata yet.
search_docsUnderstand the codebase conceptually — how things work, architectural patterns, SOPs. Searches markdown documentation, READMEs, and docstrings extracted from code.
Understand the codebase conceptually — how things work, architectural patterns, SOPs. Searches markdown documentation, READMEs, and docstrings extracted from code.
No parameter schema in public metadata yet.
search_historyDebug regressions and understand developer intent through Git history.
Debug regressions and understand developer intent through Git history.
No parameter schema in public metadata yet.
Configuration
CODE_MEMORY_LOG_LEVELLogging verbosity (DEBUG, INFO, WARNING, ERROR)
EMBEDDING_MODELHuggingFace model ID for embeddings
Readme
code-memory
code-memory logoA deterministic, high-precision code intelligence layer exposed as a Model Context Protocol (MCP) server.
- Zero telemetry — your code never leaves your machine
- No API key required — runs entirely locally with sentence-transformers
- 1 min setup — just
uvx code-memoryand you're ready - Token saving by 50% — precise code retrieval instead of dumping entire files
Please help star code-memory if you like this project!
Why code-memory?
Finding the right context from a large codebase is expensive, inaccurate, and limited by context windows. Dumping files into prompts wastes tokens, and LLMs lose track of the actual task as context fills up.
Details
- Repository
- github.com/kapillamba4/code-memory
- Categories
- Developer Tools, Memory & Context
- Package
code-memory- Transport
- STDIO
- Registry
- MCP registry, active
Questions
What does the code-memory MCP server let an agent do?
code-memory gives an agent local semantic code search over an indexed codebase, plus search over Git history. It runs offline and needs no API key. Its tools are index_codebase, search_code, search_docs and search_history.
Does code-memory need an API key or internet access?
No API key is needed, because it runs entirely locally with sentence-transformers. The first run downloads the embedding model, about 600MB, to the Hugging Face cache, and later runs use the cached model.
How do I set up code-memory for Claude Code or Claude Desktop?
Add a server entry named code-memory with command uvx and args code-memory to your MCP host config. The server is published on PyPI as code-memory and uses the stdio transport. Optional variables are CODE_MEMORY_LOG_LEVEL and EMBEDDING_MODEL.
Which other servers lead code-memory in Developer Tools on Claude Marketplaces?
Code-memory sits in the Developer Tools category, alongside Front-End Checklist, Context7, Chrome DevTools MCP, Codebase Memory and Mcp Server Filesystem. It stands out for keeping code local, with zero telemetry and tools that search definitions, docs and Git history separately.
Similar to Code Memory
More Developer ToolsCodebase Memorydeusdata49.3K starsLocal knowledge graph that connects code, docs, and infrastructure for AI coding agents.
Codegraphcodegraph-ai174 starsSemantic code graph over 38 languages, exposing callers, impact analysis, memory, and PR review tools.
CocoIndex Codecocoindex-io3K starsSemantic code search over a local repository, using AST-based chunks and incremental re-indexing.
Devragtomohiro-owada64 starsLocal semantic search over markdown docs, giving Claude Code token-efficient retrieval without reading whole files.
Claude Contextzilliztech12.7K starsSemantic code search over a full codebase, backed by a Zilliz Cloud vector database and OpenAI embeddings.
Codealive Mcpcodealive-ai90 starsSemantic code search and repository analysis over large codebases via CodeAlive's indexed context engine.