MCP.Market

Th Memory MCP server

by worakorn-prince·io.github.worakorn-prince/th-memory-mcp·v2.4.1·3 stars

Local long-term memory MCP server (SQLite) for AI coding agents — OpenCode, Claude Code, Cursor

A92/100grade A
What users say
No reviews yet
Be the first
Safety scan
A92/100

full report

Adoption
Growing

3 stars866 downloads/wk

Reviews

Write one

Nobody has reviewed Th Memory yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Th Memory tools (16, 3 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • consolidate

    Cluster similar memories via embedding similarity and optionally create derived/consolidated memories linked via 'derived_from'. Use during periodic consolidation.

  • export_memory

    Export preferences, lessons, profile (and optionally raw interactions) to a JSON file under data/exports/. Only writes inside that directory. Returns the file path, size in bytes and a JSON preview.

  • extract_memories

    Scan recent captured interactions for memory-intent phrases and propose memory candidates (deterministic, no LLM). Dry-run by default; pass apply=true to create them (source=captured).

  • forgetwrite action

    Delete one memory row (preference, lesson or interaction) by id and sync the search index. Pass type when you know it (ids from remember are preference ids, from save_lesson are lesson ids).

  • get_context

    Assemble relevant memories for the current task via hybrid retrieval (+ optional memory-graph expansion), with token budgeting. Use to load memory into context before a task.

  • get_profile

    Get the distilled user profile: profile sections, top preferences by confidence (max 15), and the 5 most recent lessons. Optional userId/sessionId/projectId scope the auto-projected memories; without them only GLOBAL memories are included.

  • get_recent_interactions

    List recently captured raw interactions (newest first) as [id] ts [kind] content lines. Optionally filter by kind. Use for auditing history or before distilling memory.

  • import_memory

    Import memories from a JSON array or a .json file inside data/exports/. Validates type, dedupes against existing memories, and never overwrites active memory blindly. Dry-run by default; pass apply=true to insert.

  • link_memorywrite action

    Create a typed relationship between two memories in the graph (supports/contradicts/supersedes/derived_from/related_to/caused_by/depends_on).

  • memory_stats

    Summarize memory usage: interaction counts by kind, preference/lesson totals, DB file size, oldest/newest interaction timestamps, and profile sections.

  • merge_memory

    Merge a duplicate/near-duplicate memory into a canonical one. The source becomes superseded and provenance is recorded in metadata.merged_from.

  • recall

    Search preferences + lessons via full-text index, plus recent matching interactions. Use before starting a new task.

  • remember

    Save or update a user preference (category+key upsert). Re-saving the same key increases confidence by 0.1 (cap 1.0). Returns the row id for forget().

  • save_lesson

    Record a lesson learned from a correction: what situation, what mistake, what is the correct way. Call immediately after the user corrects your work.

  • search_history

    Search past user prompts (kind='prompt') by keyword. Returns timestamped snippets truncated to 200 chars each.

  • update_memorywrite action

    Update mutable fields (summary/importance/confidence/valid_from/valid_until/metadata) in place. If content changes, a superseding memory is created by default (set supersede=false to edit in place).

Public scan report

scanner v0.1.10 · 2026-10-30 · same rubric, same numbers if you re-run it

no findings
  • Code scan71 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 qualitylocal package, no credentials required12/15
  • Maintenancelast push 2 days ago15/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 92/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Th Memory compares

Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
92/100
higher than 90% of 802 Databases servers
Tools
16
the typical Databases server has 8
Tools that change things
19%
typical: 9%. Fewer write tools means less an agent can break
GitHub stars
3
more than 65% of 602 Databases servers
Downloads a week
866
more than 89% of 330 Databases servers with a package

What its tools let an agent do: 10 read · 2 create · 4 change

Release history: 3 versions in the registry since 2026-08-29, latest 2026-10-28, typically one every 55 days.

Install Th Memory in Claude Code, Cursor or VS Code

Runs npx -y th-memory-mcp on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add th-memory-mcp -- npx -y th-memory-mcp
Add to Cursor

What the publisher says

From the Th Memory repository's README, as published. We do not edit it. Read it on GitHub

th-memory-mcp

Status: v2.3.0 — a temporal, conflict-aware, hybrid-retrieval memory engine. 16 MCP tools, 25 passing test suites. Non-destructive schema migration from v1 (all v1 data preserved). New in v2.2: lifecycle states, temporal validity, conflict/dedup resolution with USER/SESSION/PROJECT/GLOBAL scope, hybrid FTS+vector retrieval (RRF), memory graph, getcontext assembly, periodic consolidation, and linkmemory / mergememory / updatememory / importmemory / extractmemories. New in v2.2.3: scope-enforced retrieval, graph scope isolation, export/import round-trip, hardened import path (realpath), strict import validation, N+1 query elimination, cold/ablation benchmark, and MEMORYRETRIEVALMODE switch. New in v2.2.7: synced secret filter between Claude hook and capture-core (6-pattern redact instead of line-drop), fixed err() to return isError:true per MCP spec, fixed backup rotation (backup only when migrations pending + prune to 5 files), and added hook error logging for SessionEnd distill. New in v2.2.8: fixed scope contamination 0.75→0 (critical) and conflict false 0→1 (GLOBAL leak), fixed graph hop1 0.52→1.0 via includeGraph, and rescaled benchmark profiles to 5K/20K/100K/500K/1M (pre-commit now quick 5K + normal 20K only). New in v2.2.9: extended export to entities/users/relations, forget now removes associated links, fail-closed migration with shared ISO helper, eliminated FTS N+1, included smoke in test script, and synced viewer to rescaled profiles 5K/20K/100K/500K/1M. New in v2.3.0: CLI th-memory + highlight underline.

Requirements

  • Node.js >= 20 — the server uses Node-only APIs (the better-sqlite3 native build and import.meta.url resolution) and the MCP SDK requires a modern runtime. CI tests on Node 20.x and 22.x.
  • npm — to install dependencies and run the build/test scripts (npm install, npm run build, npm test).
  • OpenCode — the host that loads this MCP server and the auto-capture plugin. Any build supporting MCP over stdio + plugins works; the plugin runs on OpenCode's bundled Bun runtime.
  • OS: Windows / macOS / Linux — the server is cross-platform (Node). The auto-capture plugin runs wherever OpenCode's Bun runtime runs. Windows note: MEMORYDBPATH is easiest to set with setx; on macOS/Linux use export in your shell profile.

No external services, accounts, or API keys are required — everything lives in a single local SQLite file.

Quick Start

Fastest path: after cloning, run npm run quickstart — it builds, wires opencode.json, deploys the plugin, and sets MEMORYDBPATH for you in one command. The steps below show exactly what it does (use them if you prefer manual control).

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Th Memory: common questions

Is Th Memory MCP server safe?
Yes, by our scan: it is graded A (92/100). Read the Th Memory safety report
How do I install Th Memory?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Th Memory need an API key?
Not as far as the registry entry and our scan can tell: no credentials are declared or required.
Is Th Memory maintained?
The last commit was 8 days ago (2026-10-28). The latest release is v2.4.1.
What can I use instead of Th Memory?
Servers from other publishers that do the same job: LLMSlim memory MCP server, Myc MCP server and open-memex MCP server. Compare all Th Memory alternatives.
How does Th Memory compare with other Databases MCP servers?
safety score 92/100 (higher than 90% of 802 Databases servers); tools 16 (the typical Databases server has 8); tools that change things 19% (typical: 9%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to Th Memory

Same job from other publishers: the closest match first, then the best rated.

All Th Memory alternatives →
  • LLMSlim memory
    Long-term memory and context fitting for agents, with no LLM in the loop. Local SQLite.
    A
  • Myc
    Task queue, decisions and memory for coding agents. Local SQLite, no network. Requires Bun.
    C
  • open-memex
    Local-first memory for AI coding agents — Markdown + SQLite FTS5, shared across editors via MCP.
    B
  • Graphmem
    Shared local memory for coding agents: SQLite, semantic recall, linked entities, code navigation.
    A
  • SAME - Stateless Agent Memory Engine
    Persistent memory for AI coding agents. Local-first SQLite + vector search. 17 MCP tools.
    B