Labsco
ameeralns logo

DeepResearch MCP

β˜… 27

from ameeralns

A powerful research assistant for conducting iterative web searches, analysis, and report generation.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

DeepResearch MCP

<div align="center">

DeepResearch Logo TypeScript OpenAI Node.js

</div>

πŸ“š 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

<div align="center">
Copy & paste β€” that's it
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    β”‚     β”‚                 β”‚     β”‚                β”‚
β”‚  MCP Server Layer  β”œβ”€β”€β”€β”€β–Ίβ”‚ Research Serviceβ”œβ”€β”€β”€β”€β–Ίβ”‚ Search Service β”‚
β”‚  (Tools & Prompts) β”‚     β”‚ (Session Mgmt)  β”‚     β”‚  (Firecrawl)   β”‚
β”‚                    β”‚     β”‚                 β”‚     β”‚                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                     β”‚
                                     β–Ό
                           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                           β”‚                 β”‚
                           β”‚  OpenAI Service β”‚
                           β”‚ (Analysis/Rpt)  β”‚
                           β”‚                 β”‚
                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
</div>

πŸ”§ MCP Integration

Available MCP Resources

Resource PathDescription
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 NameDescriptionParameters
initialize-researchStart a new research sessionquery: string, depth: number
execute-research-stepExecute the next research stepsessionId: string
generate-reportCreate a final reportsessionId: string, timeout: number (optional)
complete-researchExecute the entire research processquery: 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

  1. Copy the sample configuration

    Copy & paste β€” that's it
    cp claude_desktop_config_sample.json ~/path/to/claude/desktop/config/directory/claude_desktop_config.json
  2. Edit the configuration file

    Update the path to point to your installation of deep-research-mcp and add your API keys:

    Copy & paste β€” that's it
    {
      "mcpServers": {
        "deep-research": {
          "command": "node",
          "args": [
            "/absolute/path/to/your/deep-research-mcp/dist/index.js"
          ],
          "env": {
            "FIRECRAWL_API_KEY": "your-firecrawler-api-key",
            "OPENAI_API_KEY": "your-openai-api-key"
          }
        }
      }
    }
  3. Restart Claude Desktop

    After saving the configuration, restart Claude Desktop for the changes to take effect.

  4. Using with Claude Desktop

    Now you can ask Claude to perform research using commands like:

    Copy & paste β€” that's it
    Can you research the impact of climate change on coral reefs and provide a detailed report?

πŸ“‹ Sample Client Code

Copy & paste β€” that's it
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

async function main() {
  // Connect to the server
  const transport = new StdioClientTransport({
    command: "node",
    args: ["dist/index.js"]
  });

  const client = new Client({ name: "deep-research-client", version: "1.0.0" });
  await client.connect(transport);

  // Initialize research
  const initResult = await client.callTool({
    name: "initialize-research",
    arguments: {
      query: "The impact of artificial intelligence on healthcare",
      depth: 3
    }
  });
  
  // Parse the response to get sessionId
  const { sessionId } = JSON.parse(initResult.content[0].text);
  
  // Execute steps until complete
  let currentDepth = 0;
  while (currentDepth < 3) {
    const stepResult = await client.callTool({
      name: "execute-research-step",
      arguments: { sessionId }
    });
    
    const stepInfo = JSON.parse(stepResult.content[0].text);
    currentDepth = stepInfo.currentDepth;
    
    console.log(`Completed step ${stepInfo.currentDepth}/${stepInfo.maxDepth}`);
  }
  
  // Generate final report with timeout
  const report = await client.callTool({
    name: "generate-report",
    arguments: { 
      sessionId,
      timeout: 180000 // 3 minutes timeout
    }
  });
  
  console.log("Final Report:");
  console.log(report.content[0].text);
}

main().catch(console.error);

πŸ“ License

ISC

πŸ™ Acknowledgements