深度网络研究服务器

MCP深度网络研究服务器是一个用于高级网络研究的模型上下文协议服务器,提供智能搜索队列、增强内容提取和深度研究能力。

  • by qpd-v
  • TypeScript
  • 本地部署
  • 87 星标
  • 更新于
在 GitHub 查看 qpd-v/mcp-DEEPwebresearch

使用说明

MCP深网研究服务器(v0.3.0)

用于高级web研究的模型上下文协议(MCP)服务器。

最新变化

  • 添加了visit_page工具,用于直接提取网页内容
  • 优化性能,在MCP超时限制内工作
    • 减少了默认的maxDepth和maxBranching参数
    • 提高页面加载效率
    • 在整个过程中添加了超时检查
    • 增强的超时错误处理

这个项目是 mcp网络研究 靠近 mzxrai,增强了深层网络研究功能的附加功能。我们感谢原创者的基础工作。

通过智能搜索排队、增强的内容提取和深入的研究能力,将实时信息带入克劳德。

特性

  • 智能搜索排队系统

    • 具有速率限制的批量搜索操作
    • 具有进度跟踪功能的队列管理
    • 错误恢复和自动重试
    • 搜索结果重复数据删除
  • 增强的内容提取

    • 基于TF-IDF的相关性评分
    • 关键字邻近度分析
    • 内容部分权重
    • 可读性评分
    • 改进的HTML结构解析
    • 结构化数据提取
    • 更好的内容清理和格式化
  • 核心功能

    • 谷歌搜索集成
    • 网页内容提取
    • 研究会话跟踪
    • 改进格式的Markdown转换

先决条件

安装

全局安装(推荐)

# Install globally using npm
npm install -g mcp-deepwebresearch

# Or using yarn
yarn global add mcp-deepwebresearch

# Or using pnpm
pnpm add -g mcp-deepwebresearch

本地项目安装

# Using npm
npm install mcp-deepwebresearch

# Using yarn
yarn add mcp-deepwebresearch

# Using pnpm
pnpm add mcp-deepwebresearch

Claude桌面集成

安装软件包后,将此条目添加到您的 claude_desktop_config.json:

视窗

{
  "mcpServers": {
    "deepwebresearch": {
      "command": "mcp-deepwebresearch",
      "args": []
    }
  }
}

地点: %APPDATA%\Claude\claude_desktop_config.json

macOS

{
  "mcpServers": {
    "deepwebresearch": {
      "command": "mcp-deepwebresearch",
      "args": []
    }
  }
}

地点: ~/Library/Application Support/Claude/claude_desktop_config.json

此配置允许Claude Desktop在需要时自动启动web研究MCP服务器。

首次设置

安装后,运行此命令以安装所需的浏览器依赖项:

npx playwright install chromium

用法

只需与克劳德开始聊天,并发送一条有益于网络研究的提示。如果你想为更深入的网络研究定制一个预构建的提示,你可以使用 agentic-research 提示我们通过此套餐提供。通过单击聊天输入中的回形针图标,然后选择 Choose an integration → deepwebresearch → agentic-research.

工具

  1. deep_research

    • 通过内容分析进行全面研究
    • 论据:
      {
        topic: string;
        maxDepth?: number;      // default: 2
        maxBranching?: number;  // default: 3
        timeout?: number;       // default: 55000 (55 seconds)
        minRelevanceScore?: number;  // default: 0.7
      }
      
    • 退货:
      {
        findings: {
          mainTopics: Array<{name: string, importance: number}>;
          keyInsights: Array<{text: string, confidence: number}>;
          sources: Array<{url: string, credibilityScore: number}>;
        };
        progress: {
          completedSteps: number;
          totalSteps: number;
          processedUrls: number;
        };
        timing: {
          started: string;
          completed?: string;
          duration?: number;
          operations?: {
            parallelSearch?: number;
            deduplication?: number;
            topResultsProcessing?: number;
            remainingResultsProcessing?: number;
            total?: number;
          };
        };
      }
      
  2. parallel_search

    • 通过智能排队并行执行多个谷歌搜索
    • 论据: { queries: string[], maxParallel?: number }
    • 注:maxParallel限制为5,以确保可靠的性能
  3. visit_page

    • 访问网页并提取其内容
    • 论据: { url: string }
    • 退货:
      {
        url: string;
        title: string;
        content: string;  // Markdown formatted content
      }
      

鼓励

agentic-research

一个有指导的研究提示,帮助克劳德进行彻底的网络研究。提示指示克劳德:

  • 从广泛的搜索开始,了解主题格局
  • 优先考虑高质量、权威的来源
  • 根据研究结果迭代完善研究方向
  • 让你了解情况,让你以互动的方式指导研究
  • 始终使用URL引用来源

配置选项

服务器可以通过环境变量进行配置:

  • MAX_PARALLEL_SEARCHES:最大并发搜索数(默认值:5)
  • SEARCH_DELAY_MS:搜索之间的延迟(毫秒)(默认值:200)
  • MAX_RETRIES:失败请求的重试次数(默认值:3)
  • TIMEOUT_MS:请求超时(毫秒)(默认值:55000)
  • LOG_LEVEL:日志记录级别(默认值:“info”)

错误处理

常见问题

  1. 速率限制

    • 症状:“请求太多”错误
    • 解决方案:增加 SEARCH_DELAY_MS 或减少 MAX_PARALLEL_SEARCHES
  2. 网络超时

    • 症状:“请求超时”错误
    • 解决方案:确保请求在60秒MCP超时内完成
  3. 浏览器问题

    • 症状:“浏览器无法启动”错误
    • 解决方案:确保Playwright安装正确(npx playwright install)

调试

这是测试版软件。如果您遇到问题:

  1. 检查Claude Desktop的MCP日志:

    # On macOS
    tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
    
    # On Windows
    Get-Content -Path "$env:APPDATA\Claude\logs\mcp*.log" -Tail 20 -Wait
    
  2. 启用调试日志记录:

    export LOG_LEVEL=debug
    

发展

设置

# Install dependencies
pnpm install

# Build the project
pnpm build

# Watch for changes
pnpm watch

# Run in development mode
pnpm dev

测试

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

代码质量

# Run linter
pnpm lint

# Fix linting issues
pnpm lint:fix

# Type check
pnpm type-check

贡献

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

编码标准

  • 遵循TypeScript的最佳实践
  • 保持测试覆盖率在80%以上
  • 记录新功能和API
  • 更新CHANGELOG.md以获取重大更改
  • 遵循语义版本控制

性能注意事项

  • 尽可能使用批处理操作
  • 实施适当的错误处理和重试
  • 考虑大型数据集的内存使用情况
  • 在适当的时候缓存结果
  • 使用流媒体播放大量内容

需求

  • Node.js>=18
  • Playwright(作为依赖项自动安装)

已验证平台

  • [x] macOS
  • [x] 窗户
  • []Linux

许可证

麻省理工学院

鸣谢

该项目建立在以下优秀工作的基础上 mcp网络研究 靠近 mzxrai原始代码库为我们增强的特性和功能奠定了基础。

作者

qpd-v