KB-MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@KB-MCP Server search for information about local-first knowledge bases"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
KB-MCP Server
A local-first Knowledge Base with Model Context Protocol (MCP) support. Give your AI a reliable memory. Run it locally. Stream answers in real time.
What is This?
A Knowledge Base (KB) is a structured collection of facts, documents, and embeddings stored in machine-readable form, with interfaces to:
Add knowledge
Query knowledge (semantic + keyword search)
Update/Delete knowledge
This MCP server exposes your KB to any MCP-compatible AI client (Claude, custom agents, etc.).
Why Local-First?
Benefit | Description |
Privacy | No cloud leaks — your data stays on your machine |
Zero latency | No network round-trips |
Offline support | Works without internet |
Full control | You own the data and the logic |
No vendor lock-in | Swap components freely |
Quick Start
Installation
npm install
npm run buildRun the Server
npm startOr for development:
npm run devConfigure with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"knowledge-base": {
"command": "node",
"args": ["/path/to/kb-mcp-server/dist/index.js"],
"env": {
"KB_DATA_DIR": "/path/to/your/data"
}
}
}
}Available Tools
Tool | Description |
| Add a document with title, content, and metadata |
| Semantic search across all documents |
| List documents with pagination |
| Get full document by ID |
| Update existing document |
| Remove document from KB |
| Get knowledge base statistics |
How It Works
1. User asks a question
↓
2. AI sends MCP query → KB-MCP Server
↓
3. KB retrieves relevant facts (semantic search)
↓
4. AI grounds the answer with real data
↓
5. Response streams to user
↓
6. (Optional) New insights stored backResult: AI answers correctly. Knowledge compounds. No hallucinations.
Architecture
┌─────────────────┐
│ AI Client │
│ (Claude, Agent) │
└────────┬────────┘
│ MCP Protocol
↓
┌─────────────────┐
│ KB-MCP Server │ ← stdio transport
│ ┌───────────┐ │
│ │ Tools │ │ ingest | query | list | delete
│ └─────┬─────┘ │
│ ↓ │
│ ┌───────────┐ │
│ │ Engine │ │ Embeddings + Similarity Search
│ └─────┬─────┘ │
│ ↓ │
│ ┌───────────┐ │
│ │ Store │ │ JSON file (swap with Chroma/pgvector)
│ └───────────┘ │
└─────────────────┘Configuration
Environment Variable | Default | Description |
|
| Directory for storing knowledge base data |
Production Enhancements
For production use, consider:
Real embeddings: Replace hash-based embeddings with OpenAI, Cohere, or local models (Ollama)
Vector database: Swap JSON store with Chroma, Qdrant, or pgvector
Chunking: Split large documents into chunks for better retrieval
Hybrid search: Combine semantic + BM25 keyword search
Access control: Add authentication for multi-user setups
License
MIT — Use freely.
Author
Matrix Agent
Available Tools
7 toolsdelete_documentC
Delete a document from the knowledge base.
Inputs: id (required).
get_documentC
Get a specific document by ID.
Inputs: id (required).
ingest_documentC
Ingest a document into the knowledge base. Stores content with embeddings for semantic search.
Inputs: title (required), content (required), metadata.
kb_statsB
Get knowledge base statistics.
Inputs: no named parameters.
list_documentsC
List all documents in the knowledge base.
Inputs: limit, offset.
query_knowledgeC
Query the knowledge base using semantic search.
Inputs: query (required), limit, threshold.
update_documentC
Update an existing document.
Inputs: id (required), title, content, metadata.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Every tool has a clearly distinct purpose with no ambiguity. Each targets a specific action on documents or the knowledge base (e.g., ingest, get, update, delete, list, query, stats), and the descriptions reinforce non-overlapping functions.
All tool names follow a consistent verb_noun pattern (e.g., delete_document, get_document, ingest_document), with no deviations in style or convention, making them predictable and readable.
With 7 tools, the server is well-scoped for a knowledge base management system. Each tool earns its place, covering essential CRUD operations, querying, and statistics without being overly sparse or bloated.
The tool set provides complete CRUD/lifecycle coverage for the knowledge base domain, including ingest, get, update, delete, list, query, and stats. There are no obvious gaps, allowing agents to handle all core workflows without dead ends.
Related MCP Connectors
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases — works with ChatGPT, Claude, Cursor and any MCP client.
Governed, auditable knowledge your team curates for its AI assistants, self-hostable