megasearch-mcp
v1.0.5
Published
MCP stdio proxy for MegaSearch - connects Claude Desktop to MegaSearch API using OAuth 2.0
Maintainers
Readme
MegaSearch MCP
A local MCP (Model Context Protocol) server that connects Claude Desktop to MegaSearch API using OAuth 2.0 client credentials.
Features
- No timeout issues - Direct stdio communication avoids HTTP/SSE transport timeouts
- 5-minute timeout - Configurable timeout for comprehensive searches
- OAuth 2.0 - Secure authentication with automatic token refresh
- Simple setup - Just set environment variables
What is MegaSearch?
MegaSearch is an AI-powered metasearch engine that:
- Fires 10+ search engines in parallel
- Extracts and analyzes content from top results
- Synthesizes comprehensive answers with citations
- Iteratively refines queries until the answer is complete
Installation
npm install -g megasearch-mcpOr use directly with npx (no installation needed):
npx megasearch-mcpQuick Start
1. Create OAuth Client
- Go to MegaSearch Dashboard
- Sign up / Log in with Google
- Click "+ Create OAuth Client"
- Copy the Client ID and Client Secret (shown only once!)
2. Configure Claude Desktop
Add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"megasearch": {
"command": "npx",
"args": ["megasearch-mcp"],
"env": {
"MEGASEARCH_CLIENT_ID": "mcp_your_client_id",
"MEGASEARCH_CLIENT_SECRET": "your_client_secret"
}
}
}
}3. Restart Claude Desktop
After saving the config, restart Claude Desktop to load the MCP server.
Usage
Once configured, ask Claude to search for anything:
"Search for the latest developments in quantum computing"
"What are the best practices for React performance optimization?"
"Find recent news about AI regulations in the EU"
Claude will use MegaSearch to:
- Fire multiple search engines in parallel
- Extract content from top results
- Analyze and synthesize a comprehensive answer
- Return sources with citations
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| MEGASEARCH_CLIENT_ID | Yes | - | OAuth Client ID (starts with mcp_) |
| MEGASEARCH_CLIENT_SECRET | Yes | - | OAuth Client Secret |
| MEGASEARCH_BASE_URL | No | https://megasearch.prodevs.in | MegaSearch API URL |
| MEGASEARCH_TIMEOUT | No | 300000 | Request timeout in ms (default: 5 min) |
Development
# Clone the repository
git clone https://github.com/ProDevs-Kol/megasearch-mcp.git
cd megasearch-mcp
# Install dependencies
npm install
# Build
npm run build
# Run locally
MEGASEARCH_CLIENT_ID=xxx MEGASEARCH_CLIENT_SECRET=yyy npm startTroubleshooting
"Missing MEGASEARCH_CLIENT_ID or MEGASEARCH_CLIENT_SECRET"
Make sure you've set both environment variables in your Claude Desktop config.
"Failed to obtain access token"
- Check that your Client ID and Secret are correct
- Ensure your MegaSearch account is active
- Try creating a new OAuth client
Search takes too long
MegaSearch performs comprehensive searches that may take 30-60 seconds. This is expected behavior. You can reduce the timeout with MEGASEARCH_TIMEOUT if needed.
Related Projects
- MegaSearch - The AI-powered metasearch engine
- n8n-nodes-megasearch - n8n integration
License
MIT - see LICENSE for details.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
