megalens-mcp
OfficialPlanned integration to provide code review from a panel of AI models within GitHub Copilot (coming soon).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@megalens-mcpReview my latest commit for potential bugs."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
megalens-mcp
Code review from a panel of AI models, inside the AI tool you already use. MegaLens selects up to four AI models from different companies to review your code, and reports where they agree and where they disagree. On Free, MegaLens selects two reviewing models.
Works with Claude Code, Codex CLI, Cursor, Gemini CLI and Lovable. GitHub Copilot is coming soon.
Your first review is free, with no card.
Quick Start
npx megalens-mcp setupThe setup wizard:
Asks for your MegaLens token (get one here)
Detects installed tools automatically
Writes the correct config for each tool
The wizard does not ask for an OpenRouter key. To use your own key, add one header by hand: see Adding your own OpenRouter key.
Related MCP server: compare-mcp
Supported Tools
Tool | Status | Config File | Auto-detected |
Claude Code | Supported |
| Yes |
Codex CLI | Supported |
| Yes |
Cursor | Supported |
| Yes |
Gemini CLI | Supported |
| Yes |
Lovable | Supported | None (a form in Lovable) | No, see below |
GitHub Copilot (VS Code) | Coming soon, not supported yet |
| Only if that file already exists in the folder you run the wizard from |
If no tool is detected, the wizard lets you pick one and creates the config file. The wizard can also write configs for Windsurf and Grok Build. Those are not supported or tested.
Lovable needs no config file and no wizard. Paste the server URL and your token into Lovable's MCP connector form. Steps: megalens.ai/integrations/lovable
Manual Setup
The tools use two config languages and three different top-level keys, which is why the wizard exists.
Keep the ?ide= on each URL. It tells MegaLens which tool the review came from. It does not
change which models review your code: the panel is the same whichever tool you call it from.
Claude Code
Run this once. The --scope user flag makes MegaLens available in every project:
claude mcp add --transport http --scope user megalens "https://megalens.ai/api/mcp?ide=claude-code" \
--header "Authorization: Bearer ml_tok_your_token_here"Or in .mcp.json (project) / ~/.claude.json (user):
{
"mcpServers": {
"megalens": {
"type": "http",
"url": "https://megalens.ai/api/mcp?ide=claude-code",
"headers": {
"Authorization": "Bearer ml_tok_your_token_here"
}
}
}
}Cursor
~/.cursor/mcp.json or .cursor/mcp.json. No type field. Cursor does not use one:
{
"mcpServers": {
"megalens": {
"url": "https://megalens.ai/api/mcp?ide=cursor",
"headers": {
"Authorization": "Bearer ml_tok_your_token_here"
}
}
}
}Gemini CLI
~/.gemini/settings.json. Gemini CLI uses httpUrl, not url:
{
"mcpServers": {
"megalens": {
"httpUrl": "https://megalens.ai/api/mcp?ide=gemini-cli",
"headers": {
"Authorization": "Bearer ml_tok_your_token_here"
}
}
}
}GitHub Copilot in VS Code (coming soon, not supported yet)
GitHub Copilot is coming soon. If you want to try it early: .vscode/mcp.json. The top-level key
is servers, not mcpServers. A config written for Claude Code or Cursor will not be read here:
{
"servers": {
"megalens": {
"type": "http",
"url": "https://megalens.ai/api/mcp?ide=copilot",
"headers": {
"Authorization": "Bearer ml_tok_your_token_here"
}
}
}
}Codex
~/.codex/config.toml or .codex/config.toml. TOML, not JSON:
[mcp_servers.megalens]
url = "https://megalens.ai/api/mcp?ide=codex"
http_headers = { "Authorization" = "Bearer ml_tok_your_token_here" }Adding your own OpenRouter key (free / BYOK)
Add one more header alongside Authorization, in whichever shape your tool uses above. The key
needs credit on it. You pay OpenRouter directly; MegaLens is not part of that bill.
"x-megalens-openrouter-key": "sk-or-v1-your-openrouter-key"In Codex TOML:
http_headers = { "Authorization" = "Bearer ml_tok_your_token_here", "x-megalens-openrouter-key" = "sk-or-v1-your-openrouter-key" }With Claude Code's command, add --header "x-megalens-openrouter-key: sk-or-v1-your-openrouter-key".
If you skip the key, use pay-as-you-go credits instead: $9 per 1M blended tokens, prepaid from $20.
Commands
Command | Description |
| Interactive setup: detect tools, write config |
| Test your token connectivity |
| Show current config status |
How It Works
MegaLens selects up to four AI models from different companies to review your code. They review it separately. A final check reviews their findings, and you get back where they agreed and where they disagreed. Each result names the models that actually took part.
If you send your own assessment with the request, the answer also says what the panel found that yours did not.
The panel is the same whichever tool you call it from. MegaLens reports; it does not change your code. Your own tool stays the one that decides what to do next.
Our private recipe. What stays private: how we choose the models and what each one is asked to do, the numbers that tune each check, and the prompts. That recipe came from months of measured runs and changes as models change. Our results, rules and mistakes are public: megalens.ai/research/ai-code-review-false-positives
Requirements
Node.js 18+ (only for the setup wizard; manual setup needs nothing)
A MegaLens account: megalens.ai. Your first review is free, with no card
Links
This server cannot be deployed
Maintenance
Related MCP Connectors
Multi-reviewer AI code review: surfaces findings the reviewers agree on, disputes flagged.
Multi-LLM council: 25+ frontier models in parallel, consensus scoring, verdict-first code review.
Multi-model code review: a panel of models + detectors return a pass/fail verdict. Paid via x402.
Versioned artifact review for people and AI agents, with contextual comments and human control.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables collaboration between multiple AI models (GPT, Claude, Gemini) to work together on complex tasks, with intelligent task distribution and role-based expert assignment for code development, review, and optimization.1823 npm49MIT
- AlicenseAqualityCmaintenanceEnables multi-model code review by fanning out issues to multiple LLMs simultaneously, diffing their unique insights, optionally running debate rounds, and dispatching subagents to implement fixes with git commits.72MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI-powered, zero-trust code review with multiple models, supporting single files, git diffs, and multiple files, with security, performance, and architecture checks across 10+ languages.15MIT
- AlicenseNot gradedqualityAmaintenanceMulti-model AI code review with structured debate. OpenAI, Gemini, Grok, and Claude review your code in parallel, then an anonymized arbitration produces a single consensus summary.MIT