# io.github.gitmem-dev/gitmem (npm · gitmem-mcp)

Persistent institutional memory for AI coding agents. Memory that compounds.

- Trust score: 62/100 (medium)
- Change this week: +17
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `gitmem-mcp`: 62/100 (this document), [markdown](https://verifymcp.io/servers/gitmem-dev-gitmem/gitmem-mcp.md), [page](https://verifymcp.io/servers/gitmem-dev-gitmem/gitmem-mcp)

## Channel facts

- Registry: `npm`
- Package: `gitmem-mcp`
- Version: `1.2.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 70/100
  - No malware found by supply-chain analysis.
  - CVE check failed: a known high-severity CVE affects uuid 9.0.1, a direct dependency. A fixed version is available.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (96 of 100), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 36 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 65/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 2614 tokens (~124/item across 21 items; 21 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add gitmem-dev-gitmem -- npx -y gitmem-mcp
```

### Codex

```bash
codex mcp add gitmem-dev-gitmem -- npx -y gitmem-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "gitmem-dev-gitmem": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "gitmem-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add gitmem-dev-gitmem --command npx --arg -y --arg gitmem-mcp
```

### Hermes

```yaml
mcp_servers:
  gitmem-dev-gitmem:
    command: "npx"
    args: ["-y", "gitmem-mcp"]
```

### Other

```json
{
  "mcpServers": {
    "gitmem-dev-gitmem": {
      "command": "npx",
      "args": [
        "-y",
        "gitmem-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 62, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 61, +5)

- [security regression] Known CVEs: unverified → fail
- [security regression] Provenance: fail → unverified
- [security regression] Install scripts: pass → unverified
- [security] Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet.
- [functional regression] License: pass → unverified
- [functional regression] Capabilities: pass → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional regression] Maintenance: pass → unverified
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Stability: unverified → 0.23
- [functional] First check of Schema quality: unverified
- [functional] Licence: MIT

### 2026-08-01 (score 56, −5)

- [security regression] Known CVEs: fail → unverified
- [functional regression] Dependency health: partial → unverified

### 2026-07-31 (score 61, +34)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 27, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-27 (score 45)

First indexed and scored.

## MCP tools (21)

### `recall` (~182 tokens)

Check institutional memory for relevant scars before taking action. Returns matching scars and their lessons. Integrates variant assignment when issue_id provided.

Input parameters:

- `issue_id` (string): Linear issue identifier for variant assignment (e.g., 'PROJ-123'). When provided, scars with variants will be randomly assigned and formatted accordingly.
- `match_count` (number): Number of scars to return (default: 3)
- `plan` (string, required): What you're about to do (e.g., 'implement auth layer', 'deploy to production')
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `similarity_threshold` (number): Minimum similarity score (0-1) to include results. Weak matches below threshold are suppressed. Default: 0.4 (free tier BM25), 0.35 (pro tier embeddings).

### `confirm_scars` (~87 tokens)

Confirm 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.

Input parameters:

- `confirmations` (array, required): One confirmation per recalled scar. All recalled scars must be addressed.

### `session_start` (~188 tokens)

Initialize 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.

Input parameters:

- `agent_identity` (string): Override agent identity (auto-detects if not provided)
- `force` (boolean): Force create new session even if one already exists
- `issue_description` (string): Issue description for scar context
- `issue_labels` (array): Issue labels for scar context
- `issue_title` (string): Issue title for scar context
- `linear_issue` (string): Current Linear issue identifier (e.g., PROJ-123)
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.

### `session_refresh` (~116 tokens)

Re-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 the CLI.

Input parameters:

- `project` (string): Project namespace (default: from active session). Free-form string (e.g., 'my-project').

### `session_close` (~228 tokens)

Persist 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 tool with ONLY session_id and close_type. The tool reads the payload file automatically and deletes it after processing. task_completion is auto-generated from closing_reflection timestamps and human_corrections — do NOT write it to the payload. DISPLAY: The result includes a pre-formatted 'display' field. Output the display field verbatim as your response — tool results are collapsed in the CLI.

Input parameters:

- `ceremony_duration_ms` (number): End-to-end ceremony duration from agent perspective (in milliseconds)
- `close_type` (string, required): Type of close (standard requires full reflection)
- `linear_issue` (string): Associated Linear issue
- `session_id` (string, required): Session ID from session_start

### `create_learning` (~277 tokens)

Create 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'.

Input parameters:

- `applies_when` (array): When this pattern applies
- `counter_arguments` (array): Counter-arguments for scars (min 2 required)
- `description` (string, required): Detailed description. Include the architectural/behavioral fact that makes this retrievable by domain.
- `domain` (array): Domain tags
- `keywords` (array): Search keywords
- `learning_type` (string, required): Type of learning
- `problem_context` (string): Problem context (for wins)
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `scar_type` (string): Scar type (process, incident, or context). Defaults to 'process'.
- `severity` (string): Severity level (required for scars)
- `solution_approach` (string): Solution approach (for wins)
- `source_linear_issue` (string): Source Linear issue
- `title` (string, required): Frame as a knowledge discovery — what we now know. Lead with the factual insight, not self-criticism.

### `create_decision` (~141 tokens)

Log architectural/operational decision to institutional memory

Input parameters:

- `alternatives_considered` (array): Alternatives that were rejected
- `decision` (string, required): What was decided
- `docs_affected` (array): Docs/files affected by this decision (relative paths from repo root)
- `linear_issue` (string): Associated Linear issue
- `personas_involved` (array): Personas involved in decision
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `rationale` (string, required): Why this decision was made
- `session_id` (string): Current session ID
- `title` (string, required): Decision title

### `record_scar_usage` (~195 tokens)

Track scar application for effectiveness measurement

Input parameters:

- `acknowledged_at` (string): ISO timestamp when scar was acknowledged
- `agent` (string): Agent identity (e.g., cli, desktop, autonomous)
- `execution_successful` (boolean): Whether the task succeeded after applying scar
- `issue_id` (string): Linear issue UUID
- `issue_identifier` (string): Linear issue identifier (e.g., PROJ-123)
- `reference_context` (string, required): How the scar was applied (1-2 sentences)
- `reference_type` (string, required): How the scar was referenced
- `scar_id` (string, required): UUID of the scar
- `session_id` (string): GitMem session UUID (for non-issue session tracking)
- `surfaced_at` (string, required): ISO timestamp when scar was retrieved
- `variant_id` (string): UUID of the assigned variant from scar_enforcement_variants (for A/B testing)

### `search` (~125 tokens)

Search institutional memory by query. Unlike recall (which is action-oriented), search is exploration-oriented — returns matching scars/wins/patterns without side effects.

Input parameters:

- `learning_type` (string): Filter by learning type
- `match_count` (number): Number of results to return (default: 5)
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `query` (string, required): Natural language search query (e.g., 'deployment failures', 'Supabase RLS')
- `severity` (string): Filter by severity level

### `log` (~112 tokens)

List recent learnings chronologically (like git log). Shows scars, wins, and patterns ordered by creation date.

Input parameters:

- `learning_type` (string): Filter by learning type
- `limit` (number): Number of entries to return (default: 10)
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `severity` (string): Filter by severity level
- `since` (number): Days to look back (e.g., 7 = last week)

### `prepare_context` (~175 tokens)

Generate portable memory payload for sub-agent injection. Formats institutional memory into compact or gate payloads that fit in Task tool prompts.

Input parameters:

- `agent_role` (string): Sub-agent role for relevance filtering (e.g., 'reviewer', 'deployer') — reserved for Phase 3
- `format` (string, required): Output format: full (rich markdown), compact (~500 tokens, one-line per scar), gate (~100 tokens, blocking scars only)
- `max_tokens` (number): Token budget for payload (default: 500 for compact, 100 for gate, unlimited for full)
- `plan` (string, required): What the team is about to do (e.g., 'review auth middleware', 'deploy edge function')
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.

### `absorb_observations` (~76 tokens)

Capture 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.

Input parameters:

- `observations` (array, required): Array of observations from sub-agents/teammates
- `task_id` (string): Linear issue or task identifier (optional)

### `list_threads` (~87 tokens)

List open threads across recent sessions. Shows unresolved work items that carry over between sessions. Use resolve_thread to mark threads as done.

Input parameters:

- `include_resolved` (boolean): Include recently resolved threads (default: false)
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `status` (string): Filter by status (default: open)

### `resolve_thread` (~105 tokens)

Mark an open thread as resolved. Use thread_id for exact match or text_match for fuzzy matching. Updates session state and .gitmem/threads.json.

Input parameters:

- `resolution_note` (string): Brief note explaining how/why thread was resolved
- `text_match` (string): Fuzzy text match against thread descriptions (fallback if no thread_id)
- `thread_id` (string): Thread ID (e.g., "t-a1b2c3d4") for exact resolution

### `create_thread` (~94 tokens)

Create 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.

Input parameters:

- `linear_issue` (string): Associated Linear issue (e.g., PROJ-123)
- `text` (string, required): Thread description — what needs to be tracked or resolved

### `promote_suggestion` (~89 tokens)

Promote 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.

Input parameters:

- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.
- `suggestion_id` (string, required): Suggestion ID (e.g., "ts-a1b2c3d4") from suggested_threads list

### `dismiss_suggestion` (~60 tokens)

Dismiss a suggested thread. Incremented dismiss count — suggestions dismissed 3+ times are permanently suppressed.

Input parameters:

- `suggestion_id` (string, required): Suggestion ID (e.g., "ts-a1b2c3d4") from suggested_threads list

### `cleanup_threads` (~100 tokens)

Triage 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.

Input parameters:

- `auto_archive` (boolean): If true, auto-archive threads that have been dormant for 30+ days
- `project` (string): Project namespace (e.g., 'my-project'). Scopes sessions and searches.

### `health` (~68 tokens)

Show 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.

Input parameters:

- `failure_limit` (number): Max number of recent failures to return (default: 10)

### `gitmem-help` (~21 tokens)

gitmem-help - Show available commands with ASCII art header

### `archive_learning` (~88 tokens)

Archives 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.

Input parameters:

- `id` (string, required): UUID of the learning to archive
- `reason` (string): Optional reason for archiving (e.g., 'superseded by PROJ-123', 'no longer relevant')

## Diagnostics

Captured diagnostic sections: Provenance, Vulnerabilities, Dependencies. The full working is on the page: https://verifymcp.io/servers/gitmem-dev-gitmem/gitmem-mcp#diagnostics

## Score history

- 2026-08-03: 62
- 2026-08-02: 61
- 2026-08-01: 56
- 2026-07-31: 61
- 2026-07-30: 27
- 2026-07-28: 45
- 2026-07-27: 45

## Links

- npm package: https://www.npmjs.com/package/gitmem-mcp
- Socket report: https://socket.dev/npm/package/gitmem-mcp
- Repository: https://github.com/gitmem-dev/gitmem
- Changelog RSS feed: https://verifymcp.io/servers/gitmem-dev-gitmem/gitmem-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/gitmem-dev-gitmem/gitmem-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/gitmem-dev-gitmem/gitmem-mcp
