Claude CodeMCPTutorialApril 16, 2026

Claude Code Forgets Everything.
Here’s the One-Line Fix.

One CLI command. Personal today, governed fleet infrastructure tomorrow.

Claude Code is the most capable coding agent shipping today. It’s also amnesiac.

Every new terminal session starts from zero. The architectural decision you locked in yesterday, the obscure bug you root-caused last week, the linter convention your team agreed on three sprints ago — Claude Code has no idea. You re-paste. You re-explain. You watch the same agent re-derive the same conclusion for the hundredth time.

MemClaw fixes that with one command — and that’s just the starting point.

What you’re actually connecting to is long-term, persistent memory shared across entire agent fleets, with enterprise-grade governance, visibility, and audit trails. Every interaction compounds. Every fleet learns from the last. One agent’s discovery becomes the whole organization’s knowledge — without leaking what shouldn’t cross boundaries.

  • Today: your Claude Code stops forgetting.
  • Tomorrow: your team’s agents stop rediscovering.
  • Next quarter: your fleets evolve on their own.

This post gets you the first rung in under five minutes — one config line, no SDK, no infra. The rest of the ladder is there when you’re ready to climb.


What you get

Ten tools show up in Claude Code the moment you connect — memory, reflection, and structured documents (which is also how skills are shared across a team):

memclaw_write       Store content (single or batch)
memclaw_recall      Hybrid semantic + keyword search
memclaw_list        Browse by metadata (scope-aware)
memclaw_manage      Read / update / transition / delete
memclaw_doc         Structured document CRUD
memclaw_entity_get  Entity with relations
memclaw_tune        Per-agent retrieval tuning
memclaw_insights    Reflect over the memory store
memclaw_evolve      Report outcomes, close the loop
memclaw_stats       Aggregate counts (by type, agent, status)

For multi-agent teams: skill sharing rides on memclaw_doc with collection="skills"op=write to share, op=search / op=query to discover, op=delete to remove. The server validates the slug and auto-embeds the description for semantic search.

Every write gets enriched in a single pass — classified, entity-extracted, PII-scanned, contradiction-checked, embedded. Every recall is permissioned and audited. Tenant resolved from your API key.

You don’t need to think about any of that to get started. You just need the API key.


Step 1 — Get your API key

60 seconds

Sign in at memclaw.net/signin and grab a key from the dashboard:

mc_live_8f3a2b1c9d4e5f6a7b8c9d0e1f2a3b4c

Free tier: 10K memories, 5K writes/month, 500 recalls/month. Plenty to feel the difference.


Step 2 — Add MemClaw to Claude Code

One command

macOS / Linux

claude mcp add --transport http memclaw https://memclaw.net/mcp/ \
  --header "X-API-Key: mc_your_key_here" \
  -s user

Windows (PowerShell)

PowerShell uses backtick ` for line continuation, not \. Easiest is to keep it on one line:

claude mcp add --transport http memclaw https://memclaw.net/mcp/ --header "X-API-Key: mc_your_key_here" -s user

Why -s user matters

Claude Code has three scopes:

  • -s user — available across every project on this machine. The right default for personal memory.
  • -s local — this project only. Useful for per-project siloing.
  • -s project — checked into .mcp.json and shared with the repo. Don’t use this with an API key — it’ll end up in git.

Forget -s user and your config lands in local, invisible the moment you cd elsewhere. If you accidentally add MemClaw to multiple scopes, remove each one explicitly:

claude mcp remove memclaw -s local
claude mcp remove memclaw -s user

Then re-add cleanly to the scope you want.


Step 3 — Verify

claude mcp list

memclaw should appear once with HTTP transport. Open a new Claude Code session, type /mcp, and the ten memclaw_* tools show up in the menu.

If you see them, setup is done. Total elapsed time: under three minutes.


Step 4 — Write your first memory

30 seconds

Open Claude Code in any project. Ask, in plain English:

“Use memclaw_write to remember this: our team uses CAURA-<num>-<slug> for branch names, and CAURA-000-* for any branch authored by an AI agent.”

Claude Code calls memclaw_write. You’ll see the tool invocation in the terminal and get a memory ID back. It’s stored, enriched, and embedded.

Now close the session. Open a fresh one — same project or a different one. Ask:

“What’s our branch naming convention?”

Claude Code calls memclaw_recall, pulls the memory back, and answers. Across sessions. Across projects. Across machines, if you used -s user.

That’s the whole point. From this moment forward, anything you tell Claude Code to remember is actually remembered.

A few patterns worth seeding early:

"Remember that we chose Auth0 over Supabase because of SAML support."
"Remember the API rate limit on /search is 100 req/min per tenant."
"Remember pytest fixtures in this repo live in conftest.py at the repo root."

Each one is a future hour you don’t lose re-explaining context.


Step 5 — Let Claude Code write for itself

90 seconds

Manual writes are fine, but the real leverage is letting Claude Code manage its own memory. One system prompt sets the pattern.

For ongoing engineering work:

“Whenever we make an architectural decision in this conversation, write it to MemClaw with high importance. Whenever I ask about the codebase, recall relevant past decisions first.”

For debugging:

“When we root-cause a non-obvious bug, write the symptom + cause + fix to MemClaw. Tag with the file path and affected component. Recall before debugging anything new.”

For convention drift:

“When I correct your code style, lint preferences, or naming conventions, write the correction to MemClaw as feedback. Recall feedback before generating any new code in this repo.”

Claude Code starts treating MemClaw as its own working memory. After a week, the difference is visceral. After a month, you stop noticing — until you SSH into a fresh machine and remember what amnesiac Claude felt like.


Personal today. Fleet-ready tomorrow.

Here’s where the ladder starts.

memclaw_list and memclaw_insights are scope-aware. By default they operate on your own agent’s memories — no elevation needed, no governance friction:

"list my memclaw memories"          → your agent's own memories
"show me insights on my memories"   → reflects over your own store

The moment you’re ready to work across agents — multiple Claude Code instances, an OpenClaw deployment, teammates’ agents sharing the same tenant — those same tools take a scope="fleet" parameter that surfaces the cross-agent view. At that point MemClaw’s trust levels engage: cross-fleet operations require explicit elevation from the dashboard, every read and write is audited, PII is auto-detected and quarantined at fleet boundaries, and the LLM crystallizer starts merging near-duplicate memories across agents into canonical atomic facts with full provenance.

The pattern is deliberate: zero friction when you’re solo, meaningful governance the moment governance actually matters. Governance isn’t something you have to set up first — it’s something that’s there waiting for you when your agent count crosses from one to many.


When something goes wrong

“MCP server ‘memclaw’ already exists in multiple scopes” — You added it twice. Remove from both with the explicit -s flag, then re-add cleanly to one.

Tools show up but calls time out — Check that your endpoint is https://memclaw.net/mcp/ (note the trailing slash). Firewalls or corporate proxies sometimes block MCP’s streaming transport; a VPN or direct connection usually clears it.

curl behaves weirdly on Windows — In PowerShell, curl is an alias for Invoke-WebRequest, which has completely different syntax. Use curl.exe for real curl, or Invoke-RestMethod with a hashtable of headers for native PowerShell.


Why this matters more than it looks

Most “AI memory” tools give a single chatbot a notebook. MemClaw gives an organization a nervous system.

The difference compounds. One Claude Code session with memory is useful. Ten Claude Code sessions sharing governed memory across a team is a force multiplier — the same bug never gets debugged twice, the same convention never gets re-explained, the same customer context is available to every agent that needs it. A hundred agents across a fleet, learning from each other under trust boundaries you control, is infrastructure your competitors will spend a year trying to replicate.

That’s the gap most memory tools miss. Personal memory for one chat is a feature. Governed memory across an entire fleet of agents — with visibility scopes, trust levels, audit trails, contradiction detection, a knowledge graph that builds itself, and a self-cleaning lifecycle — is the substrate every serious agentic system will need by this time next year.

You just installed the substrate. In five minutes. With one config line.


What’s next

  • Browse stored memories in Prism
  • Visualize the auto-extracted knowledge graph in Graph
  • Running multiple Claude Code instances across machines? They share the same memory store under one API key — write from your laptop, recall from your workstation
  • Running an OpenClaw fleet? Skip per-client setup and use the fleet-wide plugin install — one curl command stamps fleet_id on every write, governance enforced at the gateway

Questions, war stories, or feature requests from your first week with persistent Claude Code? We want them. hello@caura.ai.

The amnesia ends today.


MemClaw is built by Caura.ai — governed memory for the hyper-agent generation. Free tier, no credit card. Get started.