FishMem for OpenClaw
Enable the FishMem MCP server in the OpenClaw coding-agent CLI for persistent memory.
OpenClaw is an open-source coding-agent CLI. Configure it to use the FishMem MCP server and it gains persistent memory across sessions: it recalls your project's conventions and decisions before acting, and stores durable facts as it works.
OpenClaw loads MCP servers from its plugin config, usually
~/.openclaw/mcp.json (or a project-local .openclaw/mcp.json). You add the
FishMem server as one entry in the mcpServers block.
Setup
Get an API key
Create a project key in the dashboard. It looks
like fm_.... Keep it out of source — see Authentication.
Enable the server
Add a fishmem entry to your OpenClaw MCP config:
{
"mcpServers": {
"fishmem": {
"command": "npx",
"args": ["-y", "@fishmem/mcp"],
"env": {
"FISHMEM_API_KEY": "<your-key>",
"FISHMEM_PROJECT": "acme-api"
}
}
}
}The command is the same npx -y @fishmem/mcp used by every FishMem plugin. If
you run your own engine, set FISHMEM_BASE_URL to point the server at it
instead of the cloud.
Verify
Restart OpenClaw in your repository and list its MCP tools. The fishmem server
should expose search_memory, add_memory, and list_memories.
Use it
OpenClaw decides when to call the tools. Give it a fact to keep, or ask it to recall one:
> Remember that this service deploys via `clawctl deploy --env prod`.OpenClaw calls add_memory. A later "how do I deploy this?" triggers
search_memory, and it answers from memory rather than re-reading scripts.
Recommended scoping
Set FISHMEM_PROJECT to the repository so memory is per-project — this maps to
a run_id scope and keeps each repo's facts isolated. See
Scoping for the full model.
{
"mcpServers": {
"fishmem": {
"command": "npx",
"args": ["-y", "@fishmem/mcp"],
"env": {
"FISHMEM_API_KEY": "${FISHMEM_API_KEY}",
"FISHMEM_PROJECT": "acme-api",
"FISHMEM_USER_ID": "alex"
}
}
}
}Self-hosting
Because OpenClaw is open source, you may want to keep memory on your own infrastructure. Run the self-hosted engine and point the server at it:
{
"mcpServers": {
"fishmem": {
"command": "npx",
"args": ["-y", "@fishmem/mcp"],
"env": {
"FISHMEM_API_KEY": "<your-key>",
"FISHMEM_BASE_URL": "https://memory.internal.example.com",
"FISHMEM_PROJECT": "acme-api"
}
}
}
}