OpenClaw can attach MCP stdio servers as tool providers, which makes greatmemory a drop-in long-term memory for your assistant.
OpenClaw's configuration format has evolved across releases. The snippet below follows the common
mcpServersconvention used by most MCP clients — check your installed version's documentation for the exact key names and config file location before copying.
Setup
Install greatmemory first (local quickstart). Then register a stdio MCP server in your OpenClaw config (typically a JSON file in its config directory):
{
"mcpServers": {
"greatmemory": {
"command": "gmem",
"args": ["mcp"],
"env": {
"GM_DATA_DIR": "/home/you/.greatmemory"
}
}
}
}
Notes:
- Use an absolute path in
command(e.g./home/you/.cargo/bin/gmem) if OpenClaw runs with a minimalPATH— common for daemonized gateways. GM_DATA_DIRpins the memory store to a fixed location; without it the database lands in./.greatmemoryrelative to the process working directory.- No separate server process is required — stdio mode opens the database directly. If you already run
gmem servefor other clients, point OpenClaw at the streamable-HTTP endpointhttp://127.0.0.1:7437/mcpinstead (if your version supports HTTP MCP servers).
What you get
Five tools: remember, recall, get_context, get_profile, forget — parameters in the MCP reference. Use a dedicated space per assistant or per user if you run OpenClaw multi-user.