Add Persistent Memory to Claude Code in 2 Minutes (MCP)
A step-by-step guide to wiring MemMesh into Claude Code over MCP, so your agent remembers across sessions and predicts what's next.
This is the fast path: from zero to a Claude Code agent with persistent, cross-session memory in about two minutes. No database to stand up, no schema to design.
1. Install
One command wires MemMesh into Claude Code over MCP and drops the server config into place:
npx @thinkfleet/memmesh install2. Confirm it's connected
Restart Claude Code and check that the MemMesh MCP server is listed. The agent now has memory tools available: observe (write) and search/recall (read).
3. Let it observe
You don't have to do anything special — as you work, the agent records what matters. Or feed it explicitly from your own code with the SDK:
import { ThinkFleetMemory } from '@thinkfleet/memory-sdk'
const tf = new ThinkFleetMemory({ apiKey: 'sk-...', projectId: 'proj_...' })
await tf.memory.observe({
subject: { kind: 'project', externalId: 'checkout-svc' },
content: 'We dropped the queue on May 3 — latency, not throughput, was the bottleneck.',
})4. Recall in a new session
Open a fresh Claude Code session tomorrow and ask about the project. The agent recalls the decision — with provenance — because the memory outlived the context window.
const hits = await tf.memory.admin.search({
query: 'why did we drop the queue?',
limit: 5,
})5. Go beyond recall
Once there's history, ask the engine to forecast. This is the part that separates MemMesh from a plain memory store:
const p = await tf.lattice.predict({ subjectId, target: 'next_incident_area' })
// → calibrated, provenanced, abstains when the signal is thinThat's it. Keep your stable rules in CLAUDE.md; let MemMesh carry the learned, evolving context — and the predictions.
Give your agent memory that predicts.
Wire MemMesh into Claude Code, Cursor, or your own app in one command.
Get started