Markdown Knowledge MCP
Searches and reads a local corpus of Markdown notes, indexing headings and text and returning BM25-ranked excerpts with section IDs, citations, and line ranges.
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., "@Markdown Knowledge MCP search my notes for the deployment checklist"
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.
Markdown Knowledge MCP
Search a local folder of Markdown notes from an MCP client. The server indexes headings and text with SQLite FTS5, ranks matching sections with BM25, and returns source paths and line ranges so you can check the excerpts yourself.
It is a retrieval tool, not a chatbot: it does not generate answers, decide which source is correct, or call an AI service. If sources disagree, compare the cited sections. If nothing matches, the server reports that instead of inventing an answer.
Try it
You need uv, Python 3.10 or newer with SQLite FTS5, and macOS or Linux (including WSL). Clone the repository and run:
git clone https://github.com/Videhisawesome/markdown-knowledge-mcp.git
cd markdown-knowledge-mcp
uv sync --locked
uv run markdown-knowledge-mcp --root "$PWD/examples/knowledge"The server speaks MCP over stdio. It waits for a client and does not open a network port. The example folder contains fictional documentation; replace it with a dedicated folder of Markdown files you are allowed to share with your client.
Connect an MCP client
For a client that uses a JSON mcpServers configuration, set the uv path, checkout path, and Markdown folder to real absolute paths: use command -v uv to find uv.
{
"mcpServers": {
"markdown-knowledge": {
"command": "/absolute/path/to/uv",
"args": [
"--directory", "/absolute/path/to/markdown-knowledge-mcp",
"run", "markdown-knowledge-mcp",
"--root", "/absolute/path/to/notes"
]
}
}
}Use the equivalent stdio setup in clients with a different configuration format.
Related MCP server: Brain MCP
Tools
Tool | What it does |
| Returns ranked matching excerpts with section IDs and citations. |
| Reads a matching section with its relative path and line range. Use |
| Rebuilds the index after you add, move, or edit notes. |
Mark a documentation gap
If a section is deliberately unwritten, make <!-- knowledge-gap --> the entire body under its heading. A matching gap is labeled documented_gap and returns the citation but no excerpt. An ordinary no-match is labeled no_matches. If another document has written material on the same topic, inspect that source separately.
Privacy and limits
The server reads the Markdown folder you configure. Use a narrow folder, not your home directory.
The search index is in memory. The server does not modify source files or send requests over the network. An MCP client or its model provider may receive text returned by the tools. Only point the server at content permitted by that client's data policies.
Treat document text as untrusted. An excerpt is evidence, not an instruction for a client to follow.
The index reads UTF-8
.mdand.markdownfiles, skips hidden files and symlinks, and caps scans at 1 MiB per file and 16 MiB overall. Refresh reports when scan limits were reached.Search is lexical, not semantic. Wording matters; try a narrower or alternate term when a search misses. Results are not proof that a fact is true, current, or the only relevant answer.
Development
uv run python -m unittest discover -s tests -vMIT licensed. See LICENSE.
Available Tools
3 toolsread_sectionBRead-only
Read text by indexed section ID, paging with next_offset when present.
Inputs: section_id (required), offset, max_chars. Returns: object
refresh_indexAIdempotent
Reread the configured corpus into memory without writing to its filesystem.
Inputs: no named parameters. Returns: object
search_knowledgeARead-only
Find Markdown excerpts with relative paths, headings, and source line ranges.
Search uses all distinct words in a query. Try short keyword phrases, and inspect multiple sources before drawing a conclusion. No matches is not an answer.
Inputs: query (required), limit. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes: search_knowledge discovers excerpts, read_section retrieves a specific indexed section, and refresh_index rebuilds the in-memory index. There is little risk of misselection because each targets a different stage of the retrieval workflow.
All tool names follow a consistent snake_case verb_noun pattern: search_knowledge, read_section, refresh_index. The convention is predictable and readable throughout.
For a focused Markdown knowledge retrieval server, three tools are well-scoped and each earns its place. The surface is intentionally small rather than thin, since search, read, and refresh cover the core workflow.
The tools cover discovery, section reading, and index refresh, which is most of the read-only knowledge lifecycle. However, there is no explicit list/browse operation or a clearly stated way to resolve a section ID from search results before read_section is used.
Maintenance
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Search, read, and safely update Markdown notes in your connected Phasoric knowledge vaults.
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal MCP server for querying and maintaining a Markdown vault. Provides full-text search, backlinks, note retrieval, and optional confined write tools, without sending the whole vault to the client context.2256 PyPI1Apache 2.0
- AlicenseBqualityDmaintenanceEnables hybrid dense and BM25 search over a markdown vault, with tools for reading, writing, grepping, and managing notes through any MCP-compatible client.12MIT
- AlicenseNot gradedqualityBmaintenanceProvides hybrid search (BM25 + vector) and staleness reporting for local markdown notes, exposing search and indexing tools to AI assistants via MCP.14 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables local semantic and full-text search over Markdown notes through MCP, returning relevant passages ranked by meaning and exact terms without requiring a GPU or hosted APIs.MIT