# Claude Amplifier

> Persistent memory + decision tracking for Claude across sessions. Local SQLite, no cloud.

- **Type:** MCP server
- **Install:** `agentstack add mcp-sisuthros-claude-amplifier`
- **Verified:** Pending review
- **Seller:** [Sisuthros](https://agentstack.voostack.com/s/sisuthros)
- **Installs:** 0
- **Latest version:** 1.5.3
- **License:** MIT
- **Upstream author:** [Sisuthros](https://github.com/Sisuthros)
- **Source:** https://github.com/Sisuthros/claude-amplifier
- **Website:** https://www.npmjs.com/package/claude-amplifier

## Install

```sh
agentstack add mcp-sisuthros-claude-amplifier
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Claude Amplifier

[](https://www.npmjs.com/package/claude-amplifier)
[](https://opensource.org/licenses/MIT)
[](https://www.npmjs.com/package/claude-amplifier)
[](https://modelcontextprotocol.io)
[](https://glama.ai/mcp/servers/Sisuthros/claude-amplifier)

> Persistent memory for Claude that doesn't lie to itself.
> Write-verification, stale-memory detection, Pattern Oracle, verification-gated lessons —
> so unverified guesses can't quietly become "memories" Claude treats as facts,
> and so fake "id: 1fd61c52af06f2bd" success messages can't paper over silent failures.

### A real five-minute story (v1.4.0 origin)

A week ago, Claude told me an agent runtime config was broken because the model name had another provider's prefix substring in it. The fix worked. I let Claude write that down as a lesson.

A week later — different session, different model, similar config — Claude "remembered" the fix and applied it again. Except the *real* problem this time was a TPM cap. Claude never tested its theory; it just trusted last week's confidently-recorded fix. I lost two hours.

That's the bug. It's [filed as `anthropics/claude-code#27430`](https://github.com/anthropics/claude-code/issues/27430). It happens to everyone who lets Claude keep notes across sessions. **An inference becomes a memory. The memory becomes a "fact." The fact never gets verified.**

### A second five-minute story (v1.5.0 origin)

A different session, weeks later. Claude reported back: *"Decision recorded (id: 1fd61c52af06f2bd). Lesson recorded (id: 04371350ec263822)."* Five decisions, eight lessons, all with crisp hex IDs. Felt great.

Next morning, I asked Claude to recall any of them. **None existed.** The MCP tool calls had failed silently — bad arguments, transient SQLite hiccups — and Claude had hallucinated the IDs to match the success-message template. The earlier session went to bed thinking it had captured a tier-jump's worth of context. Reality: the database was untouched.

That's a different bug, in the same family: **state-out-of-sync between what Claude believes it did and what actually got persisted.** Hallucinated IDs look identical to real IDs to the model that wrote them.

Claude Amplifier **v1.5.0** fixes this *structurally too*. Every `addLesson` and `addDecision` re-reads the row from SQLite before returning. If the follow-up SELECT comes back empty, storage throws a typed `AmplifierWriteError`, the MCP tool returns `ERROR: Lesson NOT recorded. Do not claim this was saved.`, and an audit line lands in `~/.claude-amplifier/write-errors.jsonl`. The "I saved it!" lie is no longer possible.

`amplify_context_load` now also warns when `~/.claude/memory/.md` files are newer than the latest Amplifier write — catching the *other* shape of memory drift, where the session did real work in another logging surface but never recorded a lesson or decision for it.

---

Both bugs share a shape: **Claude lies confidently about its own state.** Verification-gated memory (v1.4.0) catches it on the *content* side. Write-verification + stale-memory detection (v1.5.0) catches it on the *storage* side. Pattern Oracle (v1.4.0) keeps using the now-trustworthy memory to warn before the next mistake.

Claude Amplifier (v1.5.1) treats every lesson as living at one of three statuses:

```
claim (0.5 confidence)   →   evidence (0.7)   →   confirmed (1.0)
```

A guess starts as a `claim` and weighs **5× less** than a `confirmed` lesson when the Pattern Oracle scores risk. To promote, you attach evidence: `git_commit`, `test_run`, `user_confirmation`, `external_doc`, `manual_review`. Two distinct evidence types auto-promote a claim to `confirmed`. Without evidence, the guess stays a guess — and stays quiet.

The Pattern Oracle runs *before* each task, scans your stored lessons + active decisions, and surfaces the top matches with their risk score and verification status. You see the receipts; Claude sees the receipts; nothing gets treated as gospel just because it got written down once.

### Demo

```
$ claude-amplifier preflight --project demo \
    --task "Configure agent endpoint with vendor-a/vendor-b/model-x"

🟠 HIGH RISK   score 4.20   evidence: STRONG

Matched patterns (3):
  • [confirmed] Avoid model names containing another provider's prefix
    seen 3× across 2 projects, severity: critical
  • [confirmed] Read /v1/models before configuring fallback chains
    seen 5× across 3 projects, severity: high
  • [confirmed] Heartbeat needs TPM >= 30k
    seen 2×, severity: high

Suggested approach: The 'vendor-b/' substring is parsed as vendor-b at
startup but routed as vendor-a at runtime — every heartbeat returns
"Invalid API Key". Try 'vendor-a/model-x' instead.
```

A 45-second asciinema cast of the full claim → evidence → confirmed loop lives in [`demo/`](./demo/). Render it locally with `agg amplifier-demo.cast amplifier-demo.gif` once you've recorded the cast — see [`demo/README.md`](./demo/README.md).

---

Claude is brilliant inside one conversation and **shockingly oblivious** across sessions. Claude Amplifier is an [MCP](https://modelcontextprotocol.io) server that gives Claude persistent memory in a local SQLite database — decisions you've made, lessons you've learned, patterns you keep tripping over — so the next session starts where the last one left off.

---

## The problem

These are real moments. They happen to everyone who uses Claude regularly:

> 💤 **Claude told me to *"get some sleep"* — at 6 PM.** I had just come home from work. The previous session had run from 02:00 to 06:00 and Claude assumed the conversation was continuous.

> 🗃️ **Claude keeps suggesting MongoDB.** We switched to Postgres three months ago. I've explained why four times this week.

> 🪓 **Claude `rm -rf`'d a directory it thought was in `/tmp`.** It was the project root. The pwd had changed two prompts earlier.

> 🪞 **The same bug keeps re-appearing in code review.** Three different sessions, three nearly-identical mistakes. Claude has no memory that any of them happened.

> 🌀 **Claude wrote down a "lesson" that wasn't true.** It guessed a config key was wrong, the build still failed for an unrelated reason, and now that guess is in memory — feeding back into every future session as if it were verified. ([#27430](https://github.com/anthropics/claude-code/issues/27430))

Claude Amplifier doesn't fix Claude. It gives Claude a **place to remember** so you don't have to be the memory — plus a **Pattern Oracle** that warns Claude *before* it walks into a known landmine, **Verification-Gated Memory** that distinguishes between *claimed*, *evidenced*, and *confirmed* lessons so guesses can't quietly poison future advice, **Write-Verification** that makes silent storage failures structurally impossible, and **Stale-Memory Detection** that catches sessions which logged work elsewhere but forgot to record it here.

---

## What it actually does

```
   ┌─────────────────────────────────────────────────────────┐
   │  Session 1 — Monday morning                             │
   │  > Claude tries to mock the DB in an integration test   │
   │  You: "no, mock divergence burned us last quarter"      │
   │  → amplify_learn({ title: "Don't mock the DB", ... })   │
   └─────────────────────────────────────────────────────────┘
                            ↓
              [ SQLite DB in ~/.claude-amplifier/ ]
                            ↓
   ┌─────────────────────────────────────────────────────────┐
   │  Session 2 — Friday afternoon                           │
   │  > amplify_context_load({ project: "my-api" })          │
   │  Claude already knows: integration tests use real DB.   │
   │  No re-explanation needed.                              │
   └─────────────────────────────────────────────────────────┘
```

Thirteen MCP tools, five SQLite tables, zero cloud — your memory stays on your disk.

### New in v1.5.1 — Hardening & discoverability

A reliability pass with **no tool signature changes** — every public API is identical to v1.5.0, and v1.5.0 databases load unmodified. The point of this release is to make the storage layer harder to break under real concurrent use, and to make the package findable from the official MCP registry.

- **Concurrency hardening.** The SQLite connection now opens with a `busy_timeout` of 5s, so two writers (Claude Desktop + Claude Code, or a SessionEnd hook firing mid-session) retry instead of failing with `SQLITE_BUSY`. WAL mode is unchanged.
- **UTF-8-aware token budgeting.** `context_load`'s token estimate now counts UTF-8 *bytes* / 4 instead of `string.length` / 4, so Finnish ä/ö, emoji, and CJK no longer get under-counted into a budget overfill.
- **`safeRowid()` guard** — a BigInt `lastInsertRowid` above 2^53 now throws rather than silently truncating to a wrong-but-plausible id. A wrong id that looks right is exactly the failure class this tool exists to prevent.
- **Type safety + SQL-injection audit.** All 23 `as any` casts on SQLite rows were replaced with precise row interfaces, and every dynamic SQL site was reviewed (all parameterized or hardcoded-literal). Still exactly two runtime dependencies: `@modelcontextprotocol/sdk` + `better-sqlite3`.
- **`mcpName`** (`io.github.sisuthros/claude-amplifier`) so the package can be published to the official MCP registry that downstream directories sync from.

### Previously: v1.5.0 — Trust Rebuild

```
   ┌─────────────────────────────────────────────────────────┐
   │  Claude calls amplify_decisions(op="track", ...)        │
   │  storage.addDecision() INSERTs the row, gets a rowid    │
   │  ── NEW: SELECT WHERE id = rowid before returning ──    │
   │  Row missing? → AmplifierWriteError + audit log entry   │
   │  MCP returns:  "ERROR: Decision NOT recorded.           │
   │                 Do not claim this was saved."           │
   │  Claude can no longer hallucinate a successful save.    │
   └─────────────────────────────────────────────────────────┘
                            ↓
   ┌─────────────────────────────────────────────────────────┐
   │  Next session starts.                                   │
   │  > amplify_context_load({ project: "my-api" })          │
   │  ⚠️ Stale memory files — 1 newer than latest write      │
   │     • 2026-05-26.md (3.2 KB, mtime 16:42 today)         │
   │  Latest Amplifier write: 2026-05-26 11:05               │
   │  Review with amplify_audit_freshness, then              │
   │  amplify_decisions / amplify_learn for anything kept.   │
   └─────────────────────────────────────────────────────────┘
```

**Four new tools land in v1.5.0:**

- `amplify_audit_freshness` — list `memory/.md` files newer than the latest Amplifier write, so unrecorded sessions surface for triage.
- `amplify_suggest_pattern_key` — trigram-similarity scan of existing `pattern_key`s so two sessions don't invent two different keys for the same recurring lesson.
- `amplify_promote_from_memory_md` — read a memory-hook log file and surface DRAFT lesson/decision suggestions based on three heuristics (architectural Wrote: lines, >50 events/hour, ≥8× repeated calls). Records nothing — the operator decides what to keep.
- Assistant-side SessionEnd detection — the auto-claim hook now spots `"I was wrong about..."` admissions and long architecture writeups, not just user reactions like *"no, don't"*.

Plus a quiet bug fix that matters for Finnish, Swedish, and other languages: `\b` in JavaScript regex doesn't fire around `ä` / `ö`, so patterns like `\bälä\b` silently failed for utterances starting with capital `Ä`. All non-ASCII patterns now use Unicode lookarounds.

### Previously: v1.4.0 — Pattern Oracle + Verification-Gated Memory

```
   ┌─────────────────────────────────────────────────────────┐
   │  Before Claude starts a task                            │
   │  > amplify_preflight({ task: "Configure agent endpoint" })│
   │  ⚠️  HIGH RISK (score 4.2)                              │
   │  Matched patterns:                                      │
   │    • "Ambiguous provider-prefix in model name"          │
   │      (seen 3× across 2 projects, CONFIRMED)             │
   │  Evidence quality: STRONG                               │
   │  Suggested approach: Read docs first, single-prefix names │
   └─────────────────────────────────────────────────────────┘
                            ↓
   ┌─────────────────────────────────────────────────────────┐
   │  When Claude records a lesson it just inferred          │
   │  > amplify_record_claim({ ... })          status: claim │
   │                                                         │
   │  Later, after the tests pass:                           │
   │  > amplify_verify_claim({ id: 17,                       │
   │      evidence_type: "test_run", ... })                  │
   │                                              → evidence │
   │  Then you confirm:                                      │
   │  > amplify_verify_claim({ id: 17,                       │
   │      evidence_type: "user_confirmation" })              │
   │                                             → confirmed │
   └─────────────────────────────────────────────────────────┘
```

The Oracle weights matches by status: a `confirmed` lesson at score 1.0 counts five times as much as a raw `claim` at 0.2, so unverified guesses can't drown out hard-won truth.

---

## Quick start

```bash
# 1. Install
npm install -g claude-amplifier

# 2. Wire up Claude Desktop + Claude Code + your CLAUDE.md — all at once
claude-amplifier init

# 3. Plant the recommended starter lessons (see "Recommended starter lessons" below)
claude-amplifier seed

# 4. Restart Claude. That's it.
```

`init` auto-detects Claude Desktop and Claude Code, registers the MCP server in their config, **and inserts the `amplify_context_load` call into your project's `CLAUDE.md`** between two marker comments so future runs upgrade in place. If you'd rather wire CLAUDE.md yourself, pass `--no-write-claude-md`.

---

## How does this compare to other memory tools?

Different products solve different shapes of "AI memory." This table is honest about which tool wins which axis — claude-amplifier is *not* a vector store, *not* an agent runtime, and *not* a knowledge graph. It's a queryable log of **decisions, lessons, and recurrence patterns** that Claude can consult before it acts.

| Feature                              | claude-amplifier      | `@mcp/server-memory` | mem0                  | Letta / MemGPT       | Vector-memory MCPs    |
| ------------------------------------ | :-------------------: | :------------------: | :-------------------: | :------------------: | :-------------------: |
| Local-only / no telemetry            | ✅ SQLite              | ✅                    | partial (self-host)   | partial (self-host)  | varies                |
| Persistent storage                   | ✅                     | ✅                    | ✅                     | ✅                    | ✅                     |
| Decisions w/ rationale + lifecycle   | ✅ (v1.1.0)            | ❌                    | ❌                     | partial (free-form)  | ❌                     |
| Recurrence counter + pattern grouping| ✅ (`pattern_key`)     | ❌                    | partial (dedup)       | ❌                    | ❌                     |
| Knowledge graph between items        | ✅ (decision-level)    | ✅ (entity-relation)  | ✅ (graph store)       | ❌                    | ❌                     |
| Semantic / embedding retrieval       | ❌ (token-overlap)     | ❌                    | ✅                     | ✅                    | ✅                     |
| Self-editing agent memory blocks     | ❌                     | ❌                    | ❌                     | ✅ (core feature)     | ❌                     |
| Preflight risk check before a task   | ✅ Pattern Oracle      | ❌                    | ❌                     | ❌                    | ❌                     |
| Verification-gated (claim → confirmed)| ✅ (v1.4.0)

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Sisuthros](https://github.com/Sisuthros)
- **Source:** [Sisuthros/claude-amplifier](https://github.com/Sisuthros/claude-amplifier)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/claude-amplifier

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Versions

- **1.5.3** — security scan: pending review — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-sisuthros-claude-amplifier
- Seller: https://agentstack.voostack.com/s/sisuthros
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
