Skip to content

Quickstart: MCP

MCP (Model Context Protocol) lets Claude Desktop and Claude Code use MemLayer as a tool. Claude can store, search, organize, and forget memories on your behalf — no API calls required.

  • Installation completed
  • memlayer server running (bb local-server or bb server)

Add MemLayer to your claude_desktop_config.json:

{
"mcpServers": {
"memlayer": {
"command": "bb",
"args": ["mcp"],
"cwd": "/path/to/memlayer"
}
}
}

The config file location depends on your OS:

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

Add memlayer with a single command:

Terminal window
claude mcp add memlayer -- bb mcp

Or create a .mcp.json file in your project root:

{
"mcpServers": {
"memlayer": {
"command": "bb",
"args": ["mcp"],
"cwd": "/path/to/memlayer"
}
}
}

After adding the configuration, restart Claude Desktop or reload your Claude Code session.

Open a conversation with Claude and try these prompts in order:

Store a memory (retain):

“Remember that I prefer dark mode in all my editors”

Claude calls the retain tool, which extracts the fact and stores it with a vector embedding.

Search memories (recall):

“What are my editor preferences?”

Claude calls the recall tool, which performs a semantic search and returns the matching memory.

Consolidate memories (reflect):

“Organize my memories”

Claude calls the reflect tool, which groups related facts into higher-level concepts and domains.

Forget a memory:

“Forget everything about my editor preferences”

Claude calls recall to find matching memories, then calls forget with the relevant memory IDs to remove them.

Behind the scenes, each prompt triggered a different MemLayer operation:

  1. Retain extracted “prefers dark mode in all editors” as a structured fact, generated a vector embedding, and stored it in Datahike and the Proximum vector index.
  2. Recall converted your question into an embedding, searched for semantically similar memories, and returned the best match.
  3. Reflect scanned stored memories for patterns and grouped related facts into concepts.
  4. Forget retracted the specified memories from Datahike and removed their vectors from the index. The data remains in Datahike history for audit purposes but no longer appears in queries.