Clawmem Agent Memory
On-device memory layer for AI agents. Claude Code, Hermes and OpenClaw. Hooks + MCP server + hybrid RAG search.
What is Clawmem Agent Memory?
Clawmem Agent Memory is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to on-device memory layer for ai agents. claude code, hermes and openclaw. hooks + mcp server + hybrid rag search.
On-device memory layer for AI agents. Claude Code, Hermes and OpenClaw. Hooks + MCP server + hybrid RAG search.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- On-device memory layer for AI agents. Claude Code, Hermes an
Use Cases
Maintainer
Works with
Installation
NPM
npx -y clawmemManual Installation
npx -y clawmemConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Clawmem Agent Memory
ClawMem is an on-device persistent memory layer for AI agents that stores, indexes, and retrieves knowledge across sessions using a hybrid BM25 keyword + vector semantic search pipeline with optional cross-encoder reranking. It installs as an MCP server alongside Claude Code hooks that automatically surface relevant memories before each prompt and capture decisions and session summaries when a session ends. Supporting 31 MCP tools including `memory_retrieve`, `intent_search`, graph traversal, and lifecycle management, ClawMem gives agents a local-first, privacy-respecting long-term memory without relying on cloud services.
Prerequisites
- Node.js 18+ or Bun 1.0+ runtime installed
- Claude Code, Hermes Agent, or OpenClaw as the MCP client
- Optional: a local GPU server (llama-server) for embedding and reranking; without it, ClawMem auto-downloads smaller models via node-llama-cpp
- Optional: a Jina AI API key (`CLAWMEM_EMBED_API_KEY`) for cloud-based embeddings instead of local inference
- Markdown notes or documents you want to add to memory collections
Install ClawMem globally
Install via npm or Bun. The global install places the `clawmem` binary on your PATH.
npm install -g clawmem
# or with Bun
bun add -g clawmemBootstrap a memory collection
Point ClawMem at a directory of Markdown files to create your first memory collection. The `bootstrap` command initialises the database, embeds all documents, sets up Claude Code hooks, and registers the MCP server in one step.
clawmem bootstrap ~/notes --name notesConfigure embedding provider (optional)
By default ClawMem downloads local models. To use Jina AI cloud embeddings instead, set the relevant environment variables before running bootstrap or update them in your shell profile.
export CLAWMEM_EMBED_URL=https://api.jina.ai/v1
export CLAWMEM_EMBED_API_KEY=jina_your-key-here
export CLAWMEM_EMBED_MODEL=jina-embeddings-v5-text-smallSet up Claude Code hooks and MCP server
If you didn't use `bootstrap`, run these two commands to install the lifecycle hooks (context surfacing, decision extraction, handoff generation) and register the MCP server with Claude Code.
clawmem setup hooks
clawmem setup mcpVerify health and index status
Run the doctor and status commands to confirm embeddings are working and documents are indexed.
clawmem doctor
clawmem statusClawmem Agent Memory Examples
Client configuration
Claude Desktop or Claude Code config block for the ClawMem MCP server launched via npx.
{
"mcpServers": {
"clawmem": {
"command": "npx",
"args": ["-y", "clawmem"],
"env": {
"CLAWMEM_EMBED_API_KEY": "jina_your-key-here",
"CLAWMEM_EMBED_MODEL": "jina-embeddings-v5-text-small"
}
}
}
}Prompts to try
Example queries that use ClawMem's memory and search capabilities.
- "What decisions did we make about the authentication architecture last month?"
- "Find notes related to database performance optimisation"
- "Show me the timeline of documents about the API migration project"
- "What are my saved preferences for code style and formatting?"
- "Retrieve everything I know about the customer onboarding flow"Troubleshooting Clawmem Agent Memory
Embedding server is unreachable and searches return no results
ClawMem sets a 60-second cooldown when a server is unreachable and falls back to in-process inference via node-llama-cpp. Run `clawmem doctor` to see which backend is active. If you want to force cloud embeddings, confirm `CLAWMEM_EMBED_URL` and `CLAWMEM_EMBED_API_KEY` are exported in your shell and that the endpoint is reachable.
Documents are not appearing in search results after adding a new collection
Run `clawmem update --embed` to re-index and embed any new or changed documents. For a full rebuild use `clawmem reindex --enrich`. Check `clawmem status` to see the document count per collection.
Hooks are not injecting memory context into Claude Code sessions
Verify hooks were installed with `clawmem setup hooks` and that your Claude Code version supports the PreToolUse / Stop hook events. Re-run `clawmem setup mcp` if the MCP server entry is missing from your Claude Code settings.
Frequently Asked Questions about Clawmem Agent Memory
What is Clawmem Agent Memory?
Clawmem Agent Memory is a Model Context Protocol (MCP) server that on-device memory layer for ai agents. claude code, hermes and openclaw. hooks + mcp server + hybrid rag search. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Clawmem Agent Memory?
Install via npm with the command: npx -y clawmem. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Clawmem Agent Memory?
Clawmem Agent Memory works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Clawmem Agent Memory free to use?
Yes, Clawmem Agent Memory is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Clawmem Agent Memory Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Clawmem Agent Memory? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Clawmem Agent Memory in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Clawmem Agent Memory?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.