Research Orchestration MCP server

Orchestrates intelligent research workflows by selecting and executing specialized tools (Brave Search, Tavily, GitHub, arXiv, news APIs) based on query context, synthesizing results into well-cited answers with iterative refinement and source attribution.
Back to servers
Setup instructions
Provider
objones25
Release date
Mar 20, 2025
Language
TypeScript
Stats
5 stars

The Research Orchestration Service is an AI-driven tool that gathers information from multiple sources to answer complex queries. It analyzes your questions, selects appropriate research tools, and synthesizes comprehensive, well-cited responses using Cloudflare Workers technology.

Installation

Prerequisites

  • Cloudflare Workers account
  • Node.js 16+
  • Wrangler CLI

Required API Keys

You'll need to obtain the following API keys:

# Core APIs
BRAVE_API_KEY=your_brave_api_key
TAVILY_API_KEY=your_tavily_api_key
GITHUB_TOKEN=your_github_token
FIRE_CRAWL_API_KEY=your_fire_crawl_api_key
NEWS_API_KEY=your_news_api_key
PATENTSVIEW_API_KEY=your_patentsview_api_key

# LLM APIs
OPENAI_API_KEY=your_openai_api_key
GROQ_API_KEY=your_groq_api_key

# Cloudflare Resources
SHARED_SECRET=your_shared_secret     # For API authentication
RESEARCH_CACHE=your_kv_namespace     # For result caching

Setup Steps

  1. Clone the repository:

    git clone https://github.com/yourusername/research-orchestration-service.git
    cd research-orchestration-service
    
  2. Install dependencies:

    npm install
    
  3. Configure environment variables:

    cp .env.example .env
    # Edit .env with your API keys
    
  4. Deploy to Cloudflare Workers:

    wrangler publish
    

Usage

Basic Example

Here's how to use the service in your code:

const worker = new ResearchWorker();

const result = await worker.research(
  "What are the latest developments in quantum computing?",
  3  // Research depth (1-5)
);

console.log(result.content[0].text);

Response Format

The service returns results in this format:

interface ResearchResult {
  answer: string;          // Synthesized research answer
  sources: Source[];       // List of sources used
  confidence: number;      // Overall confidence score (0-1)
  metadata: {
    executionTime: number;
    iterations: number;
    totalResults: number;
    queryTypes: string[];
    toolsUsed: string[];
    toolResults: ToolResult[];
  }
}

Configuration Options

Research Depth

The depth parameter (1-5) controls:

  • Number of research iterations
  • Number of tools used (depth * 1.5)
  • Result synthesis complexity

Tool Selection

Tool selection is managed through:

  • Relevance scoring in src/tools.ts
  • Tool compatibility metadata for query types
  • Intelligent reuse between iterations
  • Context-aware query optimization

Batch Processing

The system uses batch processing for:

  • Relevance assessment (batch size: 5, parallel batches: 3)
  • Gap analysis (batch size: 8)
  • Final diversity pass for large result sets

Caching

The system implements caching at multiple levels:

  • Full research results (TTL: 3 days)
  • Individual tool executions
  • Contextual metadata to improve cache hits

Advanced Features

Targeted Follow-up Queries

The system generates highly targeted follow-up queries that:

  • Focus specifically on missing information
  • Use precise terms related to identified gaps
  • Avoid repeating already gathered information
  • Include explanations of the missing aspects

Intelligent Tool Reuse

Unlike traditional systems that avoid tool repetition:

  • Initial queries filter out previously used tools
  • Follow-up queries can reuse tools for new aspects
  • Prevents repeating the exact same tool set consecutively
  • Ensures comprehensive coverage of topics

Metadata-Enriched Execution

Tool execution includes rich context:

  • Iteration number
  • Original and current queries
  • Follow-up query indicators
  • Extracted URLs and media IDs

Error Handling

The service implements comprehensive error handling:

  • Automatic retries for transient failures
  • Fallback strategies for tool failures
  • Detailed error reporting
  • Request validation

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "research-orchestration" '{"command":"npx","args":["-y","research-orchestration"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "research-orchestration": {
            "command": "npx",
            "args": [
                "-y",
                "research-orchestration"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "research-orchestration": {
            "command": "npx",
            "args": [
                "-y",
                "research-orchestration"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later