/ 目录 / 演练场 / mcp-documentation-server
● 社区 andrea9293 ⚡ 即开即用

mcp-documentation-server

作者 andrea9293 · andrea9293/mcp-documentation-server

Drop PDFs, Markdown, and text docs into a local vector store — then ask your AI questions with hybrid search. No cloud required.

mcp-documentation-server by andrea9293is a local RAG server. Drag-and-drop .txt / .md / .pdf files via a web UI (port 3080), or feed them via tools. Hybrid full-text + vector search with parent-child chunking. Runs fully local with built-in embeddings; Gemini key optional for smarter retrieval.

为什么要用

核心特性

实时演示

实际使用效果

documentation-server.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "documentation-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-documentation-server"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "documentation-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-documentation-server"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "documentation-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-documentation-server"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "documentation-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-documentation-server"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "documentation-server",
      "command": "npx",
      "args": [
        "-y",
        "mcp-documentation-server"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "documentation-server": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-documentation-server"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add documentation-server -- npx -y mcp-documentation-server

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: mcp-documentation-server

Make a new framework's docs queryable by your AI

👤 Devs adopting a new library ⏱ ~20 min beginner

何时使用: Official docs are huge; you want Claude to answer with grounded citations.

前置条件
  • mcp-documentation-server installed — npx -y @andrea9293/mcp-documentation-server
步骤
  1. Ingest the docs
    Upload the library's docs .md files to the dashboard at http://localhost:3080.✓ 已复制
    → Files processed into chunks
  2. Ask targeted questions
    search_documents for 'how to configure middleware' — give me the top 3 chunks with source paths.✓ 已复制
    → Cited excerpts
  3. Ask grounded synthesis
    Given those chunks, write the minimum viable config for middleware in this framework.✓ 已复制
    → Working config backed by cited doc lines

结果: A personal docs assistant that cites its sources.

注意事项
  • PDFs with scanned images aren't OCR'd — Pre-OCR with tools like ocrmypdf before upload
  • Huge doc sets without Gemini give noisy embeddings — Optional GEMINI_API_KEY unlocks higher-quality semantic search
搭配使用: filesystem

Turn an internal wiki export into a RAG source

👤 Teams with markdown-export-friendly wikis ⏱ ~25 min beginner

何时使用: You've exported your Notion/Confluence content as Markdown and want AI access.

步骤
  1. Bulk-ingest via process_uploads
    process_uploads on ./wiki-export/ — process every .md.✓ 已复制
    → Document count per folder
  2. Full-scope search
    search_all_documents: 'deployment runbook' — top 5.✓ 已复制
    → Ranked list

结果: A local, private, searchable wiki.

Build a personal research-paper library

👤 Researchers, students ⏱ ~30 min beginner

何时使用: You download papers and want them queryable instead of piled in Downloads/

步骤
  1. Drop PDFs in
    Upload all PDFs in ~/Papers/ to the documentation server.✓ 已复制
    → Papers chunked and indexed
  2. Ask across corpus
    search_documents: 'attention variants with lower quadratic cost' — return authors + years.✓ 已复制
    → Cited excerpts

结果: A local mini-perplexity over your own paper collection.

组合

与其他 MCP 搭配,撬动十倍杠杆

documentation-server + filesystem

Automate ingest from a watched folder

Every time a new PDF lands in ~/Papers/Inbox, process_uploads it into the documentation server.✓ 已复制
documentation-server + swarmvault

Compare: documentation-server is quick-ingest; swarmvault builds a structured wiki

Ingest my research PDFs into both systems; compare retrieval quality on the same query.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
add_document title, content, metadata? Programmatic ingest free (local embeddings)
list_documents (none) See what's indexed free
get_document id Retrieve a specific doc free
delete_document id Pruning free
search_documents query, top_k? Query within a specific doc set free
search_all_documents query, top_k? Global RAG query free
get_context_window chunk_id Expand a narrow hit into broader context free
search_documents_with_ai query One-shot answer synthesis Gemini call (needs key)
process_uploads path?: str Batch import from the uploads folder free

成本与限制

运行它的成本

API 配额
None if local; Gemini usage if GEMINI_API_KEY set
每次调用 Token 数
Search returns 500-3000 tokens depending on top_k
费用
Free; Gemini is paid per-call if enabled
提示
Skip Gemini for exploratory work — local embeddings are good enough for known-item lookups.

安全

权限、密钥、影响范围

凭据存储: GEMINI_API_KEY (optional) in env
数据出站: Local only unless Gemini is enabled; dashboard on port 3080

故障排查

常见错误与修复

Port 3080 in use

Set WEB_PORT env var to another port.

验证: lsof -i :3080
PDF parse error

Password-protected or scanned PDFs fail. Remove password or run OCR first.

验证: Try a plain PDF
search returns empty

Check documents ingested: list_documents. If empty, re-run process_uploads.

验证: list_documents

替代方案

mcp-documentation-server 对比其他方案

替代方案何时用它替代权衡
swarmvaultYou want a structured wiki + knowledge graph, not just searchHeavier; more upfront setup
Cloud RAG (Pinecone, Weaviate)You need team-shared, scalePaid; data leaves your machine
llm-context.pyYou want per-task context, not persistent doc retrievalDifferent problem

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills