Memtrace Codebase Memory
Memtrace is a persistent memory layer for coding agents, built as a bi‑temporal structural knowledge graph over your codebase (AST‑driven symbols and relationships, plus temporal evolution and cross‑service API topology)
What is Memtrace Codebase Memory?
Memtrace Codebase Memory is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to memtrace is a persistent memory layer for coding agents, built as a bi‑temporal structural knowledge graph over your codebase (ast‑driven symbols and relationships, plus temporal evolution and cross‑s...
Memtrace is a persistent memory layer for coding agents, built as a bi‑temporal structural knowledge graph over your codebase (AST‑driven symbols and relationships, plus temporal evolution and cross‑service API topology)
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Memtrace is a persistent memory layer for coding agents, bui
Use Cases
Maintainer
Works with
Installation
NPM
npx -y memtraceManual Installation
npx -y memtraceConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Memtrace Codebase Memory
Memtrace provides a persistent, bi-temporal structural memory layer for AI coding agents by building a knowledge graph of AST-derived symbols, their relationships, and their full version history over your codebase. It exposes 25+ MCP tools covering semantic and exact code search, caller/callee relationship analysis, blast-radius impact analysis, dead code detection, cyclomatic complexity measurement, API topology mapping, and temporal evolution queries — all without any LLM calls for retrieval. It integrates automatically with Claude Code, Cursor, Codex, Windsurf, VS Code Copilot, Hermes, OpenCode, and Kiro.
Prerequisites
- Node.js 18 or higher (LTS recommended)
- Git installed and accessible in PATH (required for temporal/evolution analysis)
- At least 8 GB RAM (16-32 GB recommended for large monorepos)
- 5 GB free disk space for the graph database
- An MCP-compatible coding agent: Claude Code, Cursor, Codex, Windsurf, VS Code, Hermes, OpenCode, or Kiro
Install Memtrace globally via npm
Installing globally makes the memtrace command available for the installer and for running the MCP server process.
npm install -g memtraceRun the automatic multi-editor installer
The install command auto-detects supported editors on your system and configures MCP settings, skills files, and indexing guidance for each one.
memtrace installAdd to your MCP configuration manually
For editors not auto-detected (Cline, Roo Code, or custom setups), add this block to your MCP config file.
{
"mcpServers": {
"memtrace": {
"command": "memtrace",
"args": ["mcp"],
"env": {}
}
}
}Index your codebase
Ask your agent to index the project directory. Memtrace parses source files into AST symbols, resolves cross-file references, and builds the bi-temporal graph. This is the starting point for all subsequent queries.
(Optional) Enable live incremental indexing
Activate the watch_directory tool to keep the graph current as you make changes, so agents always work with up-to-date relationship data.
(Optional) Opt out of telemetry
Memtrace collects anonymous usage statistics by default. Disable this with the MEMTRACE_TELEMETRY environment variable.
export MEMTRACE_TELEMETRY=offMemtrace Codebase Memory Examples
Client configuration (Claude Code)
MCP server configuration block for Claude Code or Claude Desktop.
{
"mcpServers": {
"memtrace": {
"command": "memtrace",
"args": ["mcp"],
"env": {
"MEMTRACE_TELEMETRY": "off"
}
}
}
}Prompts to try
Natural language queries that trigger Memtrace's MCP tools automatically through the agent's skill system.
- "Index this project so you can answer questions about the codebase."
- "Find where the UserRepository class is defined and show its dependencies."
- "Who calls the processPayment function? Show the full call chain."
- "If I change the AuthMiddleware, what else might break?"
- "Find all dead code — functions that are never called."
- "Show me the HTTP API endpoints across all services in this monorepo."Troubleshooting Memtrace Codebase Memory
Indexing stalls or process runs out of memory
Large codebases need 16+ GB RAM. Try indexing a specific subdirectory first with the index_directory tool rather than the entire repo root.
Evolution and timeline tools return empty results
These tools require full Git history. If you cloned with --depth, re-clone with full history: 'git fetch --unshallow'. Also ensure the Git executable is in PATH.
After 'memtrace install', the agent does not see the MCP server
Restart your editor completely after install. If the editor is still not detected, add the server manually to your MCP config file and verify with 'memtrace mcp --help'.
Frequently Asked Questions about Memtrace Codebase Memory
What is Memtrace Codebase Memory?
Memtrace Codebase Memory is a Model Context Protocol (MCP) server that memtrace is a persistent memory layer for coding agents, built as a bi‑temporal structural knowledge graph over your codebase (ast‑driven symbols and relationships, plus temporal evolution and cross‑service api topology) It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Memtrace Codebase Memory?
Install via npm with the command: npx -y memtrace. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Memtrace Codebase Memory?
Memtrace Codebase Memory works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Memtrace Codebase Memory free to use?
Yes, Memtrace Codebase Memory is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Memtrace Codebase Memory Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Memtrace Codebase Memory? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Memtrace Codebase Memory in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Memtrace Codebase Memory?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.