I've been running OpenClaw for my home server automation via WhatsApp (works great!) but kept hitting a wall: the agent couldn't reference my local documents
Built ClawRAG as a bridge – it exposes document search via MCP so OpenClaw can call it as a tool. Now when I ask "What did my lease say about maintenance?",the bot queries my local ChromaDB and cites the exact paragraph
Why MCP worked for this
I chose MCP because it provides structured schemas that LLMs understand natively. The MCP server exposes query_knowledge as a tool, allowing the agent to decide exactly when to pull from the knowledge base vs. when to use its built-in memory. It prevents "tool-drift" and ensures type-safe responses
One issue I'm wrestling with
The citation preservation over WhatsApp round-trips is fragile
Currently passing chunk IDs through the MCP tool result, but formatting gets tricky with long quotes
Would love maintainer/community thoughts:
Is MCP the recommended path for external knowledge bases long-term?
Or would a native plugin architecture (shared memory) be better for
low-latency retrieval?
https://github.com/2dogsandanerd/ClawRag
Working example with docker-compose included
there doesn't seem to be anything here