Skip to main content
Glama
Hajime-Y

Deep Research MCP Server

by Hajime-Y

深度研究 MCP 服务器

Deep Research 是一款基于代理的工具,提供网页搜索和高级研究功能。它利用 HuggingFace 的smolagents ,并以 MCP 服务器的形式实现。

该项目基于HuggingFace 的 open_deep_research 示例。

特征

  • 网络搜索和信息收集

  • PDF和文档分析

  • 图像分析与描述

  • YouTube 成绩单检索

  • 档案网站搜索

Related MCP server: Web Research MCP

要求

  • Python 3.11 或更高版本

  • uv包管理器

  • 以下 API 密钥:

    • OpenAI API 密钥

    • HuggingFace 代币

    • SerpAPI 密钥

安装

  1. 克隆存储库:

git clone https://github.com/Hajime-Y/deep-research-mcp.git
cd deep-research-mcp
  1. 创建虚拟环境并安装依赖项:

uv venv
source .venv/bin/activate # For Linux or Mac
# .venv\Scripts\activate # For Windows
uv sync

环境变量

在项目根目录下创建.env文件,并设置以下环境变量:

OPENAI_API_KEY=your_openai_api_key
HF_TOKEN=your_huggingface_token
SERPER_API_KEY=your_serper_api_key

您可以通过在Serper.dev注册来获取 SERPER_API_KEY。

用法

启动 MCP 服务器:

uv run deep_research.py

这将启动deep_research代理作为 MCP 服务器。

Docker 使用

您还可以在 Docker 容器中运行此 MCP 服务器:

# Build the Docker image
docker build -t deep-research-mcp .

# Run with required API keys
docker run -p 8080:8080 \
  -e OPENAI_API_KEY=your_openai_api_key \
  -e HF_TOKEN=your_huggingface_token \
  -e SERPER_API_KEY=your_serper_api_key \
  deep-research-mcp

注册 MCP 客户端

要将此 Docker 容器在不同的客户端中注册为 MCP 服务器:

克劳德桌面

将以下内容添加到您的 Claude Desktop 配置文件中(通常位于 Linux 上的~/.config/Claude/claude_desktop_config.json 、macOS 上的~/Library/Application Support/Claude/claude_desktop_config.json或 Windows 上的%APPDATA%\Claude\claude_desktop_config.json ):

{
  "mcpServers": {
    "deep-research-mcp": {
      "command": "docker",
      "args": [
        "run", 
        "-i", 
        "--rm", 
        "-e", "OPENAI_API_KEY=your_openai_api_key",
        "-e", "HF_TOKEN=your_huggingface_token", 
        "-e", "SERPER_API_KEY=your_serper_api_key",
        "deep-research-mcp"
      ]
    }
  }
}

游标 IDE

对于 Cursor IDE,添加以下配置:

{
  "mcpServers": {
    "deep-research-mcp": {
      "command": "docker",
      "args": [
        "run", 
        "-i", 
        "--rm", 
        "-e", "OPENAI_API_KEY=your_openai_api_key",
        "-e", "HF_TOKEN=your_huggingface_token", 
        "-e", "SERPER_API_KEY=your_serper_api_key",
        "deep-research-mcp"
      ]
    }
  }
}

与远程 MCP 服务器一起使用

如果您在远程计算机上运行 MCP 服务器或将其作为服务公开,则可以使用基于 URL 的配置:

{
  "mcpServers": {
    "deep-research-mcp": {
      "url": "http://your-server-address:8080/mcp",
      "type": "sse"
    }
  }
}

关键组件

  • deep_research.py :MCP 服务器的入口点

  • create_agent.py :代理创建和配置

  • scripts/ :各种工具和实用程序

    • text_web_browser.py :基于文本的 Web 浏览器

    • text_inspector_tool.py :文件检查工具

    • visual_qa.py :图像分析工具

    • mdconvert.py :将各种文件格式转换为 Markdown

执照

该项目根据 Apache License 2.0 提供。

致谢

该项目使用了 HuggingFace 的smolagents和 Microsoft 的autogen项目的代码。

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    An automated research agent that leverages Google Gemini models and Google Search to perform deep, multi-step web research, generating sophisticated queries and producing citation-rich answers.
    1
    28
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to search and fetch high-quality information from multiple sources, including general web APIs, Wikipedia, arXiv, Hacker News, Stack Exchange, and Crossref, with optional pro-mode deep research and clean markdown page extraction.
    10
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to perform deep web research by searching, fetching, chunking, retrieving, and synthesizing cited answers from exact source passages via a deep_research tool.
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to perform live web searches across 9 engines, scrape web pages into clean formats, and run agentic research with citations via MCP.
    98 PyPI
    3
    MIT