MemoClaw MCP server: give any agent memory in one install


MCP (Model Context Protocol) is becoming the standard way to give tools to AI agents. If your agent speaks MCP, adding persistent memory is a one-liner install — no custom integration code, no SDK wiring, no glue scripts.

MemoClaw ships a first-class MCP server called memoclaw-mcp. It exposes store, recall, list, and delete as MCP tools. Any MCP-compatible client — OpenClaw, Claude Desktop, Cursor, or your own setup — gets semantic memory out of the box.

This tutorial takes you from zero to working agent memory in under 10 minutes.

What you’ll need

  • Node.js 18+ (for the npm install)
  • An Ethereum wallet — MemoClaw uses wallet-based identity. No API keys, no registration. Your wallet address is your account.
  • An MCP-compatible client — We’ll cover OpenClaw (primary), Claude Desktop, and Cursor configs.

Step 1: Install memoclaw-mcp

npm install -g memoclaw-mcp

Verify it installed:

memoclaw-mcp --help

You should see the available flags including --private-key and --namespace.

Step 2: Get your wallet ready

MemoClaw identifies you by your Ethereum wallet address. You don’t register. You don’t create an account. You provide a private key, and your wallet address becomes your identity.

If you already have a wallet (MetaMask, OpenClaw agent wallet, etc.), export the private key.

If you need a new wallet:

# Using OpenClaw's built-in wallet
openclaw wallet show

# Or generate with any Ethereum tool
node -e "const w = require('ethers').Wallet.createRandom(); console.log('Address:', w.address); console.log('Key:', w.privateKey)"

The free tier gives you 100 API calls per wallet. Enough to test everything in this tutorial. After that, you’ll need USDC on Base ($0.005 per store or recall).

Step 3: Configure for OpenClaw

OpenClaw supports MCP servers natively. Add memoclaw-mcp to your MCP config:

{
  "mcpServers": {
    "memoclaw": {
      "command": "memoclaw-mcp",
      "args": ["--private-key", "YOUR_PRIVATE_KEY"]
    }
  }
}

Or with a namespace for project isolation:

{
  "mcpServers": {
    "memoclaw": {
      "command": "memoclaw-mcp",
      "args": [
        "--private-key", "YOUR_PRIVATE_KEY",
        "--namespace", "my-project"
      ]
    }
  }
}

Your OpenClaw agent gets these tools automatically:

  • memoclaw_store — Save a memory with optional importance and tags
  • memoclaw_recall — Semantic search across stored memories
  • memoclaw_list — Browse all memories
  • memoclaw_delete — Remove a memory by ID

No skill install needed. No code. MCP handles everything.

Step 4: Configure for Claude Desktop

Add the server to your claude_desktop_config.json:

{
  "mcpServers": {
    "memoclaw": {
      "command": "memoclaw-mcp",
      "args": ["--private-key", "YOUR_PRIVATE_KEY"]
    }
  }
}

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows: %APPDATA%\Claude\.

Restart Claude Desktop after editing.

Step 5: Configure for Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "memoclaw": {
      "command": "memoclaw-mcp",
      "args": ["--private-key", "YOUR_PRIVATE_KEY"]
    }
  }
}

Step 6: Test it — store a memory

Ask your agent:

“Remember that I prefer TypeScript over Python for all code examples.”

Behind the scenes, the agent calls memoclaw_store:

{
  "content": "User prefers TypeScript over Python for all code examples",
  "importance": 0.8,
  "tags": ["preferences", "coding"]
}

Stored with a vector embedding. $0.005 (or free within your 100-call tier).

Step 7: Test it — recall a memory

Ask your agent:

“What programming language do I like?”

The agent calls memoclaw_recall with something like "programming language preference". Even though you never used “like” or “programming language” in the original, semantic search finds it because the meaning matches:

{
  "memories": [
    {
      "id": "mem_abc123",
      "content": "User prefers TypeScript over Python for all code examples",
      "importance": 0.8,
      "tags": ["preferences", "coding"],
      "similarity": 0.92
    }
  ]
}

That’s the difference between semantic search and grep-through-a-markdown-file.

Namespaces: keeping projects separate

Namespaces prevent memory cross-contamination. A memory stored in work won’t appear in personal recalls.

{
  "mcpServers": {
    "memoclaw-work": {
      "command": "memoclaw-mcp",
      "args": ["--private-key", "YOUR_KEY", "--namespace", "work"]
    },
    "memoclaw-personal": {
      "command": "memoclaw-mcp",
      "args": ["--private-key", "YOUR_KEY", "--namespace", "personal"]
    }
  }
}

Or run a single server and pass namespace per-call — the MCP tools accept a namespace parameter.

After the free tier

After 100 API calls, MemoClaw returns HTTP 402. The x402 payment protocol kicks in. Your agent needs a funded wallet (USDC on Base).

Costs:

  • Store: $0.005 per memory
  • Recall: $0.005 per search
  • Batch store (up to 100): $0.04 total

A typical agent session: 5 stores + 10 recalls = $0.075. A month of daily use: ~$2.25.

If your wallet isn’t funded, the MCP server surfaces the 402 error to your agent. No silent failures.

Tips

Memory size limits: 8,192 characters per memory. This is for discrete facts, not full documents.

Importance scores matter: 0.8-1.0 for corrections and preferences. 0.3-0.5 for casual observations. Higher importance = higher ranking in recall results.

Tags help a lot. Use them consistently: ["preferences"], ["project-alpha", "decisions"], ["corrections"]. Filter on recall to narrow results.

One wallet, multiple agents: Same wallet = shared memory pool. Your research agent stores findings, your writing agent recalls them. Use namespaces if you want isolation.

Verifying with the CLI

Check what your agent stored:

npm install -g memoclaw
memoclaw list --private-key YOUR_KEY
memoclaw recall "user preferences" --private-key YOUR_KEY
memoclaw stats --private-key YOUR_KEY

Useful for debugging.

Three steps, that’s it

  1. npm install -g memoclaw-mcp
  2. Add the server to your MCP config with a wallet private key
  3. Store and recall — they’re now available as native tools

No SDKs. No custom code. No account creation. Your wallet is your identity, and the free tier gives you 100 calls to prove it works.


Go deeper: namespaces for project isolation and batch storage for cost optimization.