OpenRouter Deep Research MCP server

Orchestrates multi-agent research by breaking complex queries into specialized sub-questions, distributing them across different models, and synthesizing findings into comprehensive reports.
Back to servers
Setup instructions
Provider
wheattoast11
Release date
Mar 29, 2025
Language
TypeScript
Stats
14 stars

The OpenRouter Agents MCP Server provides sophisticated research capabilities by delegating research tasks to specialized AI agents. When you send a research query, it uses Claude to break down complex questions into sub-topics, assigns each to different OpenRouter models, and then synthesizes the results into a comprehensive report.

Installation

Prerequisites

  • Node.js (v18 or later)
  • Git
  • OpenRouter API key (available at openrouter.ai)

Standard Installation (Node.js)

  1. Clone the repository:

    git clone https://github.com/wheattoast11/openrouter-deep-research-mcp.git
    cd openrouter-agents
    
  2. Install dependencies:

    npm install
    
  3. Create your environment file:

    cp .env.example .env
    

    On Windows, use copy .env.example .env

  4. Edit the .env file to add your OpenRouter API key:

    OPENROUTER_API_KEY=your_api_key_here
    

VS Code Integration with Cline

  1. Locate your Cline MCP settings file:

    • Windows: c:\Users\YOUR_USERNAME\AppData\Roaming\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
    • macOS: ~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. Add the following configuration to the mcpServers object:

    "openrouter-research-agents": {
      "command": "cmd.exe", 
      "args": [
        "/c", 
        "YOUR_PROJECT_PATH_HERE/start-mcp-server.bat"
      ], 
      "env": {
        "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE" 
      },
      "disabled": false,
      "autoApprove": [
        "conduct_research",
        "research_follow_up",
        "get_past_research",
        "rate_research_report",
        "list_research_history"
      ]
    }
    
  3. Save the settings file and restart VS Code or the Cline extension if necessary.

HTTP/SSE Setup for Claude Desktop App

  1. Configure your .env file as described above.

  2. Start the server:

    npm start
    
  3. In Claude Desktop App:

    • Go to Settings > Developer
    • Click "Edit Config"
    • Add to the mcpServers array:
      {
        "type": "sse",
        "name": "OpenRouter Research Agents (HTTP)",
        "host": "localhost",
        "port": 3002,
        "streamPath": "/sse",
        "messagePath": "/messages"
      }
      
    • Save and restart Claude

Usage

Basic Research

Simply ask a question that requires research:

Can you research the latest advancements in quantum computing?

Specifying Cost Preference

You can request high or low-cost research explicitly:

Can you conduct a high-cost research on climate change mitigation strategies?

Available Models

High-Cost Models

  • perplexity/sonar-deep-research
  • perplexity/sonar-pro
  • perplexity/sonar-reasoning-pro
  • openai/gpt-4o-search-preview

Low-Cost Models

  • perplexity/sonar-reasoning
  • openai/gpt-4o-mini-search-preview
  • google/gemini-2.0-flash-001

Configuration

Customizing Models

Edit the .env file to customize available models:

HIGH_COST_MODELS=perplexity/sonar-deep-research,perplexity/sonar-pro,other-model
LOW_COST_MODELS=perplexity/sonar-reasoning,openai/gpt-4o-mini-search-preview,other-model

Database and Cache Settings

Customize persistence and caching in the .env file:

PGLITE_DATA_DIR=./researchAgentDB
CACHE_TTL_SECONDS=3600

Security Configuration

Set up authentication for HTTP/SSE transport in your .env file:

SERVER_API_KEY=your_secure_api_key_here

For development only, you can disable authentication with:

ALLOW_NO_API_KEY=true

Troubleshooting

  • Connection Issues: Verify Claude's developer settings match the server configuration
  • API Key Errors: Check that your OpenRouter API key is valid
  • No Agents Found: Ensure Claude is correctly parsing the XML responses
  • Model Errors: Confirm the specified models are available in your OpenRouter account

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 "openrouter-research-agents" '{"command":"cmd.exe","args":["/c","YOUR_PROJECT_PATH_HERE/start-mcp-server.bat"],"env":{"OPENROUTER_API_KEY":"YOUR_OPENROUTER_API_KEY_HERE"},"disabled":false,"autoApprove":["conduct_research","research_follow_up","get_past_research","rate_research_report","list_research_history"]}'

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": {
        "openrouter-research-agents": {
            "command": "cmd.exe",
            "args": [
                "/c",
                "YOUR_PROJECT_PATH_HERE/start-mcp-server.bat"
            ],
            "env": {
                "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE"
            },
            "disabled": false,
            "autoApprove": [
                "conduct_research",
                "research_follow_up",
                "get_past_research",
                "rate_research_report",
                "list_research_history"
            ]
        }
    }
}

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": {
        "openrouter-research-agents": {
            "command": "cmd.exe",
            "args": [
                "/c",
                "YOUR_PROJECT_PATH_HERE/start-mcp-server.bat"
            ],
            "env": {
                "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE"
            },
            "disabled": false,
            "autoApprove": [
                "conduct_research",
                "research_follow_up",
                "get_past_research",
                "rate_research_report",
                "list_research_history"
            ]
        }
    }
}

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