Integrations
Uses environment variables for configuration of API keys and other settings, with support for .env files
Runs on Node.js as the underlying runtime environment, requiring Node.js 18 or higher for operation
Leverages OpenAI for analysis and report generation as part of the research workflow, processing collected information into structured knowledge
DeepResearch MCP
📚 Overview
DeepResearch MCP is a powerful research assistant built on the Model Context Protocol (MCP). It conducts intelligent, iterative research on any topic through web searches, analysis, and comprehensive report generation.
🌟 Key Features
- Intelligent Topic Exploration - Automatically identifies knowledge gaps and generates focused search queries
- Comprehensive Content Extraction - Enhanced web scraping with improved content organization
- Structured Knowledge Processing - Preserves important information while managing token usage
- Scholarly Report Generation - Creates detailed, well-structured reports with executive summaries, analyses, and visualizations
- Complete Bibliography - Properly cites all sources with numbered references
- Adaptive Content Management - Automatically manages content to stay within token limits
- Error Resilience - Recovers from errors and generates partial reports when full processing isn't possible
🛠️ Architecture
💻 Installation
Prerequisites
- Node.js 18 or higher
- OpenAI API key
- Firecrawl API key
Setup Steps
- Clone the repositoryCopy
- Install dependenciesCopy
- Configure environment variablesEdit theCopy
.env
file and add your API keys:Copy - Build the projectCopy
🚀 Usage
Running the MCP Server
Start the server on stdio for MCP client connections:
Using the Example Client
Run research on a specific topic with a specified depth:
Parameters:
- First argument: Research topic or query
- Second argument: Research depth (number of iterations, default: 2)
- Third argument (optional): "complete" to use the complete-research tool (one-step process)
Example:
Example Output
The DeepResearch MCP will produce a comprehensive report that includes:
- Executive Summary - Concise overview of the research findings
- Introduction - Context and importance of the research topic
- Methodology - Description of the research approach
- Comprehensive Analysis - Detailed examination of the topic
- Comparative Analysis - Visual comparison of key aspects
- Discussion - Interpretation of findings and implications
- Limitations - Constraints and gaps in the research
- Conclusion - Final insights and recommendations
- Bibliography - Complete list of sources with URLs
🔧 MCP Integration
Available MCP Resources
Resource Path | Description |
---|---|
research://state/{sessionId} | Access the current state of a research session |
research://findings/{sessionId} | Access the collected findings for a session |
Available MCP Tools
Tool Name | Description | Parameters |
---|---|---|
initialize-research | Start a new research session | query : string, depth : number |
execute-research-step | Execute the next research step | sessionId : string |
generate-report | Create a final report | sessionId : string, timeout : number (optional) |
complete-research | Execute the entire research process | query : string, depth : number, timeout : number (optional) |
🖥️ Claude Desktop Integration
DeepResearch MCP can be integrated with Claude Desktop to provide direct research capabilities to Claude.
Configuration Steps
- Copy the sample configurationCopy
- Edit the configuration fileUpdate the path to point to your installation of deep-research-mcp and add your API keys:Copy
- Restart Claude DesktopAfter saving the configuration, restart Claude Desktop for the changes to take effect.
- Using with Claude DesktopNow you can ask Claude to perform research using commands like:Copy
📋 Sample Client Code
🔍 Troubleshooting
Common Issues
- Token Limit Exceeded: For very large research topics, you may encounter OpenAI token limit errors. Try:
- Reducing the research depth
- Using more specific queries
- Breaking complex topics into smaller sub-topics
- Timeout Errors: For complex research, the process may time out. Solutions:
- Increase the timeout parameters in tool calls
- Use the
complete-research
tool with a longer timeout - Process research in smaller chunks
- API Rate Limits: If you encounter rate limit errors from OpenAI or Firecrawl:
- Implement a delay between research steps
- Use an API key with higher rate limits
- Retry with exponential backoff
📝 License
ISC
🙏 Acknowledgements
- Built with Model Context Protocol
- Powered by OpenAI and Firecrawl
You must be authenticated.
A powerful research assistant that conducts intelligent, iterative research through web searches, analysis, and comprehensive report generation on any topic.