Knowl — Claude Code MCP server: agent memory that retires old facts
Local memory for AI agents. When a fact changes, the previous one stops being active instead of sitting next to the new one. Useful once CLAUDE.md gets long and wrong.
claude mcp add --transport http knowl https://api.knowl.cloud/mcp/What Knowl does
Knowl keeps facts about your project and serves them to the agent over MCP or the CLI. It covers code, research and everyday notes. No API key, and the store stays on your machine.
The interesting part is supersession. Record that the project moved to Postgres and the earlier MySQL entry is no longer active, so the agent does not answer with both. When Knowl cannot tell whether a new fact replaces an old one, it keeps both and points you at the knowl supersede command. The author's measurements put retrieval at 98% with this behaviour and 47% without it.
Setup is npm install -g @dat999zx/knowl, then knowl init inside the project: it creates .knowl/, updates .gitignore and registers whichever agents it finds. Node.js 22 or newer is required. The package ships native modules, so the CLI itself will not run under Bun or Deno — Bun can install it, Node has to execute it.
What it helps with
- drop facts the agent still believes but that are no longer true
- share one project knowledge store across several agents
- keep a bloated
CLAUDE.mdout of the context window - carry architecture decisions from one session to the next
- keep research notes next to the code they belong to
Example prompts for the agent
- Which database does this project use? Check Knowl memory.
- Remember this: we moved to Postgres, the MySQL decision is retired.
- Look in Knowl for what we already settled about auth.
How to install Knowl
1Platform CLI: remote server
claude mcp add --transport http knowl https://api.knowl.cloud/mcp/2Platform CLI
claude mcp add knowl -- npx -y @dat999zx/knowl1Platform CLI: remote server
codex mcp add knowl --url https://api.knowl.cloud/mcp/2Platform CLI
codex mcp add knowl -- npx -y @dat999zx/knowlConfig file
{
"mcpServers": {
"knowl": {
"url": "https://api.knowl.cloud/mcp/"
}
}
}{
"mcpServers": {
"knowl": {
"command": "npx",
"args": [
"-y",
"@dat999zx/knowl"
]
}
}
}Config file
{
"servers": {
"knowl": {
"type": "http",
"url": "https://api.knowl.cloud/mcp/"
}
}
}{
"servers": {
"knowl": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@dat999zx/knowl"
]
}
}
}1Platform CLI: remote server
gemini mcp add -t http knowl https://api.knowl.cloud/mcp/2Platform CLI
gemini mcp add knowl npx -y @dat999zx/knowlStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Knowl
How do I install Knowl in Claude Code?
Two options. Hosted: claude mcp add --transport http knowl https://api.knowl.cloud/mcp/. Local: claude mcp add knowl -- npx -y @dat999zx/knowl.
What does Knowl do?
It stores long-term memory for the agent and tracks whether entries are still valid: a replaced fact is marked inactive rather than piling up beside the new one.
What does Knowl need to run?
Node.js 22 or newer. No API key, and the store is local. Running the CLI under Bun or Deno is not supported.