Knowledge Base MCP Server
Allows for the creation of a searchable knowledge base from Markdown files, where content is automatically chunked and categorized based on heading structures for efficient retrieval.
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., "@Knowledge Base MCP Server search for information about learner licence restrictions"
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.
Knowledge Base MCP Server
A local MCP (Model Context Protocol) server that enables AI systems like Claude Desktop to search and query a knowledge base.
Features
Text Search: Search the knowledge base using natural language queries
Chunk Retrieval: Get specific chunks by ID for detailed information
Category Listing: Browse available topics in the knowledge base
Related MCP server: repocks
Installation
# Install dependencies
npm install
# Build the TypeScript code
npm run buildAvailable MCP Tools
Tool | Description |
| Search for relevant information using a query string |
| Retrieve a specific chunk by its ID |
| List all available categories in the knowledge base |
Connecting to Claude Desktop
Add this server to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"knowledge-base": {
"command": "node",
"args": ["/path/to/local-mcp-simple/dist/index.js"]
}
}
}After updating the config, restart Claude Desktop. You can then ask Claude to search the knowledge base, for example:
"Search the knowledge base for speed limits in school zones"
Development
# Build and run
npm run dev
# Or run separately
npm run build
npm startGenerating Knowledge Base
You can generate a new knowledge.json from any markdown file using the included script:
# Generate from a markdown file
npm run generate-knowledge -- ./path/to/your-document.md
# Specify output location
npm run generate-knowledge -- ./docs/handbook.md ./src/knowledge/knowledge.jsonMarkdown Format
The script parses markdown headings to create chunks:
H1 (
#) - Sets the category for subsequent chunksH2 (
##) - Creates a new chunk with this titleH3 (
###) - Also creates a new chunk with this titleH4 (
####) - Included as bold text within the current chunk
Example markdown:
# Licences
## Getting your driver licence
To get a full driver licence, you need to go through three stages...
## Learner licence restrictions
There are licence restrictions that you need to follow...
# Speed Limits
## The rules
On roads where there's a speed limit sign, you must not drive faster...This would create 3 chunks:
"Getting your driver licence" (category: "Licences")
"Learner licence restrictions" (category: "Licences")
"The rules" (category: "Speed Limits")
Knowledge Base
The server uses src/knowledge/knowledge.json which contains pre-chunked content for search.
Available Tools
3 toolsget_chunkA
Retrieve a specific chunk from the knowledge base by its ID. Use this when you need the full content of a previously found chunk.
Inputs: chunk_id (required).
list_categoriesB
List all available categories in the knowledge base. Helpful for understanding what topics are covered.
Inputs: no named parameters.
search_knowledgeC
Search the knowledge base for relevant information. Returns the most relevant chunks based on your query.
Inputs: query (required), top_k.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_chunk retrieves specific content by ID, list_categories enumerates available topics, and search_knowledge finds relevant information via query. There is no overlap or ambiguity between these functions.
All tool names follow a consistent verb_noun pattern (get_chunk, list_categories, search_knowledge) using snake_case throughout. The naming is predictable and readable.
With only 3 tools, the set feels thin for a knowledge base server, lacking operations like create, update, or delete for managing content. However, it covers basic retrieval and exploration adequately.
The tool surface is significantly incomplete for a knowledge base domain, as it only supports read operations (get, list, search) without any write capabilities (e.g., add_chunk, update_chunk, delete_chunk). This will limit agents to querying only.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
MCP server for querying Forkast documentation
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables interaction with Markdown knowledge bases, allowing users to search and retrieve content by tags, text, URL, or date range from their local markdown files.791-
- AlicenseNot gradedqualityDmaintenanceTransforms Markdown documentation into an intelligent knowledge base with AI-powered search and Q\&A through an MCP server.9MIT
- FlicenseNot gradedqualityDmaintenanceA CLI tool and MCP server that turns markdown documentation into a searchable, queryable knowledge base.-
- AlicenseNot gradedqualityBmaintenanceA lightweight MCP server for semantic search over markdown knowledge bases, enabling AI coding agents to index, search, and answer questions from local markdown documents.261 PyPIMIT