mcp-markdown-kb
Allows pointing the server at an Obsidian vault to turn it into a searchable knowledge base, with tools for full-text search, reading notes, listing notes, retrieving backlinks, listing tags, and reindexing. Understands Obsidian-style wikilinks, frontmatter tags, and note metadata.
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., "@mcp-markdown-kbwhat do my notes say about rate limiting?"
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.
mcp-markdown-kb
An MCP server that turns any folder of
Markdown notes into a knowledge base an AI assistant can search and read.
Point it at your Obsidian vault, your docs/ folder, or a pile of meeting
notes, and Claude can find the right note, follow links between notes, and
quote from them.
No database, no embeddings, no API keys: everything is indexed in memory at startup with a small BM25 implementation written for this project.
What it exposes
Tool | What it does |
| BM25 full-text search. Title, tags and headings are weighted above body text. Optional |
| Full body plus metadata (title, tags, headings, outgoing links, word count, modified time). |
| Every note, optionally filtered by tag. |
| Notes that link to a given note through |
| Tag cloud with counts. |
| Re-scan the folder after you edit notes. |
Every note is also published as a resource at note:///<relative/path.md>
with text/markdown content, so clients that support resources can attach a
note directly to the conversation.
Note format
Plain Markdown works as-is. The parser additionally understands:
Frontmatter between
---fences:title,tags: [a, b]or a- itemlist, and any otherkey: valuepairs (kept infrontmatter). This is a small YAML subset, not a full YAML parser.Titles: frontmatter
title, else the first#heading, else the file name.Links:
[[Wiki links]],[[Wiki links|alias]],[[Note#heading]], and[text](relative/path.md). Wikilinks resolve by title, file name, or path, case-insensitively.
Hidden folders and node_modules are skipped.
Related MCP server: mcp-vault-reader
Running it
Requires Node 22.18+.
npm install
npm run build
node dist/cli.js ~/notes # or: MARKDOWN_KB_DIR=~/notes node dist/cli.jsThe server speaks MCP over stdio. Logs go to stderr so they never corrupt the protocol stream.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"markdown-kb": {
"command": "node",
"args": ["/absolute/path/to/mcp-markdown-kb/dist/cli.js", "/absolute/path/to/notes"]
}
}
}Claude Code
claude mcp add markdown-kb -- node /absolute/path/to/mcp-markdown-kb/dist/cli.js /absolute/path/to/notesThen ask things like "what do my notes say about rate limiting?" or "which notes link to the API gateway design doc?".
Development
npm run typecheck # tsc over source and tests
npm test # node --test, no test framework dependency
npm run build # emits dist/
npm run dev -- ./test/fixtures/notes # run from source, no build stepTests spin up the real server and a real MCP client joined by the SDK's
InMemoryTransport, so the protocol layer (schemas, tool listing, resource
templates) is exercised end to end without spawning a process.
How the pieces fit
src/markdown.ts parse one note: frontmatter, title, headings, tags, links
src/search.ts tokenizer + BM25 index + snippet extraction
src/kb.ts walk the folder, build the index, resolve links, backlinks
src/server.ts McpServer: tools and the note:/// resource template
src/cli.ts argument handling and the stdio transportDesign notes:
read_noteand the resource handler only accept paths that resolve inside the root folder, so a client cannot read arbitrary files.Tools are annotated (
readOnlyHint) so hosts can skip confirmation prompts for the read-only ones.Only two runtime dependencies: the MCP SDK and Zod (which the SDK uses for input validation and JSON Schema generation).
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Markdown notes in folders, with files, that your AI assistant can read, write and organise.
Markdown notes in folders, with files, that your AI assistant can read, write and organise.
Personal context for every AI: search, read, and write back to your private Markdown library.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants like Claude and Codex to read, write, search, and traverse Markdown notes stored in a self-hosted knowledge base.7 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to search, read, and traverse Markdown note vaults (Obsidian-compatible) with full-text search, backlinks, knowledge graphs, and a persistent memory system for cross-session context.1613 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to capture, search, update, and delete notes in a local Markdown vault with automatic categorization and tagging, making knowledge management seamless.2 npm1MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to search, retrieve, and browse Markdown documentation in a local folder, then answer questions with cited sources.6MIT