Developer builds local MCP memory layer to cut AI context costs in coding sessions

A developer has built an open-source tool called zerikai_memory to solve the recurring problem of re-establishing project context at the start of every AI coding session, which wastes tokens and increases API costs. The tool runs as a memory layer behind Claude Desktop via the Model Context Protocol (MCP), storing indexed project knowledge locally rather than relying on the AI's context window. It uses Tree-Sitter to parse source files into Concrete Syntax Trees without any LLM inference, supporting Python, JavaScript, TypeScript, HTML, and Markdown. A multi-stage retrieval pipeline — combining vector search, lexical re-ranking, and source citations — ensures only the most relevant context is surfaced to the IDE or chat session. The system supports fully local operation via Ollama, cloud mode via DeepSeek, or a hybrid setup, and is designed to keep API bills manageable while preserving session continuity.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in