语义文档搜索服务器

Docsplorer MCP Server 是一个强大的语义文档搜索服务器,支持IDE集成和n8n工作流,提供多种搜索工具和双传输模式。

  • by Crypto-Gi
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 Crypto-Gi/docsplorer

使用说明

Docsplorer MCP服务器🚀

状态: ✅ 生产就绪
版本: 1.0.0
许可证:MIT

用于语义文档搜索的强大MCP(模型上下文协议)服务器,专为IDE集成和n8n工作流而设计。

🎯 快速开始

🖥️ 用于IDE集成(stdio模式)

python server.py

🌐 用于n8n集成(HTTP模式)

python server.py --transport http --port 8505

🐳 使用Docker

docker-compose up -d

🚀 特性

5强大的工具

  1. 搜索文件名_模糊 -按文件名查找文档
  2. 搜索_带文件名_筛选器 -在特定文档中搜索
  3. search_multi_query_with_filter -一个文档中有多个查询
  4. 搜索_交叉_多个文件 -跨文档搜索
  5. 比较版本 -比较不同版本的功能

双重运输支持

  • ✅ stdio模式 -IDE集成(Windsurf、Claude Desktop)
  • ✅ HTTP模式 -n8n工作流、web服务

部署就绪

  • ✅ Docker支持
  • ✅ 环境配置
  • ✅ 健康检查
  • ✅ 等级

📋 安装

选项1:直接使用Python(推荐)

# Clone and navigate
cd docsplorer

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API_URL and API_KEY

# Run in stdio mode (IDE)
python server.py

# Run in HTTP mode (n8n)
python server.py --transport http --port 8505

选项2:Docker

# Quick start
docker-compose up -d

# Access at: http://localhost:8505

🔧 n8n集成

完美匹配! n8n具有内置的MCP客户端节点。

配置:

  1. 启动服务器: python server.py --transport http --port 8505
  2. 在n8n MCP客户端节点中:
    • 统一资源定位符: http://localhost:8505/mcp
    • 运输: streamableHttp

示例n8n工作流:

Trigger → MCP Client → Process → Output

📖 文档

文件 目的
docs/INSTALL.md 安装指南
docs/TOOL_USAGE.md 工具文档
docs/TECHNICAL_GUIDE.md 完整的技术文档

🛠️ 环境设置

必需变量

# API Configuration
API_URL=http://localhost:8001
API_KEY=your-api-key-here

# Qdrant Settings
QDRANT_COLLECTION=content

# Search Defaults
DEFAULT_LIMIT=1
DEFAULT_CONTEXT_WINDOW=5

可选变量

# Transport Selection
TRANSPORT=http  # or stdio
HOST=0.0.0.0
PORT=8505

🎯 用例

IDE集成(stdio)

{
  "mcpServers": {
    "docsplorer": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": {
        "API_URL": "http://localhost:8001"
      }
    }
  }
}

n8n工作流

{
  "tool": "search_filenames_fuzzy",
  "arguments": {
    "query": "release notes",
    "limit": 10
  }
}

📊 演出

  • 记忆:约100-200MB
  • 中央处理器:典型使用率<5%
  • 响应时间:对于大多数查询,<2秒
  • 可扩展性:Docker已准备好投入生产

🔍 测试

# MCP HTTP endpoint tests
python -m tests.test_http_mode

# Direct functional tool tests
python -m tests.test_functional

# API key / authentication tests
python -m tests.test_mcp_tools

# Final verification of tool registration
python -m tests.final_verification

# Basic health check for HTTP mode
curl http://localhost:8505/

有关所有测试及其目的的概述,请参阅 TESTING_SUMMARY.md.

📦 分布

Docker 中心 (未来)

docker pull cryptogi/docsplorer:latest
docker run -p 8505:8505 cryptogi/docsplorer:latest

npm包 (未来)

npm install -g docsplorer-mcp

🤝 贡献

  1. 分叉存储库
  2. 创建特征分支
  3. 添加测试
  4. 提交PR

🗺️ 第二阶段路线图(Auth&Authentik)

  • 计划基于Authentik的身份验证层 对于HTTP MCP服务器,包括用户批准、令牌颁发和每个用户跟踪。请参阅以下内容中的完整BMAD规范:

📄 许可证

MIT许可证-请参阅 许可证 了解详情。

🔗 链接

  • GitHub: https://github.com/Crypto-Gi/docsplorer
  • 问题: https://github.com/Crypto-Gi/docsplorer/issues
  • 文档:请参阅各个.md文件

准备生产! 🚀

选择您的部署:

  • 集成开发环境:使用stdio模式
  • n8n:使用HTTP模式
  • 码头工人:使用容器化版本

最后更新:2025年11月13日