DocuMind MCP
A citation-grounded RAG server for internal documentation that exposes retrieval tools and resources via the Model Context Protocol, enabling any MCP client to search and access organizational knowledge with structured citations.
README
DocuMind MCP — Internal Docs RAG Server
DocuMind MCP is a citation-grounded RAG (Retrieval-Augmented Generation) system built natively on the Model Context Protocol (MCP). It exposes your organization's internal knowledge base (engineering runbooks, HR policies, onboarding documentation) directly to any MCP client (Claude Desktop, Claude Code, custom Slack agents) with zero custom integration code.
1. Problem Definition (The Value Proposition)
Before MCP, connecting AI tools to internal data sources suffered from the N×M integration problem: If you have N AI clients (Claude Desktop, internal CLI, Slack bots) and M data sources (Confluence, local markdown, policy wikis), you must write and maintain N×M bespoke integrations. Every client ends up implementing its own authentication, document parsing, retrieval logic, and citation rendering.
With DocuMind MCP:
- The knowledge base is exposed once as a unified MCP Server.
- Every MCP-speaking client gets access for free, with zero additional integration code.
- The server owns retrieval quality, grounding thresholds, and citation metadata exactly once.
Protocol Philosophy: Retrieval as a Primitive, Not a Black Box
Unlike typical "MCP wrappers" that expose a single opaque ask_question tool containing a hidden LLM call, DocuMind MCP exposes retrieval and structured context as primitives:
- Tools:
search_docsperforms semantic vector searches and returns structured, similarity-thresholded context snippets with source details. - Resources:
docs://cataloganddocs://document/{doc_id}/{section}expose browsable, addressable sections of documents. This separation leaves the final reasoning and citation synthesis to the calling client's LLM—preserving the reasoning transparency that MCP is built for.
2. Complete System Architecture
┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
│ Claude Desktop │ │ Claude Code │ │ Custom Agent │
└─────────┬─────────┘ └─────────┬─────────┘ └─────────┬─────────┘
│ │ │
│ MCP over HTTP (+ SSE handshake), all clients hit same protocol
└──────────────────────┼──────────────────────┘
│
┌───────────▼───────────┐
│ Auth Middleware │
│ - API key validation │
│ - Rate limiting │
└───────────┬───────────┘
│
┌───────────▼───────────┐
│ MCP Server Core │
│ (Tools & Resources) │
└─────────┬───────┬─────┘
│ │
┌─────────────────▼─┐ ┌─▼─────────────────┐
│ Tools: │ │ Resources: │
│ - search_docs │ │ - docs://catalog │
│ - get_doc │ │ - docs://document │
└─────────────────┬─┘ └─┬─────────────────┘
│ │
┌────────────▼───────▼─────┐
│ RAG Retrieval Core │
│ - Local Embeddings │
│ - Similarity filter │
└────────────┬─────────────b
│
┌────────▼────────┐
│ Vector DB │
│ (Qdrant) │
└─────────────────┘
3. Data Schema & Models
SQLite (Metadata, Logs & Auth)
api_clients: Stores client credentials (never raw API keys, only SHA-256 hashes), rate limits, and revocation states.documents: Tracks document metadata, connector sources (filesystem,confluence,git), andlast_synced_attimestamps.mcp_request_log: Structured audit log detailing client requests, latency, endpoints called, and summary stats.
Qdrant (document_chunks collection)
- Vector: 384 dimensions (
BAAI/bge-small-en-v1.5dense model). - Payload:
chunk_id(deterministic UUIDv5),doc_id,doc_title,section,text,source_connector.
4. Getting Started
Local Setup
-
Initialize virtual environment & install requirements:
python -m venv .venv .venv\Scripts\activate # Windows source .venv/bin/activate # Unix pip install -r requirements.txt -
Run Server:
python -m uvicorn app.main:app --port 8000On first run, the server automatically initializes SQLite and seeds the in-memory Qdrant instance with sample Confluence documentation. It will print a newly generated default API Key to the console.
Docker Deployment
docker compose up --build
This spins up both the FastAPI MCP Server and a persistent Qdrant instance running on local port 6333.
5. Integrating with Claude Desktop / Claude Code
To add this server to your Claude client, configure the SSE transport by pointing to the server endpoint with the generated API key:
claude_desktop_config.json
{
"mcpServers": {
"documind-rag": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector",
"http://localhost:8000/mcp/sse?api_key=YOUR_GENERATED_KEY"
]
}
}
}
6. Verification and Testing
Unit Tests
To run all tests (authentication, rate-limiting, and retrieval filtering):
python -m pytest
Self-Contained Handshake Test
Run the client script to simulate a complete protocol-level SSE handshake and JSON-RPC query cycle:
python tests/test_client.py
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.