kapillamba4 avatar

Code Memory

kapillamba4/code-memory

Runs a local semantic code search engine that exposes three distinct MCP tools: search_code for finding definitions and structure via BM25 and dense vectors, search_docs for architecture queries, and search_history for Git-based debugging. Uses sentence-transformers for embeddings so everything stays offline with no API keys. Supports full AST parsing for Python, JavaScript, TypeScript, Java, Go, Rust, C/C++, Ruby, and Kotlin, with fallback indexing for other languages. Respects .gitignore automatically. The main win is precise retrieval instead of dumping entire files into context, which the author claims cuts token usage by half. Can run as stdio per project or as a shared SSE server to avoid loading the 600MB model multiple times across workspaces.

GitHub stars
41
tools
4
transport
STDIO
env vars
2
last updated
May 20, 2026

Tools

4 tools

Public 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.

Sponsors

Configuration

CODE_MEMORY_LOG_LEVEL

Logging verbosity (DEBUG, INFO, WARNING, ERROR)

EMBEDDING_MODEL

HuggingFace model ID for embeddings

Readme

code-memory

code-memory logo

Zero Telemetry No API Key Offline First

A 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-memory and 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.


View the full README on GitHub

Details

Repository
github.com/kapillamba4/code-memory
Categories
AI & LLM Tools, Developer Tools, Search & Web Crawling
Package
code-memory
Transport
STDIO
Registry
MCP registry, active

More from kapillamba4

Related AI & LLM Tools MCP servers

View all
1roddutra avatarAgent MCP Gatewayroddutra/agent-mcp-gatewayOn-demand tool discovery for all your MCPs and per-subagent MCP controls to preserve context window.41stars
2auscahq avatarAuscaauscahq/auscaPay-per-call APIs and MCP services for agents, no accounts or keys, with verifiable receipts.38stars
3msjsc001 avatarOmniClip RAGmsjsc001/omniclip-ragRead-only local-first MCP server for private Markdown, PDF, and Tika-backed search on Windows.37stars
4skynetcmd avatarM3 Memoryskynetcmd/m3-memoryLocal-first, cloud-friendly memory — 100+ tools, 99.2% LongMemEval-S retrieval@8, hybrid search.30stars
5theagenttimes avatarAgent News by The Agent Timestheagenttimes/agent-newsVerified, sourced, real-time intelligence layer for AI agents.25stars
6alphaonedev avatarAi Memoryalphaonedev/ai-memory-mcpPersistent memory for any AI — zero token cost until recall24stars