DocuMind MCP

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.

Category
访问服务器

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_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.

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选