Skip to main content
Glama

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_docs performs semantic vector searches and returns structured, similarity-thresholded context snippets with source details.

  • Resources: docs://catalog and docs://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.


Related MCP server: mcp-rag-server

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)

  1. api_clients: Stores client credentials (never raw API keys, only SHA-256 hashes), rate limits, and revocation states.

  2. documents: Tracks document metadata, connector sources (filesystem, confluence, git), and last_synced_at timestamps.

  3. 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.5 dense model).

  • Payload: chunk_id (deterministic UUIDv5), doc_id, doc_title, section, text, source_connector.


4. Getting Started

Local Setup

  1. Initialize virtual environment & install requirements:

    python -m venv .venv
    .venv\Scripts\activate   # Windows
    source .venv/bin/activate # Unix
    pip install -r requirements.txt
  2. Run Server:

    python -m uvicorn app.main:app --port 8000

    On 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
F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Local-first RAG engine with MCP server for AI agent integration.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pragati243/DocuMind-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server