Skip to main content
Cline CLI can use Claude-Mem’s existing stdio MCP server. This guide covers explicit save, search and selected observation retrieval. It adds no automatic capture or model-context injection. The IDE extension was not tested. Tested on macOS with Cline 3.0.74 and Bun 1.4.4. Official references: CLI, MCP configuration, and configuration isolation.

Connect

Start a local Claude-Mem worker first. Use its actual URL; the default port is 37700 + (uid % 100) unless CLAUDE_MEM_WORKER_PORT overrides it. This setup does not start the worker. Use a separate Cline data directory for practice. Replace the executable and checkout paths below with absolute paths on your machine:
The registration stores the worker URL and executable arguments, not a provider credential. Repeating it replaces the same named entry and preserves unrelated entries. Choose a different name if you already have an unrelated server named claude-mem. Configure your preferred provider in this isolated data directory. Pass isolation flags after the auth subcommand as well:
Use Cline’s documented provider setup. Model calls in normal use may cost money. The verification fixture below uses only a local deterministic provider and needs no account or paid calls.

Save and recall

Run Cline from the intended project, keeping the same data directory and MCP settings environment:
Review the tool call before approving it. In a later run, request search with query restore and project memory-practice, then get_observations with selected IDs and that same project. Inspect actual tool results rather than trusting a final assistant claim. Project arguments restrict the query; they are not a multi-user authorization boundary. This local MCP connection can access tools and data available to the worker owner. Do not expose it to untrusted users. Only approve the explicit memory operations you intend. Explicit MCP saves honor CLAUDE_MEM_EXCLUDED_PROJECTS: a save_memory call from an excluded checkout is skipped and answers “Not saved: this checkout is excluded by CLAUDE_MEM_EXCLUDED_PROJECTS.” (#6105, in the release after 15.18.5).

Verification and disconnect

With Cline 3.0.74 installed and current Claude-Mem bundles built:
The fixture creates temporary settings, a database, a project and a local model endpoint. It drives the actual CLI and verifies save receipts, stored text, scoped search and details, a foreign-project ID being withheld, stopped-worker tool errors, repeat registration and removal preserving unrelated entries. It uses synthetic records only. Windows and Linux were not tested. If recall fails, check the worker URL and inspect the MCP tool’s error. A completed Cline run does not establish that its tool succeeded. The fixture checks the tool results explicitly. Remove only this connection using the same environment and data directory:
Saved memories remain in the worker. No Claude Code or Codex configuration is changed.