yantrikdb-mcp — Claude Code MCP server: memory that survives sessions
An MCP server that gives your coding agent a memory between sessions: semantic lookup of earlier notes, a knowledge graph, and flags for facts that contradict each other.
claude mcp add --env YANTRIKDB_DB_PATH=<YANTRIKDB_DB_PATH> --env YANTRIKDB_TOOL_PROFILE=<YANTRIKDB_TOOL_PROFILE> --transport stdio yantrikdb-mcp -- uvx yantrikdb-mcpWhat yantrikdb-mcp does
Memory lives in a local SQLite file, ~/.yantrikdb/memory.db unless you point it elsewhere. The agent gets tools such as remember, recall, forget, correct, think, graph and conflict. It pulls context on its own, records decisions, and notices when two stored beliefs disagree. Semantic search runs on a small bundled 64-dim embedder; the [onnx] extra swaps in a 384-dim model, and a 256-dim multilingual one is available too.
Three deployment modes. Local runs the engine in-process with no outside services. Cluster mode makes the server a thin client of a YantrikDB HTTP cluster, so several machines read the same memory. SSE mode serves a long-lived instance with its own database, though idle connections can drop, which makes the cluster the sturdier pick for shared use.
The uvx config needs uv on PATH; without it the server will not start. Cluster mode expects node URLs in YANTRIKDB_SERVER_URL plus a YANTRIKDB_TOKEN. Agents cannot author skills unless you set YANTRIKDB_SKILLS_WRITE_ENABLED=true.
What it helps with
- recall a decision from an earlier session without retelling it
- find a stored note by meaning rather than exact wording
- spot two saved facts that conflict with each other
- share one memory across machines via an HTTP cluster
- keep agent memory on local disk with no external service
Example prompts for the agent
- Remember that releases go through
make releaseand bring it up next session. - What did we settle on for request timeouts? Search by meaning.
- Check whether my notes about the on-call owner contradict each other.
How to install yantrikdb-mcp
Platform CLI
claude mcp add --env YANTRIKDB_DB_PATH=<YANTRIKDB_DB_PATH> --env YANTRIKDB_TOOL_PROFILE=<YANTRIKDB_TOOL_PROFILE> --transport stdio yantrikdb-mcp -- uvx yantrikdb-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from yantrikdb-mcp <command>
Platform CLI
codex mcp add yantrikdb-mcp --env YANTRIKDB_DB_PATH=<YANTRIKDB_DB_PATH> --env YANTRIKDB_TOOL_PROFILE=<YANTRIKDB_TOOL_PROFILE> -- uvx yantrikdb-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from yantrikdb-mcp <command>
Config file
{
"mcpServers": {
"yantrikdb-mcp": {
"command": "uvx",
"args": [
"yantrikdb-mcp"
],
"env": {
"YANTRIKDB_DB_PATH": "<YANTRIKDB_DB_PATH>",
"YANTRIKDB_TOOL_PROFILE": "<YANTRIKDB_TOOL_PROFILE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from yantrikdb-mcp <command>
Config file
{
"servers": {
"yantrikdb-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"yantrikdb-mcp"
],
"env": {
"YANTRIKDB_DB_PATH": "<YANTRIKDB_DB_PATH>",
"YANTRIKDB_TOOL_PROFILE": "<YANTRIKDB_TOOL_PROFILE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from yantrikdb-mcp <command>
Platform CLI
gemini mcp add -e YANTRIKDB_DB_PATH=<YANTRIKDB_DB_PATH> -e YANTRIKDB_TOOL_PROFILE=<YANTRIKDB_TOOL_PROFILE> yantrikdb-mcp uvx yantrikdb-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from yantrikdb-mcp <command>
Step 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 yantrikdb-mcp
How do I install yantrikdb-mcp in Claude Code?
Run claude mcp add yantrikdb-mcp -- uvx yantrikdb-mcp. To set your own database path and tool profile, use the longer form: `claude mcp add --env YANTRIKDB_DB_PATH=<YANTRIKDB_DB_PATH> --env YANTRIKDB_TOOL_PROFILE=<YANTRIKDB_TOOL_PROFILE> --transport stdio yantrikdb-mcp -- uvx yantrikdb-mcp`.
What does yantrikdb-mcp do?
It keeps agent memory across sessions: storing notes, retrieving them by meaning, tracking relations in a graph, and reporting contradictory beliefs. All of that is exposed as MCP tools.
What is required to run it?
The uvx setup needs uv on PATH. Cluster mode also wants node URLs in YANTRIKDB_SERVER_URL and a YANTRIKDB_TOKEN.