A high-performance structured project knowledge base generator, neural network memory visualizer, and Model Context Protocol (MCP) server for AI coding agents (Pi, Claude, Codex, Cursor, Windsurf).
Whenever lithium-kb is run, it organizes project memory into clean, modular knowledge categories without clunky numeric prefixes:
your-project/
├── .agent-kb/
│ ├── architecture/
│ │ └── overview.md # Topology, entry points, service boundaries
│ ├── debug/
│ │ ├── quickstart-diagnostics.md # Resolved incidents & root-cause postmortems
│ │ └── ...
│ ├── tasks/
│ │ ├── initial-setup.md # Active sprint tasks & acceptance criteria
│ │ ├── explorer-ui.md
│ │ └── ...
│ └── features/
│ ├── core-specs.md # Detailed feature specifications
│ └── ...
├── .agentrules # Explicit AI agent navigation directives
└── PROJECT_KB.md # Compact global index (< 2KB)
-
Surgical Token Efficiency: When an agent works on a bug or task, it reads only
.agent-kb/tasks/<name>.mdor.agent-kb/debug/<name>.mdinstead of blindly traversing thousands of codebase lines. - Deterministic Context: Agents don't lose track of multi-step plans across sessions.
-
Interactive Neural Visualizer:
- File Explorer Sidebar: Collapsible category trees with directory rails, item count badges, and expand/collapse quick actions.
- Real-Time Impulses: Observe live memory hits, dynamic impulse animations, and token savings as agents query knowledge nodes.
- Zero Dependencies: Pure Node.js standard library — zero install footprint, lightning fast.
Run this inside any project repository to initialize the knowledge structure and automatically configure MCP for Cursor, Claude Desktop, Windsurf, Zed, and VS Code (Cline / Roo Code):
npx @liulinnuha/lithium-kb init# Generate / Sync knowledge base (.agent-kb/ and PROJECT_KB.md)
npx @liulinnuha/lithium-kb
# Open Neural Graph Web UI (port 3030)
npx @liulinnuha/lithium-kb --ui
# Auto-watch for file changes and sync live
npx @liulinnuha/lithium-kb --watch
# Launch MCP stdio server manually
npx @liulinnuha/lithium-kb --mcp
# Clean MCP configurations & legacy references from all IDEs
npx @liulinnuha/lithium-kb uninstall
# Completely purge MCP configurations and local .agent-kb/ files
npx @liulinnuha/lithium-kb uninstall --purgeInstall globally on your machine to use lithium-kb anywhere:
npm install -g @liulinnuha/lithium-kb
# Then run anywhere:
lithium-kb --uiAdd this to your Claude Desktop config (claude_desktop_config.json) or Cursor MCP settings:
{
"mcpServers": {
"lithium-kb": {
"command": "npx",
"args": ["-y", "@liulinnuha/lithium-kb", "--mcp"]
}
}
}| Tool | Purpose |
|---|---|
get_project_memory |
Return compact architecture & symbol index (< 2KB). |
read_knowledge_doc |
Read targeted doc from .agent-kb/ (category, filename). |
write_knowledge_doc |
Persist new task note, debug postmortem, or feature spec. |
query_symbol_map |
Search exported functions, classes, and types across the repo. |
MIT © Moch Ulin Nuha