Agent memory & knowledge graphs (MCP)

Agent memory & knowledge graphs (MCP)

LessDB ships an embedded, durable memory tier for agents: linked context notes, RAM tables with point lookups, and an openCypher subset — all exposed through the same MCP server as the SQL database. One process replaces the "context vault + graph DB + vector store" stack.

Start the MCP server

// claude_desktop_config.json / codex config — point at the less binary
{ "mcpServers": { "lessdb": { "command": "less", "args": ["mcp", "--dir", "~/.less"] } } }

Tools your agent gets

grouptoolswhat they do
databaseless_query, less_explain, less_schema, less_stats, less_tables, less_optimizefull SQL over MergeTree/SharedMergeTree tables
contextcontext_put, context_find, context_link, context_neighbors, context_pathtitled/tagged notes, typed links, BFS neighborhoods, shortest paths
memorymemory_create, memory_insert, memory_sql, memory_get, memory_compactArrow-backed RAM tables with a hash PK index — O(1) latest-row lookups
graphless_cypherMATCH with variable-length patterns, WHERE, aggregation, CREATE/DELETE/SET

Example session

agent: less_query  →  SELECT count(*) FROM incidents WHERE status='open'
agent: context_put  →  key "incident/42", title "DB failover", tags ["incident","postmortem"]
agent: context_link →  "incident/42" -[follows_up]-> "incident/39"
agent: context_path →  "incident/39" → "incident/42"          (shortest path)
agent: memory_create →  sessions(id Int64, user Utf8, ts Timestamp)
agent: memory_get   →  key: sessions/id = 7                    (O(1), latest row wins)
agent: less_cypher  →  MATCH (a:incident)-[:depends_on*1..3]->(b) RETURN a.id, b.id

Properties that make it agent-safe

Full API in Getting started and the architecture doc's in-memory tier section.