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.
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
Clone the repository:
git clone https://github.com/yourusername/research-orchestration-service.git
cd research-orchestration-service
Install dependencies:
npm install
Configure environment variables:
cp .env.example .env
# Edit .env with your API keys
Deploy to Cloudflare Workers:
wrangler publish
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);
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[];
}
}
The depth parameter (1-5) controls:
Tool selection is managed through:
The system uses batch processing for:
The system implements caching at multiple levels:
The system generates highly targeted follow-up queries that:
Unlike traditional systems that avoid tool repetition:
Tool execution includes rich context:
The service implements comprehensive error handling:
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.
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": {
"research-orchestration": {
"command": "npx",
"args": [
"-y",
"research-orchestration"
]
}
}
}
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": {
"research-orchestration": {
"command": "npx",
"args": [
"-y",
"research-orchestration"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect