Repomemory logo

Repomemory

Persistent, searchable repository context for AI coding agents with hybrid search, session capture, and risk analysis.

Install Repomemory

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "repomemory": {
      "command": "npx",
      "args": [
        "-y",
        "repomemory"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y repomemory

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The repomemory MCP server gives AI coding agents persistent memory stored in a repository's .context directory and optional global context. It provides tools for hybrid keyword and semantic search, orientation, reading and writing knowledge, risk assessment, listing, and deletion. Setup can configure Claude Code or Cursor, while repository analysis and embeddings can use supported AI providers. Reach for it when agents need to retain architecture facts, decisions, regressions, preferences, and session summaries across work sessions.

Use cases

  • Preserve architecture decisions across coding sessions
  • Search repository and global developer context
  • Record regressions and prevent repeated fixes
  • Orient agents before making code changes
  • Assess risk for files or repository areas

Key features

  • Hybrid keyword and semantic context search
  • Automatic session summaries on shutdown
  • Repository and global context routing
  • Risk assessment for hotspots and coupling
  • Git history synchronization to changelog entries
  • MCP setup for Claude Code and Cursor

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 112d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · repomemory (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads463Package downloads in the last 30 days.
Last commit7mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Repomemory works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Repomemory

repomemory is an MCP server that connects AI coding agents to a repository’s .context knowledge base and optional global developer context. Its main tools are context_search, context_auto_orient, context_write, context_read, context_list, context_risk, and context_delete, supporting searchable memory, orientation, writing, risk assessment, browsing, and cleanup.

Run `npx repomemory go` for the main setup flow. It creates `.context/`, configures Claude Code and Cursor, runs analysis, and provides instruction text. You can use `npx repomemory wizard` for guided setup or `npx repomemory setup cursor` for Cursor-specific configuration.

Yes, repomemory works with Cursor without requiring an external API key. Run `npx repomemory setup cursor` to install the MCP configuration, rules, and six slash commands, then run `/repomemory-analyze` in Cursor chat.

API keys are required for provider-based repository analysis, not for the documented Cursor workflow. Supported providers use Anthropic, OpenAI, Gemini, or Grok keys, and optional semantic search can use Gemini or OpenAI embeddings.

repomemory can capture session summaries automatically when an agent shuts down. Agents can also use `context_write` to save facts, decisions, regressions, or other entries, while the CLI can synchronize Git history into changelog context.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRepomemory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/repomemory?style=directory)](https://allmcps.com/mcp/repomemory)
HTML Embed
<a href="https://allmcps.com/mcp/repomemory"><img src="https://allmcps.com/api/badge/repomemory?style=directory" alt="Repomemory on AllMCPs" /></a>