Knowledge Base MCP
Make every AI agent you use smarter. Persistent memory with SQLite FTS5, MCP server, Obsidian sync, and self-learning intelligence pipeline.
What is Knowledge Base MCP?
Knowledge Base MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to make every ai agent you use smarter. persistent memory with sqlite fts5, mcp server, obsidian sync, and self-learning intelligence pipeline.
Make every AI agent you use smarter. Persistent memory with SQLite FTS5, MCP server, Obsidian sync, and self-learning intelligence pipeline.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Make every AI agent you use smarter. Persistent memory with
Use Cases
Maintainer
Works with
Installation
NPM
npx -y knowledge-baseManual Installation
npx -y knowledge-baseConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Knowledge Base MCP
Knowledge Base MCP Server is a persistent memory system for AI agents that uses SQLite FTS5 full-text search with BM25 ranking and local semantic embeddings via HuggingFace's all-MiniLM-L6-v2 model to store and retrieve information across sessions without external API calls. It exposes 16 MCP tools covering search, read/write, ingestion, classification, synthesis, and session capture — and optionally syncs bidirectionally with an Obsidian vault for human-readable knowledge management. Developers who work with multiple AI agents (Claude, Codex, Gemini) use it as a shared intelligence layer that learns over time and delivers highly token-efficient context summaries.
Prerequisites
- Node.js 18 or later
- npm for installation and the kb CLI
- Optional: Obsidian installed with a vault directory if you want bidirectional Obsidian sync
- Optional: API keys for KB_API_KEY_CLAUDE, KB_API_KEY_OPENAI, or KB_API_KEY_GEMINI if using AI-powered classification
Clone and install the server
Clone the repository, install dependencies, and link the kb CLI globally so it is accessible from any directory.
git clone https://github.com/willynikes2/knowledge-base-server.git
cd knowledge-base-server
npm install
npm linkRun the interactive setup wizard
The setup wizard configures your password, port, optional Obsidian vault path, and which AI agents to register. Use --auto for a non-interactive setup.
# Interactive
kb setup
# Automated with flags
kb setup --auto --password=yourpass --vault=~/obsidian-vault --agents=claude,codex --deploy=systemdSet required environment variables
At minimum, set KB_PASSWORD for authentication. Set KB_PORT if you want a non-default port (default 3838). Add Obsidian and AI API keys as needed.
export KB_PASSWORD=your-secure-password
export KB_PORT=3838
export OBSIDIAN_VAULT_PATH=~/obsidian-vault
export KB_API_KEY_CLAUDE=sk-ant-...Register the server with Claude and other agents
Run `kb register` to automatically update the MCP configuration for all registered agents. This makes all 16 MCP tools available without manual JSON editing.
kb registerIngest initial knowledge
Use kb_ingest to load existing documents, notes, or code into the knowledge base. The server indexes content with both keyword (FTS5) and semantic (embedding) search.
# Via CLI
kb ingest ~/documents/notes.md
# Or ask Claude after setup
# "Ingest the contents of ~/documents/notes.md into the knowledge base"Knowledge Base MCP Examples
Client configuration
After running `kb register`, the configuration is written automatically. For manual setup, the server runs on a local port that the MCP client connects to.
{
"mcpServers": {
"knowledge-base": {
"command": "npx",
"args": ["-y", "knowledge-base"],
"env": {
"KB_PASSWORD": "your-secure-password",
"KB_PORT": "3838",
"OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian-vault"
}
}
}
}Prompts to try
Use Claude to search, store, and reason over your persistent knowledge base across sessions.
- "Search the knowledge base for anything related to authentication patterns I've used before"
- "Give me a token-optimized briefing on the current project context"
- "Store a note: decided to use Supabase for auth because of built-in RLS support"
- "Synthesize everything in the knowledge base about our API design decisions"
- "Classify and promote the last session's notes to permanent knowledge"Troubleshooting Knowledge Base MCP
kb command not found after npm link
Check that your npm global bin directory is on your PATH. Run `npm bin -g` to find the directory and add it to your shell profile (e.g., export PATH="$(npm bin -g):$PATH" in ~/.zshrc).
Semantic search returns irrelevant results
The local embedding model (all-MiniLM-L6-v2) must be downloaded on first run, which can take a few minutes. Wait for initialization to complete before ingesting content. Check server logs for download progress.
Obsidian vault changes are not reflected in the knowledge base
Ensure OBSIDIAN_VAULT_PATH is set to the exact vault root directory. The server watches for file changes automatically, but large vaults may take time to index. Run `kb sync` to trigger a manual sync.
Frequently Asked Questions about Knowledge Base MCP
What is Knowledge Base MCP?
Knowledge Base MCP is a Model Context Protocol (MCP) server that make every ai agent you use smarter. persistent memory with sqlite fts5, mcp server, obsidian sync, and self-learning intelligence pipeline. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Knowledge Base MCP?
Install via npm with the command: npx -y knowledge-base. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Knowledge Base MCP?
Knowledge Base MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Knowledge Base MCP free to use?
Yes, Knowledge Base MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Knowledge Base MCP Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Knowledge Base MCP? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Knowledge Base MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Knowledge Base MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.