Code Review Analyst MCP Server

Gemini-powered MCP server for code review analysis.

Local serverstdio

What is the Code Review Analyst MCP Server?

Gemini-powered MCP server for code review analysis.

What you get

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.

  • PR review pipeline — — generate diffs, assess impact, detect breaking API changes, and produce review summaries with merge recommendations
  • File analysis — — load any source file for refactoring suggestions, code smell detection, documentation generation, and natural-language Q&A
  • Logic verification — — verify algorithms using Gemini's code execution sandbox
  • Structured outputs — — all tools return validated JSON via Zod v4 output schemas
  • Web search — — Google Search with Grounding for up-to-date information retrieval
  • Task lifecycle support — — every tool except load_file can run via MCP tasks with polling, cancellation, and progress updates

Configuration and credentials

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
generate_diffCapture git diff (unstaged/staged) and cache server-side
analyze_pr_impactAssess severity, categories, breaking changes, rollback complexity
generate_review_summaryPR summary, risk rating, merge recommendation
generate_test_planPrioritized test cases and coverage guidance
analyze_time_space_complexityBig-O complexity analysis and degradation detection
detect_api_breaking_changesDetect breaking API/interface changes
load_fileCache a source file for analysis tools
refactor_codeComplexity, duplication, naming, grouping suggestions
detect_code_smellsStructural code smells (Fowler taxonomy)
generate_documentationJSDoc/TSDoc/docstring stubs for public exports
ask_about_codeNatural-language Q&A about a cached file
verify_logicVerify algorithms via Gemini code execution sandbox
web_searchGoogle Search with Grounding

How to install the Code Review Analyst MCP Server

{
  "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.

Configuration

VariableDescriptionRequired
GEMINI_API_KEYCredential the server authenticates with.Yes
GOOGLE_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • “Use Code Review Analyst to generate diff.”
  • “Use Code Review Analyst to analyze pr impact.”
  • “Use Code Review Analyst to generate review summary.”

Frequently asked questions

Gemini-powered MCP server for code review analysis. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.