Install a Brain into Claude Code in 2 Minutes (MCP)
A step-by-step guide to installing a MemMesh brain 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 a persistent, cross-session brain in about two minutes. No database to stand up, no schema to design.
1. Install the brain
One command wires MemMesh into Claude Code over MCP and drops the server config into place:
npx @memmesh/cli install2. Confirm it's connected
Restart Claude Code and check that the MemMesh MCP server is listed. The agent now has brain tools available: observe (write) and search/recall (read).
3. Let it observe
You don't have to do anything special — as you work, the brain 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 brain 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 brain to forecast. This is the part that separates a brain 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 the brain 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