Getting started
Quickstart
Get MemoryLayer running in under 5 minutes. You need Docker installed.
Prerequisites
- • Docker Desktop (Mac/Windows) or Docker Engine (Linux)
- •A MemoryLayer API key — get one free
- • Claude Desktop, Cursor, or any MCP-compatible agent
Installation
1
Pull and run the container
Terminal
docker run -d \
--name memorylayer \
--restart unless-stopped \
-e MEMORY_API_KEY=sk-ml-your-key-here \
-v memorylayer-data:/data \
-p 8765:8765 \
memorylayer/memorylayer:latest2
Verify it's running
Terminal
curl http://localhost:8765/health
# → {"status":"ok","version":"1.0.0"}3
Add to your MCP config
Open your Claude Desktop config file:Restart Claude Desktop after saving.
- • macOS:
~/.claude/claude_desktop_config.json - • Windows:
%APPDATA%\Claude\claude_desktop_config.json
claude_desktop_config.json
{
"mcpServers": {
"memory": {
"command": "docker",
"args": [
"exec", "-i", "memorylayer",
"python", "-m", "src.mcp_server"
],
"env": {
"MEMORY_API_KEY": "sk-ml-your-key-here"
}
}
}
}4
Test in Claude
Ask Claude:Claude will use the
"Store this in memory: my preferred coding style is
TypeScript with strict mode and functional patterns."
"What do you remember about my coding preferences?"memory_store and memory_search tools automatically.Using with other agents
MemoryLayer also exposes a REST API for agents that don't support MCP:
Terminal
# Store a memory
curl -X POST http://localhost:8765/memories \
-H "Content-Type: application/json" \
-H "X-API-Key: sk-ml-your-key-here" \
-d '{"content": "User prefers Python over Ruby", "namespace": "prefs"}'
# Search memories
curl "http://localhost:8765/memories/search?q=coding+preferences" \
-H "X-API-Key: sk-ml-your-key-here"Data persistence
All memories are stored in a Docker volume (memorylayer-data). To back up:
Terminal
docker run --rm \
-v memorylayer-data:/data \
-v $(pwd):/backup \
alpine tar czf /backup/memorylayer-backup.tar.gz /data