Gemini-powered MCP server for code review analysis.
Gemini-powered MCP server for code review analysis.
Code Lens is a Model Context Protocol server that uses Google Gemini to analyze diffs, review pull requests, detect code smells, generate documentation, and verify logic. It exposes 13 tools, 7 resources, and 5 prompts over stdio transport.
Once Code Review Analyst is connected, these are the calls the assistant has available:
generate_diff — Capture git diff (unstaged/staged) and cache server-sideanalyze_pr_impact — Assess severity, categories, breaking changes, rollback complexitygenerate_review_summary — PR summary, risk rating, merge recommendationgenerate_test_plan — Prioritized test cases and coverage guidanceanalyze_time_space_complexity — Big-O complexity analysis and degradation detectiondetect_api_breaking_changes — Detect breaking API/interface changesload_file — Cache a source file for analysis toolsrefactor_code — Complexity, duplication, naming, grouping suggestionsdetect_code_smells — Structural code smells (Fowler taxonomy)generate_documentation — JSDoc/TSDoc/docstring stubs for public exportsask_about_code — Natural-language Q&A about a cached fileverify_logic — Verify algorithms via Gemini code execution sandboxGEMINI_API_KEY or GOOGLE_API_KEY)generate_diff — Capture git diff (unstaged/staged) and cache server-sideanalyze_pr_impact — Assess severity, categories, breaking changes, rollback complexitygenerate_review_summary — PR summary, risk rating, merge recommendationgenerate_test_plan — Prioritized test cases and coverage guidanceanalyze_time_space_complexity — Big-O complexity analysis and degradation detectiondetect_api_breaking_changes — Detect breaking API/interface changesload_file — Cache a source file for analysis toolsrefactor_code — Complexity, duplication, naming, grouping suggestionsdetect_code_smells — Structural code smells (Fowler taxonomy)generate_documentation — JSDoc/TSDoc/docstring stubs for public exportsask_about_code — Natural-language Q&A about a cached fileverify_logic — Verify algorithms via Gemini code execution sandboxweb_search — Google Search with GroundingCompare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| generate_diff | Capture git diff (unstaged/staged) and cache server-side |
| analyze_pr_impact | Assess severity, categories, breaking changes, rollback complexity |
| generate_review_summary | PR summary, risk rating, merge recommendation |
| generate_test_plan | Prioritized test cases and coverage guidance |
| analyze_time_space_complexity | Big-O complexity analysis and degradation detection |
| detect_api_breaking_changes | Detect breaking API/interface changes |
| load_file | Cache a source file for analysis tools |
| refactor_code | Complexity, duplication, naming, grouping suggestions |
| detect_code_smells | Structural code smells (Fowler taxonomy) |
| generate_documentation | JSDoc/TSDoc/docstring stubs for public exports |
| ask_about_code | Natural-language Q&A about a cached file |
| verify_logic | Verify algorithms via Gemini code execution sandbox |
| web_search | Google Search with Grounding |
{
"mcpServers": {
"code-lens": {
"command": "npx",
"args": ["-y", "@j0hanz/code-lens-mcp@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
GEMINI_API_KEY or GOOGLE_API_KEY)| Variable | Description | Required |
|---|---|---|
| GEMINI_API_KEY | Credential the server authenticates with. | Yes |
| GOOGLE_API_KEY | Credential the server authenticates with. | Yes |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Use Microsoft’s Playwright MCP server to navigate pages, inspect accessibility snapshots, fill forms and capture browser screenshots.
Connect GitHub MCP to repositories, issues and pull requests with GitHub’s hosted service or a locally run server.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Search Linear issues and projects, inspect work context and manage updates through Linear’s hosted MCP server with OAuth.