KB-MCP Server
Click on "Install 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 Serversearch 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.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes a document, implying a destructive mutation, but doesn't add context like whether deletion is permanent, requires specific permissions, or has side effects. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste—it directly states the tool's action and target. It's appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's destructive nature, no annotations, and no output schema, the description is incomplete. It lacks critical context like deletion permanence, error handling, or response format, which is essential for a mutation tool in a knowledge base system with siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema fully documents the 'id' parameter. The description doesn't add any meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema does all the work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and resource ('a document from the knowledge base'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'update_document' or 'ingest_document' beyond the verb choice, which is why it doesn't reach a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'update_document' or 'ingest_document', nor does it mention prerequisites such as needing an existing document ID. The description only states what it does, not when or why to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_documentC
Get a specific document by ID.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a document but does not disclose any behavioral traits such as error handling (e.g., what happens if the ID is invalid), permissions required, rate limits, or response format. This is a significant gap for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and front-loaded with a single sentence: 'Get a specific document by ID.' There is zero waste, and it directly communicates the core action without unnecessary details, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 parameter, 100% schema coverage) but lack of annotations and output schema, the description is incomplete. It does not address behavioral aspects like error cases or return values, which are crucial for effective use. For a retrieval tool with no structured output information, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'id' fully documented in the schema as 'Document ID'. The description adds no additional meaning beyond this, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the description does not compensate but also does not detract.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get a specific document by ID.' It specifies the verb ('Get') and resource ('document'), but does not differentiate it from sibling tools like 'list_documents' or 'query_knowledge' beyond the 'by ID' aspect, which is implied but not explicit. This makes it clear but not fully distinguished from alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention siblings like 'list_documents' for browsing or 'query_knowledge' for searching, nor does it specify prerequisites such as needing a document ID. This lack of context leaves usage unclear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_documentC
Ingest a document into the knowledge base. Stores content with embeddings for semantic search.
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Document title | |
| content | Yes | Document content (text, markdown, etc.) | |
| metadata | No | Optional metadata |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'ingests' and 'stores' content, implying a write operation, but doesn't cover critical aspects like required permissions, rate limits, idempotency, or what happens on duplicate ingestion. This leaves significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two clear sentences that directly state the tool's function and outcome. Every word earns its place, and it's front-loaded with the core purpose, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., side effects, error handling), return values, or how it integrates with siblings like 'query_knowledge'. For a tool that modifies state, more context is needed for safe and effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents parameters like 'title' and 'content'. The description adds no additional parameter semantics beyond what's in the schema, such as format details for 'content' or examples for 'metadata'. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('ingest') and resource ('document'), explaining it stores content with embeddings for semantic search. It distinguishes from siblings like 'delete_document' or 'get_document' by focusing on creation/storage, though it doesn't explicitly contrast with 'update_document' which might have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'update_document' or 'delete_document'. It mentions storing content for semantic search, which hints at use with 'query_knowledge', but lacks explicit when/when-not instructions or prerequisites for effective tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
kb_statsB
Get knowledge base statistics.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get knowledge base statistics,' implying a read-only operation, but doesn't specify whether this requires authentication, has rate limits, returns real-time or cached data, or what format the output takes. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero wasted words. It is front-loaded with the core purpose ('Get knowledge base statistics') and doesn't include unnecessary details or redundancy. This efficiency makes it easy for an agent to parse and understand the tool's intent quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what statistics are returned (e.g., document count, storage size, last updated), the data format, or any behavioral traits like performance or access requirements. For a tool with no structured output information, the description should provide more context to compensate, but it fails to do so.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately avoids mentioning any. A baseline of 4 is applied since no parameters exist, and the description doesn't introduce confusion about inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get') and resource ('knowledge base statistics'), making the purpose immediately understandable. It distinguishes this from siblings like 'list_documents' or 'query_knowledge' by focusing on aggregated metrics rather than document operations. However, it doesn't specify what types of statistics are included (e.g., counts, sizes, usage metrics), which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention whether this should be used for monitoring, reporting, or debugging, nor does it differentiate it from siblings like 'list_documents' (which might provide document counts) or 'query_knowledge' (which might involve content analysis). Without any context about usage scenarios or exclusions, the agent must infer when this tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_documentsC
List all documents in the knowledge base.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max documents | |
| offset | No | Offset |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether this is a read-only operation, if it requires authentication, how it handles pagination beyond the schema parameters, or what the output format might be, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., document metadata, full content, or IDs), how errors are handled, or any constraints like rate limits, which are crucial for a tool with two parameters and no structured output information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, clearly documenting 'limit' and 'offset' parameters. The description adds no additional meaning beyond what the schema provides, such as explaining how these parameters affect listing behavior, so it meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and resource ('documents in the knowledge base'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'query_knowledge' or 'get_document', which might also retrieve documents, so it lacks sibling distinction for a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer 'list_documents' over 'query_knowledge' for filtering or 'get_document' for specific retrieval, nor does it specify any prerequisites or exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_knowledgeC
Query the knowledge base using semantic search.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| limit | No | Max results | |
| threshold | No | Min similarity |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states the tool performs semantic search but doesn't explain what that entails (e.g., natural language processing, vector similarity), potential limitations (e.g., accuracy, performance), or expected outcomes (e.g., relevance-ranked results). This leaves significant gaps for an agent to understand how the tool behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a single sentence that directly states the tool's function. There is no wasted language or unnecessary elaboration, making it efficiently front-loaded and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a semantic search tool with 3 parameters and no annotations or output schema, the description is insufficient. It lacks details on behavior, usage context, and return values, leaving an agent with incomplete information to effectively select and invoke this tool among its siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, providing clear documentation for all parameters (query, limit, threshold). The description adds no additional semantic context beyond what the schema already states, such as examples of effective queries or how threshold affects results. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Query') and resource ('knowledge base') with the method ('semantic search'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_documents' or 'get_document', which might also retrieve knowledge base content but through different mechanisms.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when semantic search is appropriate compared to exact matching in 'get_document' or browsing in 'list_documents', nor does it specify prerequisites or exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_documentC
Update an existing document.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document ID | |
| title | No | New title | |
| content | No | New content | |
| metadata | No | New metadata |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool updates documents, implying mutation, but fails to mention permissions needed, whether changes are reversible, rate limits, or what happens to unspecified fields. This leaves significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It is appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a mutation tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavior, error handling, and return values, making it inadequate for safe and effective use by an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters (id, title, content, metadata). The description adds no meaning beyond the schema, such as explaining parameter interactions or constraints, resulting in the baseline score for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Update an existing document' clearly states the verb ('Update') and resource ('document'), but it's vague about what aspects can be updated and doesn't distinguish from siblings like 'ingest_document' or 'delete_document'. It provides a basic purpose but lacks specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'ingest_document' for creating or 'delete_document' for removal. The description implies usage for modifications but offers no explicit context, prerequisites, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v1.0.0- First observed
delete_document - First observed
get_document - First observed
ingest_document - First observed
kb_stats - First observed
list_documents - First observed
query_knowledge - First observed
update_document
TDQS
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.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
- KumbukaOAuthai.kumbuka
Governed, auditable knowledge your team curates for its AI assistants, self-hostable
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/isshiki-dev/kb-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server