Gitmem MCP server
io.github.gitmem-dev/gitmem·v1.2.1·9 starsPersistent institutional memory for AI coding agents. Memory that compounds.
9 stars988 downloads/wk
Reviews
Write oneNobody has reviewed Gitmem yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Gitmem tools (79, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
absorb_observationsCapture observations from sub-agents and teammates. The lead agent parses findings from sub-agent responses, then calls this to persist and analyze them. Identifies scar candidates.
analyzeSession analytics and insights engine. Returns formatted markdown by default. Use format=json for raw data.
archive_learningArchives a learning (scar/win/pattern) by setting is_active=false and recording archived_at timestamp. Archived learnings are excluded from recall and search results but preserved for audit trail.
cleanup_threadsTriage open threads by lifecycle health. Groups threads as active/cooling/dormant with vitality scores. Use auto_archive=true to archive threads dormant 30+ days. Review and resolve stale threads to keep your thread list healthy.
confirm_scarsConfirm surfaced scars with APPLYING/N_A/REFUTED decisions and evidence. REQUIRED after recall() before consequential actions. Each recalled scar must be addressed. APPLYING: past-tense evidence of compliance. N_A: explain why scar doesn't apply. REFUTED: acknowledge risk of overriding.
create_decisionwrite actionLog architectural/operational decision to institutional memory
create_learningwrite actionCreate scar, win, or pattern entry in institutional memory. Frame as 'what we now know' — lead with the factual/architectural discovery, not what went wrong. Good: 'Fine-grained PATs are scoped to one resource owner'. Bad: 'Should have checked PAT type first'.
create_threadwrite actionCreate an open thread to track unresolved work across sessions. Includes semantic dedup: if a similar open thread exists (cosine similarity > 0.85), returns the existing thread instead. Check the 'deduplicated' field in the response.
dismiss_suggestionDismiss a suggested thread. Incremented dismiss count — suggestions dismissed 3+ times are permanently suppressed.
get_transcriptRetrieve a session transcript from storage
gitmem-algitmem-al (archive_learning) - Archive a scar/win/pattern (sets is_active=false)
gitmem-analyzegitmem-analyze (analyze) - Session analytics. Returns formatted markdown by default.
gitmem-aogitmem-ao (absorb_observations) - Capture sub-agent/teammate observations
gitmem-cache-flushgitmem-cache-flush - Force reload cache from Supabase (use when out of sync)
gitmem-cache-healthgitmem-cache-health - Compare local cache against remote Supabase (detect out-of-sync)
gitmem-cache-statusgitmem-cache-status - Show local search cache status (scar count, age, staleness)
gitmem-cdgitmem-cd (create_decision) - Log architectural/operational decision
gitmem-clgitmem-cl (create_learning) - Create scar/win/pattern. Frame as 'what we now know' — factual discovery, not self-criticism.
gitmem-cleanupgitmem-cleanup (cleanup_threads) - Triage threads by lifecycle health
gitmem-csgitmem-cs (confirm_scars) - Confirm recalled scars with APPLYING/N_A/REFUTED decisions
gitmem-ctgitmem-ct (create_thread) - Create an open thread with semantic dedup (cosine > 0.85 blocks duplicates)
gitmem-dsgitmem-ds (dismiss_suggestion) - Dismiss a suggested thread
gitmem-graphgitmem-graph (graph_traverse) - Traverse knowledge graph over institutional memory triples
gitmem-gtgitmem-gt (get_transcript) - Retrieve session transcript from storage
gitmem-healthgitmem-health (health) - Show write health for fire-and-forget operations this session
gitmem-helpgitmem-help - Show available commands with ASCII art header
gitmem-loggitmem-log (log) - List recent learnings chronologically
gitmem-ltgitmem-lt (list_threads) - List open threads across sessions
gitmem-pcgitmem-pc (prepare_context) - Generate portable memory payload for sub-agent injection
gitmem-psgitmem-ps (promote_suggestion) - Promote a suggested thread to an open thread
gitmem-rgitmem-r (recall) - Check institutional memory for relevant scars before taking action
gitmem-rsgitmem-rs (record_scar_usage) - Track scar application for effectiveness measurement
gitmem-rsbgitmem-rsb (record_scar_usage_batch) - Track multiple scars in batch (reduces latency)
gitmem-rtgitmem-rt (resolve_thread) - Mark a thread as resolved
gitmem-scgitmem-sc (session_close) - Close session with compliance validation. IMPORTANT: Write all heavy payload data (closing_reflection, task_completion, human_corrections, scars_to_record, open_threads, decisions, learnings_created) to {gitmem_dir}/closing-payload.json BEFORE calling this tool — gitmem_dir is from session_start. Only pass session_id and close_type inline. DISPLAY: The result includes a
gitmem-searchgitmem-search (search) - Search institutional memory by query (exploration, no side effects)
gitmem-srgitmem-sr (session_refresh) - Refresh institutional context for the active session without creating a new session. DISPLAY: The result includes a pre-formatted 'display' field. Output the display field verbatim as your response — tool results are collapsed in the CLI.
gitmem-ssgitmem-ss (session_start) - Initialize session with institutional context. DISPLAY: The result includes a pre-formatted 'display' field. Output the display field verbatim as your response — tool results are collapsed in the CLI.
gitmem-stgitmem-st (save_transcript) - Save session transcript to storage
gitmem-stxgitmem-stx (search_transcripts) - Semantic search over transcript chunks
gm-absorbgm-absorb (absorb_observations) - Capture sub-agent observations
gm-analyzegm-analyze (analyze) - Session analytics. Returns formatted markdown by default.
gm-archivegm-archive (archive_learning) - Archive a scar/win/pattern
gm-cache-fgm-cache-f (cache_flush) - Force reload cache from Supabase
gm-cache-hgm-cache-h (cache_health) - Compare local cache against remote Supabase (detect out-of-sync)
gm-cache-sgm-cache-s (cache_status) - Show local search cache status (scar count, age, staleness)
gm-cleanupgm-cleanup (cleanup_threads) - Triage threads by health
gm-closegm-close (session_close) - Close a GitMem session. IMPORTANT: Write all heavy payload data (closing_reflection, task_completion, human_corrections, scars_to_record, open_threads, decisions, learnings_created) to {gitmem_dir}/closing-payload.json BEFORE calling this tool — gitmem_dir is from session_start. Only pass session_id and close_type inline. DISPLAY: The result includes a pre-formatted 'dis
gm-confirmgm-confirm (confirm_scars) - Confirm recalled scars with APPLYING/N_A/REFUTED
gm-dismissgm-dismiss (dismiss_suggestion) - Dismiss a suggested thread
gm-graphgm-graph (graph_traverse) - Traverse knowledge graph
gm-healthgm-health (health) - Show write health for fire-and-forget operations
gm-loggm-log (log) - List recent learnings chronologically
gm-opengm-open (session_start) - Open a GitMem session and load institutional context. DISPLAY: The result includes a pre-formatted 'display' field. Output the display field verbatim as your response — tool results are collapsed in the CLI.
gm-pcgm-pc (prepare_context) - Generate portable memory payload for sub-agents
gm-promotegm-promote (promote_suggestion) - Promote a suggested thread
gm-refreshgm-refresh (session_refresh) - Refresh context for the active session without creating a new one. DISPLAY: The result includes a pre-formatted 'display' field. Output the display field verbatim as your response — tool results are collapsed in the CLI.
gm-resolvegm-resolve (resolve_thread) - Resolve a thread
gm-scargm-scar (create_learning) - Create a scar/win/pattern. Frame as 'what we now know' — factual discovery, not self-criticism.
gm-searchgm-search (search) - Search institutional memory by query
gm-stxgm-stx (search_transcripts) - Semantic search over transcript chunks
gm-thread-newgm-thread-new (create_thread) - Create an open thread with semantic dedup
gm-threadsgm-threads (list_threads) - List open threads
graph_traverseTraverse the knowledge graph over institutional memory triples. Answers: 'show me everything connected to this issue', 'what did this agent produce', 'trace this decision back', 'which issues produced the most learnings'. Four lenses: connected_to, produced_by, provenance, stats.
healthShow write health for the current session. Reports success/failure rates for all tracked fire-and-forget operations (metrics, cache, triple writes, embeddings, scar usage). Use this to diagnose silent failures.
list_threadsList open threads across recent sessions. Shows unresolved work items that carry over between sessions. Use resolve_thread to mark threads as done.
logList recent learnings chronologically (like git log). Shows scars, wins, and patterns ordered by creation date.
prepare_contextGenerate portable memory payload for sub-agent injection. Formats institutional memory into compact or gate payloads that fit in Task tool prompts.
promote_suggestionPromote a suggested thread to an open thread. Takes a suggestion_id from session_start's suggested_threads list and creates a real thread from it.
recallCheck institutional memory for relevant scars before taking action. Returns matching scars and their lessons. Integrates variant assignment when issue_id provided.
record_scar_usageTrack scar application for effectiveness measurement
record_scar_usage_batchTrack multiple scar applications in a single batch operation (reduces session close latency)
resolve_threadMark an open thread as resolved. Use thread_id for exact match or text_match for fuzzy matching. Updates session state and .gitmem/threads.json.
save_transcriptSave full session transcript to storage for training data and post-mortems
searchSearch institutional memory by query. Unlike recall (which is action-oriented), search is exploration-oriented — returns matching scars/wins/patterns without side effects.
search_transcriptsSemantic search over session transcript chunks. Generates embedding for query and calls match_transcript_chunks RPC to find relevant conversation fragments across all indexed sessions.
session_closePersist session with compliance validation. IMPORTANT: Before calling this tool, write all heavy payload data (closing_reflection, human_corrections, scars_to_record, open_threads, decisions, learnings_created) to {gitmem_dir}/closing-payload.json using your file write tool — the gitmem_dir path is returned by session_start (also shown in session start display as 'Payload path'). Then call this to
session_refreshRe-surface institutional context (threads, decisions) for the current active session without creating a new session. Use mid-session when you need to remember where you left off, after context compaction, or after a long gap. DISPLAY: The result includes a pre-formatted 'display' field visible in the tool result. Output the display field verbatim as your response — tool results are collapsed in th
session_startInitialize session, detect agent, load institutional context (last session, recent decisions, open threads). Scars surface on-demand via recall(). DISPLAY: The result includes a pre-formatted 'display' field visible in the tool result. Output the display field verbatim as your response — tool results are collapsed in the CLI.
Public scan report
scanner v0.1.10 · 2026-09-28 · same rubric, same numbers if you re-run it
- Code scan191 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 5 days ago15/15
- Maintainer identityregistry namespace matches repository owner7/10
How Gitmem compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 82/100
- higher than 63% of 48,255 servers
- Tools
- 79
- the typical server has 7
- Tools that change things
- 4%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 9
- more than 87% of 28,688 servers
- Downloads a week
- 988
- more than 95% of 12,191 servers with a package
What its tools let an agent do: 74 read · 4 create · 1 delete
Install Gitmem in Claude Code, Cursor or VS Code
Runs npx -y gitmem-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add gitmem -- npx -y gitmem-mcp
What the publisher says
From the Gitmem repository's README, as published. We do not edit it. Read it on GitHub
= 18" />
Documentation · npm · Getting Started · Tool Reference
GitMem is an MCP server that gives your AI coding agent persistent learning memory across agent sessions. It remembers mistakes (scars), successes (wins), and decisions — so your agent learns from experience instead of starting from scratch every time.
What's MCP? Model Context Protocol is how AI coding tools connect to external capabilities. GitMem is an MCP server — install it once and your agent gains persistent memory.
Works with Claude Code, Cursor, VS Code (Copilot), Windsurf, and any MCP-compatible client.
Quick Start
npx gitmem-mcp initOne command. The wizard auto-detects your IDE and sets up everything:
- .gitmem/ directory with starter scars
- MCP server config (.mcp.json, .vscode/mcp.json, .cursor/mcp.json, etc.)
- Instructions file (CLAUDE.md, .cursorrules, .windsurfrules, .github/copilot-instructions.md)
- Lifecycle hooks (where supported)
- .gitignore updated
Already have existing config? The wizard merges without destroying anything. Re-running is safe.
npx gitmem-mcp init --yes # Non-interactive
npx gitmem-mcp init --dry-run # Preview changes
npx gitmem-mcp init --client vscode # Force specific clientHow It Works
recall --> work --> learn --> close --> recall --> ...- Recall — Before acting, the agent checks memory for relevant lessons from past sessions
- Work — The agent does the task, applying past lessons automatically
- Learn — Mistakes become scars, successes become wins, strategies become patterns
- Close — Session reflection persists context for next time
Every scar includes counter-arguments — reasons why someone might reasonably ignore it. This prevents memory from becoming a pile of rigid rules.
What Gets Remembered
Key Features
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Gitmem: common questions
- Is Gitmem MCP server safe?
- Mostly: it is graded B (82/100). Read the Gitmem safety report
- How do I install Gitmem?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Gitmem need an API key?
- Yes. The registry entry asks for
SUPABASE_SERVICE_ROLE_KEY. - Is Gitmem maintained?
- The last commit was 42 days ago (2026-09-23). The latest release is v1.2.1.
- What can I use instead of Gitmem?
- Servers from other publishers that do the same job: Deja Vu MCP server, State Memory MCP server and Knowl MCP server. Compare all Gitmem alternatives.
- How does Gitmem compare with other MCP servers?
- safety score 82/100 (higher than 63% of 48,255 servers); tools 79 (the typical server has 7); tools that change things 4% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Gitmem
Same job from other publishers: the closest match first, then the best rated.
- Deja Vudeja-vu: local memory over the session histories of forty-three coding agents.not reviewedEstablishedA
State Memory MCPPersistent workflow graph server tracking tasks, decisions, spatial entities, and blockers.not reviewedEstablishedA
KnowlPersistent memory for AI agents, for code, research and everyday life. Stale facts retire.not reviewedEstablishedA