# repomemory [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/DanielGuru/repomemory  
**GitHub Stars:** 2  
**npm Downloads (last month):** 463  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/repomemory

## Description
Persistent memory for AI coding agents. Hybrid search, auto-session capture, context routing.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "repomemory": {
    "command": "npx",
    "args": ["-y","repomemory"]
  }
}
```

## Documentation

## What the repomemory MCP server does

The repomemory MCP server gives coding agents a structured knowledge base for a repository. It stores information in `.context/`, with separate areas for facts, decisions, regressions, preferences, sessions, and changelog entries. A generated `index.md` provides quick orientation, while the remaining entries preserve details that would otherwise need to be rediscovered in each session.

Repository context can be supplemented with global developer context. This allows preferences and other information to be available across repositories. Entries are searchable rather than requiring an agent to load the entire knowledge base, and the system can identify stale knowledge for cleanup.

The server is useful when multiple sessions or tools work on the same codebase. It can retain architectural explanations, rejected approaches, known regressions, coding preferences, and summaries of previous AI sessions. It complements instruction files such as `CLAUDE.md` rather than replacing them.

## How it works

The MCP interface exposes seven tools:

- `context_search` combines keyword and semantic search across repository and global context.
- `context_auto_orient` returns an orientation view containing the project index, preferences, recent sessions, and recent changes.
- `context_write` saves an entry and routes it to an appropriate scope, such as repository or global context.
- `context_read` retrieves full content, checking repository context before global context.
- `context_list` browses entries and identifies whether each comes from repository or global scope.
- `context_risk` evaluates modification risk using hotspots, hidden coupling, and bus-factor information.
- `context_delete` removes obsolete knowledge.

Sessions can be captured automatically when an agent shuts down. Git history can also be synchronized into changelog entries, and a post-commit hook can automate that synchronization. The command-line interface includes search, status, diagnostics, risk analysis, dashboard access, global-context management, and setup commands.

## Setup and configuration

Run `npx repomemory go` for the main setup flow. The command establishes a global profile, creates `.context/`, configures Claude Code and Cursor, runs analysis, and prints instructions for `CLAUDE.md`. The interactive `npx repomemory wizard` walks through provider, integration, and first-analysis choices. For Cursor without an external API key, use `npx repomemory setup cursor`; this installs the MCP configuration, Cursor rules, and six slash commands.

A non-interactive setup can use `--yes`, `--defaults`, or `--no-prompt`, for example `npx repomemory go --yes --provider anthropic --embedding-provider gemini --max-files 80`. Repository settings belong in an optional `.repomemory.json` file. Supported options include the analysis provider and model, embedding provider, hybrid-search weighting, maximum files for analysis, global-context enablement, additive ignore patterns, and additive key-file patterns.

Analysis supports Anthropic, OpenAI, Gemini, and Grok providers. Embeddings are optional; Gemini's `text-embedding-004` is the default option, with OpenAI's `text-embedding-3-small` also supported. API keys are needed for provider-based analysis, but Cursor's setup can use Cursor's own AI instead.

## Limitations and notes

The repomemory MCP server depends on local project context and its configured analysis path; it does not replace repository instructions or automatically make every AI tool use the stored knowledge. Provider-based analysis requires a supported API key, while semantic search requires an embedding provider. Cursor is the documented no-external-key workflow.

Custom `ignorePatterns` and `keyFilePatterns` extend the built-in defaults rather than replacing them. Automatic session capture is described for shutdown, and changelog automation requires installing the hook. Risk results are based on the repository's hotspots, coupling, and ownership information, so they should be treated as context for decisions rather than a substitute for code review.

_Full upstream README: https://allmcps.com/mcp/repomemory/readme_

