A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Make every AI agent you use smarter. Persistent memory with SQLite FTS5, MCP server, Obsidian sync, and self-learning in
Make every AI agent you use smarter.
A persistent memory system that captures, classifies, synthesizes, and retrieves knowledge for AI agents. One brain, multiple agents, compounding intelligence. Production-proven with 200+ documents, three agents (Claude, Codex, Gemini), and daily use.
This is not just a search engine. It is an intelligence pipeline that turns raw information into refined, retrievable knowledge -- and gets smarter every session.
AI agents are stateless. Every session starts from zero. You end up:
The smarter the model, the more painful the amnesia. Context is the bottleneck, not intelligence.
knowledge-base-server sits between your knowledge and your AI agents. It ingests everything -- your Obsidian vault, code, documents, YouTube transcripts, X bookmarks, terminal sessions -- and serves it through MCP and REST APIs. Every agent you use reads from and writes to the same brain.
Your AI gets smarter every day. Every session builds on the last.
Obsidian Vault ------+
Code Repos ----------+
YouTube Transcripts --+---> [ KB Server ] ---> SQLite + FTS5 ---> [ MCP ] ---> Claude Code
X/Twitter Bookmarks -+ | | Codex CLI
Web Clippings -------+ Port 3838 Embeddings [ REST ] --> Gemini CLI
Terminal Sessions ----+ Web Dashboard Semantic Search ChatGPT
Bug Fix Captures -----+ Any MCP Client
Obsidian is the source of truth -- the human layer where you organize, link, and curate knowledge. The KB server is the optimized retrieval layer that makes it AI-ready with minimal token usage.
This is the core differentiator. Raw information flows through seven layers to become actionable intelligence:
Ingest from everywhere:
kb_capture_youtubekb_capture_webkb_capture_session records what worked, failed, and whykb_capture_fix records symptom, cause, and resolutionEvery source enters the system as a raw capture, ready for processing.
The kb_classify tool runs AI classification on unprocessed content:
Raw clippings become structured, searchable knowledge automatically.
Raw captures get refined into higher-value knowledge artifacts:
kb_promote tool extracts structured knowledge from raw materialThe kb_synthesize tool connects dots across sources:
Not all knowledge is equal. The system uses three tiers to prevent context pollution:
| Tier | What Lives Here | When Retrieved | Example |
|---|---|---|---|
| Hot | Active project context, recent sessions, current decisions | First, always | "How did we fix auth yesterday?" |
| Warm | Accumulated lessons, research, validated workflows | When relevant to query | "What's our Docker networking pattern?" |
| Cold | Raw captures, archived sources, old terminal logs | Only when deep-diving | "What did that YouTube video say about caching?" |
Why three tiers? Without tiering, a search for "authentication" returns every raw article you ever clipped alongside your actual auth architecture decision. The tiers ensure agents get signal, not noise. Hot knowledge is always fresh and relevant. Cold knowledge is preserved but doesn't pollute active context.
Every token costs money and context window space. The retrieval system minimizes waste:
kb_context returns summaries and metadata WITHOUT full content -- 90%+ token savingskb_search uses FTS5 with BM25 ranking, title boosting, and AND-first precisionkb_search_smart combines keyword and semantic search for conceptual querieskb_read loads full content only when needed, after context identifies relevant docsThis is the core innovation. The system compounds intelligence over time:
Sessions 1-10: AI makes mistakes. You correct. Fixes get captured.
Sessions 10-50: AI recognizes patterns. Starts getting things right more often.
Sessions 50-100: AI knows your codebase, preferences, architecture patterns.
Sessions 100+: One-shot clean code. Accumulated context covers everything.
The loop in detail:
kb_capture_session, kb_capture_fix)kb_synthesize organizes and connects to existing knowledgeThis is NOT fine-tuning. NOT RLHF. It is self-modifying instructions through operational history. The model doesn't change. The context it receives does. And context is everything.
Core
kb_search_smart) combining keyword + semantic for conceptual querieskb start, kb search, kb ingest, kb setup)kb register)kb setup) with agent-compatible auto modeIngestion
Intelligence
Integration
Security
git clone https://github.com/willynikes2/knowledge-base-server.git
cd knowledge-base-server
npm install
npm link
kb setup
The wizard detects your environment, asks which AI agents you use, configures everything, and runs your first ingest. Takes about 60 seconds.
For agent-driven installation (no prompts):
kb setup --auto --password=yourpass --vault=~/obsidian-vault --agents=claude,codex --deploy=systemd
KB_PASSWORD=yourpassword kb start # Start server on port 3838
kb register # Register MCP with Claude Code
kb ingest ~/obsidian-vault # Ingest your knowledge
kb search "docker networking" # Search from terminal
kb status # Check stats
After kb register, Claude Code automatically has access to all KB tools. Test it:
> Search the knowledge base for recent bug fixes
Claude will use kb_search and return results from your accumulated knowledge.
Memstalker is the hosted version of knowledge-base-server. Same engine, zero infrastructure.
| Self-Hosted (Free) | Memstalker Hosted | |
|---|---|---|
| Cost | Free forever | From $12/mo |
| Setup | Clone, install, configure | Sign up, connect your agents |
| Infrastructure | You run the VPS | We handle everything |
| Updates | git pull | Automatic |
| Multi-device sync | You configure | Built-in |
| Backups | You manage | Automatic |
| All 16 MCP tools | Yes | Yes |
| Obsidian integration | Yes | Yes |
| REST API + ChatGPT | Yes | Yes |
Self-host if: You want full control, have a VPS, and enjoy running your own infrastructure.
Use Memstalker if: You want persistent AI memory without managing servers. Connect your agents in minutes.
First 500 early adopters get Pro at $12/mo forever (normally $25): memstalker.com
All 16 tools available via MCP (stdio and HTTP):
| Tool | Description |
|---|---|
kb_search | Full-text search with BM25 ranking and highlighted snippets |
kb_search_smart | Hybrid keyword + semantic search for conceptual queries |
kb_context | Token-efficient briefing -- summaries only, 90%+ savings. Use BEFORE kb_read |
kb_read | Read full document content by ID |
kb_list | List documents filtered by type or tag |
kb_write | Write a new note to the Obsidian vault |
kb_ingest | Ingest raw text directly into the database |
kb_classify | Auto-classify unprocessed notes (type, tags, summary) |
kb_promote | Promote raw source into structured knowledge |
kb_synthesize | Generate cross-source synthesis connecting recent knowledge |
kb_capture_session | Record a debugging/coding session with findings |
kb_capture_fix | Record a bug fix with symptom, cause, resolution |
kb_capture_web | Capture a web article with content and metadata |
kb_capture_youtube | Capture a YouTube transcript with metadata |
kb_vault_status | Show vault indexing stats by type and project |
kb_safety_check | Review a destructive action against KB history |
kb setup Interactive setup wizard (--auto for agent mode)
kb start Start the dashboard + API server (default :3838)
kb stop Stop the running server
kb mcp Start MCP stdio server (used by AI tools)
kb register Register MCP server with Claude Code
kb ingest <path> Ingest a file or directory
kb search <query> Search documents from terminal
kb status Show stats and server status
kb classify Auto-classify unprocessed vault notes
kb summarize Generate AI summaries for unsummarized notes
kb capture-x Ingest X/Twitter bookmarks from export
kb safety-check Review a planned action against KB history
+------------------+
| AI Agents |
| Claude | Codex |
| Gemini | ChatGPT |
+--------+---------+
|
MCP (stdio) | REST API (/api/v1/)
MCP (HTTP) | OpenAPI 3.1
|
+--------+---------+
| KB Server |
| Express :3838 |
+--------+---------+
|
+-------------------+-------------------+
| | |
+--------+-------+ +-------+--------+ +-------+--------+
| SQLite + FTS5 | | Embeddings | | Obsidian |
| documents | | all-MiniLM | | Vault Sync |
| vault_files | | L6-v2 local | | (bidirectional)|
| embeddings | | cosine sim | | source of truth|
+----------------+ +----------------+ +----------------+
Data directory: ~/.knowledge-base/
kb.db -- SQLite database with FTS5 indexfiles/ -- Ingested file copiesconfig.json -- Password hash and settings| Category | Extensions |
|---|---|
| Markdown | .md |
| Text | .txt, .log, .json, .yaml, .yml, .xml, .csv |
| Code | .js, .ts, .jsx, .tsx, .py, .go, .rs, .java, .rb, .sh, .bash, .c, .cpp, .h, .hpp, .html, .css, .sql, .toml |
| .pdf (with text extraction) | |
| Config | .env, .ini, .cfg, .conf |
# Set vault path in .env
OBSIDIAN_VAULT_PATH=~/obsidian-vault
# Or ingest manually
kb ingest ~/obsidian-vault
The vault indexer tracks file hashes for incremental updates -- only changed files get re-indexed.
# Download transcript
yt-dlp --write-auto-sub --skip-download -o transcript https://youtube.com/watch?v=VIDEO_ID
# Or use the MCP tool directly from your AI agent:
# kb_capture_youtube with URL and transcript text
# Export bookmarks to markdown using twitter-web-exporter (browser extension)
# Then ingest:
kb ingest ~/bookmarks/x_bookmarks.md
# Or use the built-in capture command:
kb capture-x ~/path/to/x_bookmarks.md
From your AI agent after a debugging session:
Use kb_capture_session to record:
- goal: "Fix authentication flow for email users"
- commands_worked: "docker exec postgres psql query"
- commands_failed: "curl returned 401 - missing jellyfin_user_id"
- root_causes: "Email login path didn't propagate jellyfin_user_id to frontend"
- fixes: "Added jellyfin_user_id to auth response schema"
- lessons: "Always check all auth paths when adding fields to user response"
Use kb_capture_fix to record:
- title: "Library page blank for email login users"
- symptom: "Library page shows empty, no media items loaded"
- cause: "jellyfin_user_id not included in email auth response"
- resolution: "Added field to shared auth schema, redeployed"
kb register # Writes to ~/.claude.json automatically
All 16 MCP tools become available in Claude Code immediately.
Point your MCP client at the stdio transport:
{
"mcpServers": {
"knowledge-base": {
"command": "node",
"args": ["/path/to/knowledge-base-server/bin/kb.js", "mcp"]
}
}
}
https://your-domain.com/openapi.jsonX-API-KeyREST API endpoints at /api/v1/:
GET /api/v1/search?q=query -- Full-text searchGET /api/v1/search/smart?q=query -- Semantic searchGET /api/v1/context?q=query -- Token-efficient briefingGET /api/v1/documents -- List documentsGET /api/v1/documents/:id -- Read documentPOST /api/v1/ingest -- Ingest contentPOST /api/v1/capture/session -- Capture sessionPOST /api/v1/capture/fix -- Capture fixPOST /api/v1/capture/web -- Capture web contentAll agents connect to the same KB server. What Claude learns in one session, Codex and Gemini can access in the next. The KB is the shared brain.
For remote agents, set up API keys in .env:
KB_API_KEY_CLAUDE=your-unique-key-for-claude
KB_API_KEY_OPENAI=your-unique-key-for-openai
KB_API_KEY_GEMINI=your-unique-key-for-gemini
This repo is designed to be set up BY AI agents, not just for them.
llms.txt (30 seconds to understand the full system)EXTENDING.md (deep customization guide written FOR agents)kb setup --auto with appropriate flags for the user's environmentThe wizard detects your OS, available AI tools, Obsidian vault location, and preferred deployment method. It generates a custom .env, registers MCP, installs the service, and runs the first ingest.
For the non-technical user: kb setup and answer 5 questions.
For the programmer: Everything is in .env and composable. Override anything.
For the AI agent: kb setup --auto with flags. Zero prompts.
This repo includes templates for the self-learning development methodology:
docs/workflow/
CLAUDE.md.template -- Operating contract for Claude Code
AGENTS.md.template -- Cross-agent rules (Claude, Codex, Gemini)
SELF-LEARNING.md -- The full methodology: three-tier memory,
intelligence pipeline, compounding loop,
multi-agent self-learning, Obsidian integration
Copy these templates to your project root and customize them. They define:
These are the actual development patterns used to build this system. Open sourced so you can adopt the same workflow.
| Variable | Required | Default | Description |
|---|---|---|---|
KB_PASSWORD | Yes (first run) | -- | Dashboard login password |
KB_PORT | No | 3838 | HTTP server port |
OBSIDIAN_VAULT_PATH | No | -- | Obsidian vault path for sync |
KB_API_KEY_CLAUDE | No | -- | API key for Claude remote access |
KB_API_KEY_OPENAI | No | -- | API key for OpenAI/ChatGPT access |
KB_API_KEY_GEMINI | No | -- | API key for Gemini access |
BETTER_AUTH_SECRET | No | -- | OAuth token signing secret |
BETTER_AUTH_URL | No | -- | OAuth issuer URL for remote access |
CLASSIFY_MODEL | No | claude-haiku-4-5-20251001 | Model for AI classification |
For production deployment with auto-restart:
sudo cp kb-server.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable kb-server
sudo systemctl start kb-server
Or use the setup wizard: kb setup and select "systemd" as the deployment mode.
The service restarts automatically on failure with a 5-second delay. Logs via journalctl -u kb-server -f.
I built this because I run three AI agents (Claude, Codex, Gemini) across multiple projects. Without shared context, each agent starts from zero every session. I was copy-pasting context, re-explaining architecture, and losing debugging insights that took hours to discover.
With the KB server, all three agents share the same brain. Claude captures a bug fix at 2am, Codex finds it the next morning. Gemini reviews code with full project history. The system gets smarter every day -- not because the models improve, but because the context they receive compounds.
The cost model: $60/month total for three agents via CLI subscription wrapping (not per-token API billing). The KB server runs on a $5/month VPS alongside everything else. The ROI is measured in hours of context re-discovery that never need to happen again.
AI is only as good as its context. This is the context layer.
MIT -- see LICENSE
Built by Shawn Daniel with significant contributions from Claude, Codex, and Gemini -- the first three users of the system they helped build.
"You gotta 100-shot 10 apps before you can 1-shot 10 apps."
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnos
MCP server integration for DaVinci Resolve Studio
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots