mcpField
M
mem-search

mem-search

github.com/thedotmackAgent workflows104.0k9.0k installsUpdated today
Repository

About mem-search

mem-search is a skill for searching a user's persistent Claude-Mem memory on cmem.ai. It uses the plugin's configured API key and a progressive index-to-transcript search method to help agents retrieve relevant observations from past sessions.

Key features

  1. 01Search persistent Claude-Mem observations
  2. 02Use the bundled CLI without extra dependencies
  3. 03Narrow searches progressively
  4. 04Check plugin status when search fails

Use cases

  1. 01Recall details from past agent sessions
  2. 02Find observations by project or file name
  3. 03Narrow results using exact terms
  4. 04Diagnose a missing API key or endpoint issue

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thedotmack/claude-mem --skill mem-search

After installing, type/mem-searchin Claude Code to confirm it loaded.

Details

From the project README

Claude-Mem Search (Cowork)

Search the user's persistent Claude-Mem memory on cmem.ai. Memory contains timestamped observations synthesized from past sessions across all their agents (Claude Code, Cowork, Codex, and others).

How to search

Run the bundled CLI (no dependencies, uses the plugin's configured API key):

node "${CLAUDE_PLUGIN_ROOT}/scripts/cmem-hook.mjs" search "your query" --limit 20

Progressive search method

Follow claude-mem's Index → Timeline → Transcript discipline — cheap passes first, expensive detail only for confirmed hits:

  1. Index pass — run 1–3 broad keyword searches (project names, file names, error strings, feature names). Skim titles/summaries only.
  2. Narrow pass — re-search with the most specific terms found in step 1 (IDs, exact phrases) and a smaller --limit.
  3. Answer — synthesize from the observations returned. Quote timestamps when the user asks "when".

Do not dump raw search output at the user; extract the relevant observations and answer in plain language.

Diagnostics

If searches return nothing or error:

node "${CLAUDE_PLUGIN_ROOT}/scripts/cmem-hook.mjs" status

Report the status output plainly: a MISSING api key means the plugin needs the user's cmem.ai key added to its configuration; a 404 on /api/hooks/context just means the newer Pro endpoint isn't deployed — search still works via /api/mcp.

Notes

  • Some filters (date ranges, type) may be silently ignored by the cloud API until MCP parity ships — prefer keyword narrowing over filter flags.
  • Never write secrets into search queries; queries are sent to cmem.ai.

Comments

Markdown supported