
kg
Local knowledge graph memory that runs as an MCP server and stores project context in git-friendly `.kg` files. Exposes tools to create nodes and edges, query facts, and update the graph as you work. Better than RAG when you want explicit relationships, persistent memory between sessions, and something you can inspect and diff. Works stdio, stores graphs in `~/.kg/graphs` by default, and supports both manual graph building from docs and automatic extraction from codebases with symbol parsing for Rust, Java, Python, TypeScript, and C/C++. Good for keeping architecture decisions, dependencies, and workflows in a structure your assistant can read and modify without starting from zero each conversation.
- tools
- 3
- last updated
- Aug 5, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
kgExecute one or more kg commands separated by `;` or newlines, supporting node/edge CRUD, graph management, stats, audit, and feedback.
Execute one or more kg commands separated by `;` or newlines, supporting node/edge CRUD, graph management, stats, audit, and feedback.
No parameter schema in public metadata yet.
kg_helpReturns detailed manual with examples for a given domain.
Returns detailed manual with examples for a given domain.
No parameter schema in public metadata yet.
kg_schemaReturns valid node types, relations, ID prefixes, and edge rules.
Returns valid node types, relations, ID prefixes, and edge rules.
No parameter schema in public metadata yet.
Sponsors
Readme
kg - local knowledge graph for your AI assistants
Beta - APIs may still change and some bugs are still expected.
kg gives your AI assistant persistent, structured, editable project memory stored locally as a knowledge graph.
Instead of relying only on document chunk retrieval, you can keep architecture, decisions, incidents, rules, dependencies, and workflows in a graph that is readable, reviewable, and Git-friendly.
Use it when you want your assistant to understand an existing project across sessions — not start from zero every time.
Why use it
Details
- Repository
- github.com/nnar1o/kg
- Website
- github.com/nnar1o/kg/blob/master/docs/mcp.md
- Categories
- AI & LLM Tools, Documents & Knowledge
- Registry
- MCP registry, active