repomemory
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@repomemoryfind recent JWT auth failures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
After RepoMemory
Claude fails
RepoMemory captures why
Codex recalls context
Codex succeeds
Demo
# Claude's session: refactoring fails
repomemory capture git-diff --agent claude
repomemory capture test --output "..." --status fail --agent claude
repomemory capture decision --message "Auth middleware needs JWT validation" --agent claude
# Switch to Codex: full context automatically
repomemory recall src/middleware/auth.ts
# โ Recent failures: JWT validation missing in auth middleware
# โ Decision: needs JWT validation before route handlers
# โ Related files: src/routes/api.ts, src/config/jwt.ts# Daily usage
repomemory init
repomemory capture git-diff --agent codex --files src/middleware/auth.ts
repomemory search "jwt validation" --file src/middleware/auth.tsRelated MCP server: AIVectorMemory
Features
๐ง Repo-aware memory graph backed by SQLite
๐ Cross-agent continuity (Claude, Codex, Cursor, OpenHands)
๐งฉ MCP server for in-session memory retrieval
๐ File-level recall with related-file discovery
๐งช Failure-aware capture from tests and terminal logs
๐ฟ Git-aware capture of diff and commit history
โก Fast local-first search and recall
๐ฆ Portable exports (
jsonorsqlite)
Quick Start
npm i -g repomemory
repomemory init
repomemory serveAlternative (no global install):
npx repomemory init
npx repomemory capture git-diff --agent codex
npx repomemory recall src/index.tsMCP Integration
Use RepoMemory from any MCP client:
{
"mcpServers": {
"repomemory": {
"command": "npx",
"args": ["repomemory", "serve"]
}
}
}Compatible with:
Cursor
Claude Desktop
VS Code
Any MCP-compatible client
Available MCP Tools
Tool | What it does | Typical prompt |
| Search memory entries by query/filter | "Find recent JWT auth failures" |
| Explain rationale behind file changes | "Why was middleware order changed?" |
| List recent failed attempts | "What already failed in this area?" |
| Return consolidated file context | "Load context before I edit" |
| Find files changed together | "What neighboring files matter here?" |
| Write a memory entry | "Save this decision" |
| Show memory activity and volume | "How much memory is captured?" |
How It Works
graph TB
A[Agent Session] --> B[Capture]
B --> C[Memory Graph - SQLite]
C --> D[MCP Server]
D --> E[Next Agent Session]
B --> B1[git diff/commit]
B --> B2[test results]
B --> B3[terminal logs]
B --> B4[PR reviews]
B --> B5[decisions]Operational flow:
Capture signals from active coding sessions.
Normalize into structured memory entries.
Persist entries and file relations in SQLite.
Expose retrieval through CLI and MCP tools.
Reuse context in the next agent session.
CLI Reference
repomemory init
Initializes .repomemory/ and local SQLite database.
Usage:
repomemory init
repomemory init --forceNotes:
Run once per repository.
--forcerecreates storage.
repomemory capture <type>
Captures a memory entry for a source event.
Supported capture types:
git-diffgit-committerminaltestdecision
Common options:
--agent <name>--message <text>--files <paths...>--tags <tags...>
Examples:
repomemory capture git-diff --agent claude
repomemory capture decision --message "Validate JWT before route handlers" --files src/middleware/auth.ts
repomemory capture terminal --message "vitest auth suite failing" --tags failure auth
repomemory capture git-commit --agent codex --tags releaserepomemory search <query>
Searches memory entries.
Filters:
--type <type>--agent <agent>--file <path>--limit <n>(default:20)--since <date>(ISO-8601)
Examples:
repomemory search "jwt" --file src/middleware/auth.ts --agent codex --limit 10
repomemory search "failing snapshot" --type test --since 2026-01-01
repomemory search "rate limit" --agent clauderepomemory recall <file>
Recalls context for a target file.
Options:
--depth <n>(default:10)--format <text|json>(default:text)
Examples:
repomemory recall src/middleware/auth.ts
repomemory recall src/middleware/auth.ts --depth 15
repomemory recall src/middleware/auth.ts --format jsonTypical output includes:
Recent failures
Related decisions
File relationships
Session breadcrumbs
repomemory serve
Starts the MCP server.
Options:
--transport <stdio|sse>(default:stdio)--port <n>for SSE mode (default:3000)
Examples:
repomemory serve
repomemory serve --transport sse --port 4317repomemory export
Exports captured memory.
Options:
--format <json|sqlite>(default:json)--output <path>
Examples:
repomemory export --format json --output ./repomemory-export.json
repomemory export --format sqlite --output ./repomemory-export.dbrepomemory stats
Shows repository memory stats.
Usage:
repomemory statsArchitecture
RepoMemory uses a local-first, layered design.
Capture Layer
Captures and structures:
Git diffs/commits
Test outcomes
Terminal commands
PR/issue review context
Engineering decisions
Memory Layer
Persists normalized records in SQLite tables:
entriesentry_filessessionsfile_relations
Retrieval Layer
Supports:
Full-text search
File-centric recall
Recent failure discovery
Decision/rationale lookup
Related-file traversal
MCP Layer
Exposes memory operations as MCP tools for agent workflows.
Use Cases
Multi-agent handoffs in a single repository
Long-running refactors over multiple sessions
Preventing repeated test failures after context switches
Preserving review rationale after merges
Building an auditable memory trail for AI-assisted engineering
Why RepoMemory
Reduces repeated mistakes across sessions
Speeds up agent handoffs
Improves consistency of engineering decisions
Keeps context local and portable
Development
npm install
npm run typecheck
npm test
npm run buildNode.js 20+ required.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md before opening a PR.
License
MIT ยฉ 2026 Lay4U. See LICENSE.
Star CTA
If RepoMemory helped you avoid repeated failures across sessions, star the project. It helps more teams discover practical, persistent memory for coding agents. Stop repeating the same mistakes across agent sessions.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lay4U/repomemory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server