开始使用
GPT Researcher MCP 服务器为 GPT Researcher 提供了模型上下文协议 (MCP) 集成,允许 AI 助手通过 MCP 协议执行自主、全面的网络研究并生成报告。
为何选择 GPT Researcher MCP?
虽然许多 AI 应用可以通过 MCP 访问网页搜索工具,但 GPT Researcher MCP 能提供更深入的结果。标准搜索工具返回的是原始结果,需要手动筛选,通常包含不相关的来源,并浪费上下文窗口空间。
GPT Researcher 执行的是自主、深入的研究——而不仅仅是搜索。它能智能地探索和验证多个来源,只关注相关和最新的信息。虽然比标准搜索稍慢(30-40秒),但它能为大语言模型 (LLM) 提供更高质量的信息、优化的上下文、全面的结果以及更好的推理能力。
MCP 服务器向 AI 助手开放以下功能:
资源
research_resource:通过研究获取与给定任务相关的网络资源。
主要工具
deep_research:对某一主题进行自主的网络研究,查找最可靠和最相关的信息。quick_search:执行快速网络搜索,优先考虑速度而非质量,返回带摘要的搜索结果。write_report:根据研究结果生成报告。get_research_sources:获取研究中使用的来源。get_research_context:获取研究的完整上下文。
提示
research_query:创建一个研究查询提示。
先决条件
在运行 MCP 服务器之前,请确保您已具备:
- 安装 Python 3.10 或更高版本
- 您计划使用的服务的 API 密钥
- OpenAI API 密钥
- Tavily API 密钥(或您计划使用的其他搜索 API)
安装
- 克隆 GPT Researcher 代码库
git clone https://github.com/assafelovic/gptr-mcp.git
- 安装依赖项
pip install -r requirements.txt
- 设置您的环境变量
- 复制
.env.example文件,创建一个名为.env的新文件。
cp .env.example .env- 编辑
.env文件,添加您的 API 密钥并配置其他设置。
OPENAI_API_KEY=your_openai_api_key
TAVILY_API_KEY=your_tavily_api_key - 复制
运行 MCP 服务器
您可以通过两种方式启动 MCP 服务器:
方法 1:直接使用 Python
python server.py
方法 2:使用 MCP CLI(如果已安装)
mcp run server.py
服务器运行后,您将看到输出信息,表明服务器已准备好接受连接。
与 Claude 集成
将您的 MCP 服务器与 Claude 集成主要有两种方式:
有关每种方法的详细说明,请点击上面的链接。
与 Claude 一起使用的示例
User: I'm considering investing in NVIDIA. Can you research the current state of the company, recent stock performance, latest product announcements, and analyst opinions?
Claude: I'll help you research NVIDIA for investment purposes. This will take a moment as I conduct comprehensive research to find the most up-to-date information about their stock performance, recent developments, and expert analysis.
[Claude uses conduct_research tool - this takes 30-40 seconds]
Claude: Based on my research, here's a comprehensive analysis of NVIDIA's current state:
## NVIDIA (NVDA) Current Status
### Recent Stock Performance
- Current price: $942.89 (as of my research)
- YTD performance: +90.4%
- 52-week range: $460.30 - $974.00
- Market cap: ~$2.32 trillion
### Recent Key Developments
1. **Blackwell AI Platform**: At GTC 2024, NVIDIA unveiled the Blackwell architecture, their next-generation AI chip platform promising 4x performance improvement over Hopper. Major cloud providers (AWS, Google, Microsoft) have already committed to integrating Blackwell.
2. **Q1 FY2025 Earnings (May 2024)**:
- Revenue: $26.0 billion (+262% YoY)
- Data Center revenue: $22.6 billion (+427% YoY)
- Gross margin: 78.4%
- Announced 10-for-1 stock split effective June 7, 2024
3. **Supply Chain Expansion**: Increased investments in manufacturing capacity with TSMC to address ongoing chip shortages for their high-demand AI GPUs.
### Analyst Consensus
- Strong Buy consensus with 37 analysts rating it "Buy," 5 "Hold," and 0 "Sell"
- Average price target: $1,042 (post-split adjusted: $104.20)
- Key bull thesis: Continued AI infrastructure spending and NVIDIA's dominant position in AI chips
- Key bear concerns: Valuation, potential competition from AMD, Intel, and custom silicon from tech giants
### Industry Position
- Dominant in AI GPU market with estimated 80-90% market share
- Expanding ecosystem through CUDA software platform and industry partnerships
- Diversifying beyond chips with DGX Cloud, AI software platforms, and automotive solutions
故障排除
如果您在运行 MCP 服务器时遇到问题:
- 请确保您的 API 密钥在
.env文件中设置正确。 - 检查您是否正在使用 Python 3.10 或更高版本。
- 确保所有依赖项都已正确安装。
- 查看服务器日志以获取错误信息。
后续步骤
- 浏览 MCP 协议文档,以更好地了解如何与 Claude 集成。
- 了解 GPT Researcher 的核心功能,以增强您的研究能力。
- 查阅高级用法指南,了解更多配置选项。
:-)