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: AI Agent Marketplace Index Search

要求

  • 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项目的代码。

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hajime-Y/deep-research-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server