# th-memory-mcp

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

- **Type:** MCP server
- **Trust:** 60/100 (B), scored on the package rubric
- **Verification:** community-indexed — nobody has claimed this listing
- **Version:** 2.0.0
- **Author:** io.github.worakorn-prince
- **License:** Unknown
- **npm:** th-memory-mcp
- **Source:** https://github.com/worakorn-prince/th-memory-mcp
- **Compatible clients:** claude-code, cursor, copilot, gemini (basis: transport)

## Trust

60/100 (B), scored on the package rubric
- Publisher verified: no
- Install scripts: nothing suspicious found
- Prompt-injection scan: not run
- Obfuscation scan: not run
- Evidence age: 0 days

## Security scan

- **Status:** clean
- **Scanned:** 2026-09-28T00:41:31.333Z
- **Version scanned:** 2.3.0
- **CVEs:** none found by OSV at scan time

## Tools

16 declared. Statically extracted from the shipped source — a floor on the surface, not a census.
- `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().
- `recall` — Search preferences + lessons via full-text index, plus recent matching interactions. Use before starting a new task.
- `get_profile` — Get the distilled user profile: profile sections, top preferences by confidence (max 15), and the 5 most recent lessons.
- `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.
- `forget` — 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, fro
- `memory_stats` — Summarize memory usage: interaction counts by kind, preference/lesson totals, DB file size, oldest/newest interaction timestamps, and profile sections.
- `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
- `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 p
- `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 
- `consolidate` — Cluster similar memories via embedding similarity and optionally create derived/consolidated memories linked via 'derived_from'. Use during periodic consolidati
- `link_memory` — Create a typed relationship between two memories in the graph (supports/contradicts/supersedes/derived_from/related_to/caused_by/depends_on).
- `merge_memory` — Merge a duplicate/near-duplicate memory into a canonical one. The source becomes superseded and provenance is recorded in metadata.merged_from.
- `update_memory` — Update mutable fields (summary/importance/confidence/valid_from/valid_until/metadata) in place. If content changes, a superseding memory is created by default (
- `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 bl
- `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

## Install

**Verdict: review** — Installable, but 1 thing to check first: No publisher has proved control of this listing; it is indexed, not vouched for.
**Cautions** (coverage gaps and advisories — never blocking)
- No publisher has proved control of this listing; it is indexed, not vouched for.
**Config** (claude-code):
```json
"{\n  \"mcpServers\": {\n    \"th-memory\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"th-memory-mcp\"\n      ],\n      \"env\": {\n        \"YOUR_API_KEY\": \"<YOUR_YOUR_API_KEY>\"\n      }\n    }\n  }\n}"
```
**Credentials it will ask for** (names only — Forge never holds a value):
- `YOUR_API_KEY` — Your API Key (required)
Placeholders only. Forge never holds, brokers, or transmits a credential value — replace each <YOUR_NAME> in your own config file. Do not send a value back to Forge; no Forge endpoint accepts one.
- This entry needs 1 credential (1 required). The generated config carries placeholders, so it will fail in the editor rather than at runtime if they are left unset.

## Blast radius

Moderate blast radius — holds an api key; runs on your machine.
- Floor 23, ceiling 23 (tier: moderate)
- This is impact, not likelihood. A high radius is not a defect: a filesystem server is supposed to write files. It is never part of the trust score.

## Machine-readable views of this entry

- Signed JSON: https://forgeregistry.com/api/v1/packages/th-memory-mcp
- Install plan: https://forgeregistry.com/api/v1/packages/th-memory-mcp/install-plan
- Alternatives: https://forgeregistry.com/api/v1/alternatives/th-memory-mcp
- HTML page: https://forgeregistry.com/registry/th-memory-mcp
- MCP: POST https://forgeregistry.com/api/mcp → `forge_get_package` / `forge_install_plan`

## About this document

Generated by Forge (https://forgeregistry.com) — a compact rendering of the same record served, signed, at the JSON URL above. Trust and scan facts are the registry's own measurements; anything Forge did not measure is named as unmeasured rather than omitted.
