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.
Clone the repository:
git clone https://github.com/wheattoast11/openrouter-deep-research-mcp.git
cd openrouter-agents
Install dependencies:
npm install
Create your environment file:
cp .env.example .env
On Windows, use copy .env.example .env
Edit the .env
file to add your OpenRouter API key:
OPENROUTER_API_KEY=your_api_key_here
Locate your Cline MCP settings file:
c:\Users\YOUR_USERNAME\AppData\Roaming\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
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"
]
}
Save the settings file and restart VS Code or the Cline extension if necessary.
Configure your .env
file as described above.
Start the server:
npm start
In Claude Desktop App:
mcpServers
array:
{
"type": "sse",
"name": "OpenRouter Research Agents (HTTP)",
"host": "localhost",
"port": 3002,
"streamPath": "/sse",
"messagePath": "/messages"
}
Simply ask a question that requires research:
Can you research the latest advancements in quantum computing?
You can request high or low-cost research explicitly:
Can you conduct a high-cost research on climate change mitigation strategies?
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
Customize persistence and caching in the .env
file:
PGLITE_DATA_DIR=./researchAgentDB
CACHE_TTL_SECONDS=3600
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
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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