loading…
Search for a command to run...
loading…
Provides AI coding assistants with persistent memory, AST-based project indexing, and tools for live context management and hallucination detection. It enables
Provides AI coding assistants with persistent memory, AST-based project indexing, and tools for live context management and hallucination detection. It enables saving lessons to local files, trimming conversation history, and verifying code symbols to prevent errors.
An MCP server that gives AI coding assistants persistent memory, context control, and anti-hallucination tools.
Early release — actively developed, APIs may change. Expect rough edges.
Context control — Trim conversation context live (no restart needed), inject curated knowledge into sessions, monitor context usage.
Persistent knowledge — Save lessons, patterns, cautions, and edge cases to flat files that survive across sessions. Organize by project section, file, or globally.
Project indexing — AST-based symbol extraction (via @ast-grep/napi), API route detection, HTML page inventory. Produces a compact project overview designed to give Claude a detailed map of your project for a fraction of your context window.
Anti-hallucination — Symbol registry with fuzzy matching catches hallucinated function names, typos, and unknown symbols. Includes a post-write hook that automatically warns about hallucinated imports, file paths, function calls, and API routes after every edit.
| Tool | Description |
|---|---|
context_status |
Check context usage — message count, estimated tokens, bloat indicators |
prune_context |
Trim old messages live. Modes: oldest_percent, before_message, after_phrase |
inject_context |
Insert curated context as a new conversation root. Requires /resume to reload |
| Tool | Description |
|---|---|
save_wisdom |
Persist lessons, patterns, cautions, edge cases, or decisions to .wisdom/ files |
get_wisdom |
Load wisdom for a file, section, or keyword. Call with no args for project overview |
update_plan |
Document feature plans with files, decisions, and status |
list_wisdom |
Browse what wisdom exists — sections, plans, patterns, sidecars |
| Tool | Description |
|---|---|
reindex_project |
Scan project, extract symbols via AST, save to .wisdom/symbols.json |
get_project_overview |
Compact project map — file tree, symbols, API routes, HTML pages. Always fresh |
| Tool | Description |
|---|---|
check_symbols |
Cross-reference symbols against registry. Reports: confirmed, fuzzy match (typo?), or unknown (hallucinated?) |
refresh_symbols |
Re-scan and update the symbol registry |
git clone https://github.com/InfiniQuest-App/wisdom-store.git
cd wisdom-store
npm install
Add to your ~/.claude.json or project .mcp.json (see examples/mcp.json):
{
"mcpServers": {
"wisdom-store": {
"command": "node",
"args": ["/path/to/wisdom-store/src/mcp-server/index.js"],
"env": {}
}
}
}
Restart Claude Code or run /mcp to connect.
Copy the relevant sections from examples/CLAUDE.md into your project's CLAUDE.md. This teaches Claude when to load wisdom, save knowledge, check symbols, and manage context.
The hooks/ directory contains Claude Code hooks that integrate with wisdom-store automatically.
Add to your settings file — ~/.claude/settings.json (global), .claude/settings.json (project), or .claude/settings.local.json (personal per-project). Replace /path/to/wisdom-store with your actual clone path.
Automatically checks for hallucinations after every Write/Edit:
Requires .wisdom/symbols.json — run get_project_overview once to generate it (auto-refreshes on each call). Only fires for code files (.js, .ts, .py, .go, .rs).
Reminds Claude to save important findings to wisdom-store before context gets compacted. Fires on both manual (/compact) and automatic compaction. Only fires in projects with a .wisdom/ directory.
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit",
"hooks": [{
"type": "command",
"command": "/path/to/wisdom-store/hooks/post-write-symbol-check.sh",
"timeout": 10
}]
},
{
"matcher": "Write",
"hooks": [{
"type": "command",
"command": "/path/to/wisdom-store/hooks/post-write-symbol-check.sh",
"timeout": 10
}]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [{
"type": "command",
"command": "/path/to/wisdom-store/hooks/pre-compact-save-reminder.sh",
"timeout": 10
}]
}
]
}
}
Everything is flat files in a .wisdom/ directory at your project root:
.wisdom/
index.json # Project metadata + file list
symbols.json # Symbol registry (functions, classes, exports, routes)
sections/ # Knowledge organized by topic
auth.md
estimates.md
plans/ # Feature plans
v2-migration.md
patterns/ # Reusable patterns
error-handling.md
Wisdom is stored at three levels:
.wisdom/sections/, .wisdom/plans/, .wisdom/patterns/ for knowledge about this projectmyfile.js gets myfile.js.wisdom~/.claude/wisdom/ for cross-project lessons (use scope: "global" with save_wisdom)prune_context works by setting parentUuid: null on a target message in the JSONL conversation file, orphaning everything before it. This takes effect live on the next message — no restart needed.
inject_context appends a new message with parentUuid: null as a fresh root. Requires /resume to reload. A helper script (hooks/send-resume.sh) is included as a starting point for tmux automation, but manual /resume is the most reliable approach.
Uses @ast-grep/napi (tree-sitter based) for JavaScript/TypeScript/TSX. Extracts functions, classes, variables, exports, interfaces, types, enums. Regex fallback for Python, Go, and Rust.
The project overview is designed to be context-efficient — compact enough to fit in a single tool response while covering file tree, symbols, routes, and pages.
Running get_project_overview on this repo:
# Project Overview
## Files (16)
Total: 3,093 lines
- hooks/: symbol-check.mjs (273L)
- src/mcp-server/: index.js (371L)
- src/mcp-server/lib/: indexer.js (643L), jsonl.js (276L), wisdom.js (325L)
- src/mcp-server/tools/: check-symbols.js (87L), context-status.js (123L),
get-project-overview.js (58L), get-wisdom.js (179L), inject-context.js (177L),
list-wisdom.js (144L), prune-context.js (125L), refresh-symbols.js (15L),
reindex-project.js (92L), save-wisdom.js (106L), update-plan.js (99L)
## Symbols
Functions: 62, Classes/Types: 0, Exports: 40
### Exports
- appendLine — src/mcp-server/lib/jsonl.js:273
- checkSymbols — src/mcp-server/lib/indexer.js:543
- findConversationFile — src/mcp-server/lib/jsonl.js:30
- generateOverview — src/mcp-server/lib/indexer.js:450
- handleCheckSymbols — src/mcp-server/tools/check-symbols.js:24
- handlePruneContext — src/mcp-server/tools/prune-context.js:23
- scanProject — src/mcp-server/lib/indexer.js:50
- walkChain — src/mcp-server/lib/jsonl.js:160
... (40 exports total)
1. Start working on a task
2. get_project_overview → understand the codebase
3. get_wisdom for relevant files/sections → load past knowledge
4. Work on the task
5. save_wisdom to persist new insights
6. check_symbols after writing code → catch hallucinations
7. If context gets large: save_wisdom → prune_context → continue
| Language | AST extraction | Regex fallback |
|---|---|---|
| JavaScript (.js, .mjs, .cjs, .jsx) | Full | - |
| TypeScript (.ts, .tsx) | Full | - |
| Python (.py) | - | Functions, classes, methods |
| Go (.go) | - | Functions, types, variables |
| Rust (.rs) | - | Functions, structs, enums, traits |
| HTML (.html) | - | Page titles, structure |
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"wisdom-store": {
"command": "npx",
"args": []
}
}
}