多代理研究框架

Deep Research MCP是一个基于Python和MCP(消息控制协议)的多代理研究框架,提供研究、编辑、写作和发布等功能,适用于自动化研究任务和内容生成。

  • by JoshuaLelon
  • Python
  • 本地部署
  • 11 星标
  • 更新于
在 GitHub 查看 JoshuaLelon/deep-research-mcp

使用说明

深入研究MCP

该存储库提供了一个使用Python和MCP(消息控制协议)的多代理研究框架。默认入口点为 mcp_server.py,它设置了一个名为的FastMCP服务器 深入研究 并公开一个名为 deep_research.

设置

  1. 克隆存储库:

    git clone https://github.com/yourusername/deep-research-mcp.git
    cd deep-research-mcp
    
  2. 创建/填充您的 .env 文件:

    cp .env.example .env
    # Then edit the new .env file to fill in your secrets and environment variables
    # For example:
    # OPENAI_API_KEY=sk-123-yourkey
    # Additional environment variables can be placed here
    
  3. 安装依赖关系:

    pip install -r multi_agents/requirements.txt
    
  4. 编辑您的 claude_desktop_config.json 文件应包括以下内容:

    {
        "mcpServers": {
            "deep-research-mcp": {
                "command": "path/to/your/python/interpreter",
                "args": [
                    "/path/to/this/project/deep-research-mcp/mcp_server.py"
                ]
            }
        }
    }
    
  5. 运行MCP服务器:

    python mcp_server.py
    

    这将在本地启动FastMCP工具服务器。从这里,任何兼容MCP的客户端或CLI都可以调用 deep_research 工具。

项目概述

  • 多代理
    • 代理:包含各种AI代理(ResearchAgent、EditorAgent等)。
    • 记忆:用于存储研究和起草州的打字词典。
    • main.py:加载任务和编排代理的核心逻辑。
    • README.md:有关使用、文件输出设置等的其他说明。
  • mcp_server.py:主FastMCP服务器文件(入口点)。
  • 实用:跨代码库使用的共享函数和枚举。
  • .gitignore, 需求.txt等:标准设置文件。

下面是一份 multi_agents/README.md 以树状结构作为参考:

multi_agents/
│
├─ README.md
│   └─ (Documentation on file output vs. direct return)
│
├─ agents/
│   ├─ __init__.py
│   ├─ browser.py
│   ├─ researcher.py
│   ├─ editor.py
│   ├─ writer.py
│   ├─ publisher.py
│   └─ ... (other agents)
│
├─ memory/
│   ├─ __init__.py
│   ├─ draft.py
│   └─ research.py
│
├─ main.py
├─ __init__.py
└─ requirements.txt