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
Provider
wheattoast11
Release date
Mar 29, 2025
Language
TypeScript
Stats
5 stars

The OpenRouter Agents MCP Server provides sophisticated research capabilities through a Model Context Protocol implementation. It allows conversational LLMs to delegate research tasks to specialized agents powered by various OpenRouter models, with Claude 3.7 Sonnet orchestrating the research process.

Prerequisites

Installation (Node.js / Standard)

This is the recommended method for integrating with MCP clients like Cline in VS Code.

  1. Clone this repository:

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

    npm install
    
  3. Create your .env file from the example:

    cp .env.example .env
    

    (On Windows, you might use copy .env.example .env)

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

    OPENROUTER_API_KEY=your_api_key_here
    

    (Ensure this file is saved in the root directory of the project)

Cline / VS Code MCP Integration

To use this server with Cline in VS Code, you need to add it to your MCP settings file.

  1. Locate your Cline MCP settings file:

    • Typically found at: c:\Users\YOUR_USERNAME\AppData\Roaming\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json (Windows) or ~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (macOS). Replace YOUR_USERNAME accordingly.
  2. Edit the cline_mcp_settings.json file: Add the following configuration object within the main mcpServers object. Make sure to replace "YOUR_PROJECT_PATH_HERE" with the absolute path to where you cloned this repository and "YOUR_OPENROUTER_API_KEY_HERE" with your actual API key.

    {
      "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. Save the settings file. Cline should automatically detect the new server configuration. You might need to restart VS Code or the Cline extension if it doesn't appear immediately.

Alternative Installation: HTTP/SSE for Claude Desktop App

The server can also be run as a standalone HTTP/SSE service for integration with the Claude Desktop App.

  1. Clone this repository (if not already done):
    git clone https://github.com/wheattoast11/openrouter-deep-research-mcp.git
    cd openrouter-agents
    
  2. Create and configure your .env file as described in the standard installation.
  3. Start the server using npm:
    npm start
    
  4. The MCP server will be running and accessible via HTTP/SSE on http://localhost:3002 (or the port specified in your .env).

Claude Desktop App Integration (HTTP/SSE)

  1. Open Claude desktop app.

  2. Go to Settings > Developer.

  3. Click "Edit Config".

  4. Add the following to the mcpServers array in the configuration:

    {
      "type": "sse",
      "name": "OpenRouter Research Agents (HTTP)",
      "host": "localhost",
      "port": 3002,
      "streamPath": "/sse",
      "messagePath": "/messages"
    }
    
  5. Save and restart Claude.

How to Use

Once configured, you'll see the research tools available in Cline or Claude Desktop App. You can use them like this:

Can you research the latest advancements in quantum computing?

Or specify a cost preference:

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

Customization

You can customize the available models by editing the .env file:

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

You can also customize the database and cache settings:

PGLITE_DATA_DIR=./researchAgentDB
CACHE_TTL_SECONDS=3600

Advanced Configuration

Authentication Security

API key authentication is mandatory by default for HTTP/SSE transport:

  1. Set the SERVER_API_KEY environment variable in your .env file for production:

    SERVER_API_KEY=your_secure_api_key_here
    
  2. For development/testing only, you can disable authentication by setting:

    ALLOW_NO_API_KEY=true
    

Troubleshooting

  • Connection Issues: Ensure Claude's developer settings match the server configuration
  • API Key Errors: Verify your OpenRouter API key is correct
  • No Agents Found: If planning fails, ensure Claude is parsing the XML correctly
  • Model Errors: Check if the specified models are available in your OpenRouter account

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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