Memgit logo

Memgit

Persists AI context in a searchable, project-aware memory store with Git-style history, rollback, syncing, and MCP access.

Install Memgit

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": {
    "memgit": {
      "command": "npx",
      "args": [
        "-y",
        "memgit-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 7 tools correctly (10d ago).

Overview

memgit connects AI assistants to a local, version-controlled memory store that persists across sessions and tools. It searches memories with BM25, prioritizes the active project, and can provide resume context for new sessions. Git-style commits, diffs, logs, rollback, push, and pull operations make memory changes reviewable and recoverable. Reach for it when an assistant needs durable context across projects, sessions, or different MCP-compatible clients.

Use cases

  • Persist project decisions across AI sessions
  • Search only the memories relevant to the active repository
  • Seed memory from an existing codebase with onboarding
  • Review or roll back incorrect assistant context
  • Synchronize shared AI memory through a Git remote

Key features

  • BM25-ranked memory search
  • Project-scoped and global memories
  • Git-style commits, diffs, logs, and rollback
  • Resume digests and Claude Code hooks
  • Repository onboarding and memory import
  • TOON and Git-based synchronization

Tools7

What Memgit lets your agent do. Expand a tool for its parameters.

Verified live~2.9k tokens of context

Security & health

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

ActiveLast checked Today

Recent health check succeeded.

16/16 checks healthy over the last 78d

What it can do

From the 7 tools this server returned when we ran it.

Makes network requests · 3Read-only tools · 7
Network at startup3 connections
Files written at startup30
Install scriptsNone
npm provenanceNot published
Package age123 days
Maintainers1

Observed 2026-11-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · memgit-mcp (npm)

Adoption & maintenance

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

GitHub stars4Stargazers on the source repository.
npm downloads1.2kPackage downloads in the last 30 days.
Last commitTodayMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed7Callable tools this server registers over MCP.

How Memgit works

What memgit does

memgit gives AI assistants persistent context outside an individual chat session. Memories are stored as readable .toon files and organized in a content-addressed object store using SHA-256 identifiers. The data model includes memories, checkpoints, threads, and commits, providing a Git-like history for changes to stored context.

Search uses BM25 ranking to return the most relevant memories instead of loading the entire store. Memories can be associated with a project, and searches, recall injections, and resume information default to the current project family plus explicitly global memories. This helps keep context from unrelated repositories out of an active session.

How it works

The command-line application initializes a store, manages memories, and exposes the store to AI tools through MCP. The documented npx configuration runs memgit-mcp without requiring a separate Python installation. The Python package and platform package options provide the full CLI.

memgit init selects a suitable store location and can offer to import existing Claude Code memories. memgit setup registers the server with supported AI tools, while memgit setup hooks installs Claude Code hooks for automatic session integration. The hooks can add a resume digest at session start, inject BM25 matches for prompts, surface path-related hints, enforce selected rules before tool use, and checkpoint markdown memories asynchronously.

For an existing repository, memgit onboard creates a bounded repository digest from Git history, changed files and directories, authors, branches, tags, manifests, and relevant documentation. That digest can guide an agent in extracting durable project facts into the store.

Setup and configuration

Install with one of these supported approaches:

  • pip install memgit
  • brew tap code4161/tap && brew install memgit on macOS with Homebrew
  • choco install memgit on Windows
  • An MCP client configuration using npx -y memgit-mcp

After installation, run memgit init, then memgit setup. Use memgit stats to inspect memory counts and the estimated or measured context footprint. Existing Claude Code memory directories can be imported later with memgit sync.

Tools and capabilities

  • Search memories using BM25 relevance ranking and top-k results.
  • Save project-scoped or explicitly global memories.
  • Resume work with recent checkpoints, active work, critical memories, and depth hints.
  • Inspect history with commits, logs, and diffs.
  • Roll back incorrect memory state and recover older content.
  • Push a store to a Git remote and share it with teammates.
  • Squash history to control store growth, including stores spanning 10,000 or more sessions.
  • Export and import memory data using TOON and Git-compatible workflows.
  • Review token and context usage with memgit stats.

Limitations and notes

Project isolation is the default. To search across projects, use --all-projects or the equivalent all_projects: true; to target one project, use --project. Memories without a project are global only when explicitly saved that way. If the project cannot be determined during a save, the memory is placed under _unknown until relabeled with memgit doctor --relabel.

Claude Code hooks are optional and can be disabled selectively with flags such as --no-recall, --no-gate, --no-ctx-recall, or --no-guard. The repository also describes context-footprint figures as measured where possible and estimates where labeled, so token savings depend on the contents of a particular store.

Reviews

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

Frequently Asked Questions about Memgit

memgit is an MCP server that connects AI assistants to a local, version-controlled memory store. Its main capabilities include BM25 memory search, saving project-scoped context, resume information, and Git-style history operations such as commits, diffs, rollback, and synchronization across supported AI tools.

Install memgit with pip, Homebrew on macOS, Chocolatey on Windows, or an MCP client configuration that runs `npx -y memgit-mcp`. Then run `memgit init` and `memgit setup` to initialize the store and register it with AI tools.

Yes, memgit is designed to work with Cursor through MCP. The repository also describes use across Claude, Windsurf, and GPT-compatible workflows, with an `npx` configuration for AI tools that support MCP.

memgit filters searches, recall injections, and resume digests to the current project family and explicitly global memories by default. Use `all_projects: true` or `memgit search --all-projects` for a wider search, or specify one project with `--project`.

Yes, memgit can push the memory store to a Git remote with `memgit git init --remote` followed by `memgit git push`. Teammates can clone the repository and run `memgit setup all` to use the shared memory set.

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 PreviewMemgit AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/memgit?style=directory)](https://allmcps.com/mcp/memgit)
HTML Embed
<a href="https://allmcps.com/mcp/memgit"><img src="https://allmcps.com/api/badge/memgit?style=directory" alt="Memgit on AllMCPs" /></a>