Markdown-FastRAG-MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Markdown-FastRAG-MCP
A semantic search engine for markdown documents. An MCP server with non-blocking background indexing, multi-provider embeddings (Gemini, OpenAI, Vertex AI, Voyage), and Milvus / Zilliz Cloud vector storage — designed for multi-agent concurrent access.
This project is a fork of Zackriya-Solutions/MCP-Markdown-RAG, heavily extended for production multi-agent use. Original project is licensed under Apache 2.0.
Ask "what are the tradeoffs of microservices?" and find your notes about service boundaries, distributed systems, and API design — even if none of them mention "microservices."
Public Surface
Area | Current status |
Package |
|
Runtime | Python >=3.10 MCP server |
Storage | Milvus Lite by default; Milvus Standalone or Zilliz Cloud through |
Embeddings | local, Gemini, OpenAI, OpenAI-compatible, Vertex AI, Voyage |
License | Apache-2.0, inherited from the upstream fork lineage |
GitHub Pages | Prepared from |
Release CI | Existing PyPI release workflow has successful historical runs |
Local verification |
|
graph LR
A["Claude Code"] --> M["Milvus Standalone<br/>(Docker)"]
B["Codex"] --> M
C["Copilot"] --> M
D["Antigravity"] --> M
M --> V["Shared Document Index"]Related MCP server: Notes RAG MCP Server
Quick Start
pip install markdown-fastrag-mcpAdd to your MCP host config:
{
"mcpServers": {
"markdown-rag": {
"command": "uvx",
"args": ["markdown-fastrag-mcp"],
"env": {
"EMBEDDING_PROVIDER": "gemini",
"GEMINI_API_KEY": "${GEMINI_API_KEY}",
"MILVUS_ADDRESS": "http://localhost:19530"
}
}
}
}Tip: Omit
MILVUS_ADDRESSfor local-only use (defaults to SQLite-based Milvus Lite).
Verification
python3 -m py_compile server.py utils.py reindex.py chunking.py
python3 -m buildThe release workflow builds with uv build and publishes through PyPI trusted publishing on GitHub releases. The prepared CI workflow also validates package metadata, docs assets, and core Python syntax before future pushes.
Features
Semantic matching — finds conceptually related content, not just keyword hits
Multi-provider embeddings — Gemini, OpenAI, Vertex AI, Voyage, or local models
Async background indexing — non-blocking
index_documentsreturns instantly withjob_id; poll withget_index_statusEvent-loop-safe threading — all sync I/O runs in worker threads via
asyncio.to_threadSmart incremental indexing — mtime/size fast-path skips unchanged files without reading them
3-way delta scan — classifies files as new/modified/deleted in one walk; new files skip Milvus delete
Smart chunk merging — small chunks below
MIN_CHUNK_TOKENSare merged with siblings; parent header context injectedEmpty chunk filtering — frontmatter-only and structural-only chunks (headers/separators with no prose) are dropped at indexing and filtered at search time
Short chunk drop — final chunks below
MIN_FINAL_TOKENS(default 150) are dropped with per-chunk stderr loggingReconciliation sweep — after each index run, queries all Milvus paths and deletes orphan vectors whose source files no longer exist on disk
Search dedup — per-file result limiting prevents a single document from dominating results
Scoped search & pruning —
scope_pathfilters results to subdirectories; pruning never wipes unrelated dataBatch embedding & insert — concurrent batches with 429 retry, chunked Milvus inserts under gRPC 64MB limit
Shell reindex CLI —
reindex.pyfor large-scale indexing with real-time progress logs
📚 Documentation
Document | Description |
All 6 providers: setup, auth, tuning, rate limiting | |
Lite vs Standalone vs Zilliz Cloud, Docker Compose, troubleshooting | |
Non-blocking flow, | |
Chunk merging, header injection, batch insert, search dedup |
Tools
Tool | Description |
| Start background index job, returns |
| Poll job status ( |
| Semantic search with relevance scores and file paths |
| Reset vector database and tracking state |
How It Works
flowchart LR
A["📁 Markdown Files"] -->|"walk + filter"| B["🔍 Delta Scan<br/>mtime/size"]
B -->|changed| C["✂️ Chunk + Merge"]
B -->|unchanged| SKIP["⏭️ Skip"]
B -->|deleted| PRUNE["🗑️ Prune"]
C --> D["🧠 Embed"]
D -->|"batch insert"| E["💾 Milvus"]
F["🔎 Query"] --> D
D -->|"k×5"| G["📊 Dedup + Top-K"]
style A fill:#2d3748,color:#e2e8f0
style D fill:#553c9a,color:#e9d8fd
style E fill:#2a4365,color:#bee3f8
style G fill:#22543d,color:#c6f6d5
style PRUNE fill:#742a2a,color:#fed7d7Configuration
Core
Variable | Default | Description |
|
|
|
|
| Vector dimension |
|
| Milvus address or local file path |
| — | Lock workspace root |
Indexing
Variable | Default | Description |
|
| Token chunk size |
|
| Token overlap between chunks |
|
| Small-chunk merge threshold |
|
| Drop final chunks below this token count |
|
| Max results per file ( |
|
| Texts per API call |
|
| Parallel batches |
|
| Delay (ms) between batch waves |
|
| Rows per Milvus insert (gRPC 64MB limit) |
Tip: Defaults work well for most vaults. Adjust
MIN_CHUNK_TOKENS/MIN_FINAL_TOKENSif short notes are being dropped unexpectedly. Changes require a force reindex (reindex.py --force).See Embedding Providers for full auth and tuning options.
Security & Privacy
API keys are read from environment variables; never commit provider keys or host MCP configs with literal secrets.
MARKDOWN_WORKSPACEcan lock indexing and search to an approved root.scope_pathshould be used when exposing search to multiple agents so one project cannot silently query another project's notes.Generated vector stores and tracking databases can reveal file paths and note topics; treat
.db/and Milvus exports as private data.clear_indexis destructive and should be reserved for explicit maintenance, not routine search.
Performance
Metric | Result |
Unchanged files — hash computations | 0 (mtime/size fast-path) |
Changed file — embed + insert | ~3 seconds |
No changes — full scan | instant |
Full reindex (1300 files, 23K chunks) | ~7–8 minutes |
License
Apache 2.0 — see LICENSE for full text.
This project is a fork of MCP-Markdown-RAG by Zackriya Solutions. Original project is licensed under Apache 2.0; this fork maintains the same license.
Key additions over upstream:
Multi-provider embeddings (Gemini, Vertex AI, OpenAI, Voyage)
Milvus vector store replacing Qdrant
Non-blocking background indexing with
asyncio.to_thread3-way delta scan (new/modified/deleted)
Smart chunk merging with parent header injection
Empty chunk filtering (frontmatter-only / structural-only drop)
Short chunk drop (final chunks below 150 tokens with per-chunk logging)
Reconciliation sweep (Milvus↔disk ghost vector cleanup)
Scoped search & pruning, batch embedding, shell CLI
VS Code Copilot MCP compatibility (dummy params for zero-required-arg tools)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
MCP-native collaborative markdown editor with real-time AI document editing
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic search and retrieval over local Markdown/MDX documentation using Node.js-based embeddings. Supports multi-language documentation with offline vector indexing and MCP tool exposure for AI assistants.28 npm4MIT
- AlicenseNot gradedqualityBmaintenanceEnables semantic search over personal markdown notes by indexing them into a vector database and exposing search, reindex, and status tools via MCP.MIT
- AlicenseAqualityBmaintenanceIndexes local Markdown/text files into a SQLite database with vector embeddings and provides MCP tools for semantic search without cloud dependencies.31AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceProvides MCP tools for semantic search over personal knowledge sources using pluggable embeddings and local vector indexing.1MIT