Code Assistant logo

Code Assistant

Analyzes Git diffs and cached source files with Gemini for reviews, complexity checks, refactoring, documentation, and logic verification.

Install Code Assistant

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "code-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/code-lens-mcp@latest"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_VALUE_HERE",
        "GOOGLE_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Code Assistant MCP server uses Google Gemini to analyze Git diffs and source files through MCP tools. It can assess pull-request impact, identify API-breaking changes and code smells, generate review summaries and test plans, and answer questions about cached code. It also supports complexity analysis, documentation stubs, refactoring guidance, logic verification through Gemini's code execution sandbox, and Google Search with Grounding. Reach for it when an MCP client needs structured assistance with code review or source-level analysis.

Use cases

  • Review staged or unstaged Git changes
  • Assess pull-request risk and breaking changes
  • Generate test plans for modified code
  • Inspect cached files for code smells and refactoring opportunities
  • Create documentation stubs for public exports

Key features

  • Gemini-based diff and source analysis
  • Pull-request impact and review summaries
  • Complexity and API-breaking-change detection
  • Code-smell and refactoring analysis
  • Documentation and test-plan generation
  • Logic verification with code execution

Tools13

What Code Assistant lets your agent do. Expand a tool for its parameters.

Self-reported~205 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · @j0hanz/code-lens-mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads298Package downloads in the last 30 days.
Last commit7mo agoMost recent push to the default branch.
Tools exposed13Callable tools this server registers over MCP.

How Code Assistant works

What Code Assistant MCP server does

The Code Assistant MCP server, identified as Code Lens in the repository README, provides Gemini-based analysis for Git changes and source files. It exposes tools for reviewing pull-request changes, examining implementation quality, generating documentation, and checking algorithmic logic. The server is aimed at development workflows where an agent needs more than simple file retrieval or text generation.

A review workflow can begin with generate_diff, which captures staged or unstaged Git changes and keeps the result in server-side cache. Other tools can assess change severity, affected categories, breaking changes, rollback complexity, test priorities, and merge recommendations. The Code Assistant MCP server also supports source-file workflows through load_file, followed by questions, refactoring suggestions, code-smell detection, or documentation generation.

How it works

The server runs over stdio and uses Google Gemini for analysis. Cached diffs and files provide the input for tools that operate on repository changes or source code. verify_logic uses Gemini's code execution sandbox to check algorithms, while web_search uses Google Search with Grounding for current information retrieval.

Tool responses use validated JSON output schemas based on Zod v4, which can make results easier for MCP clients to consume programmatically. Every tool except load_file can run through MCP tasks with polling, cancellation, and progress updates.

Setup and configuration

Node.js 24 or newer is required. Set either GEMINI_API_KEY or GOOGLE_API_KEY with a Gemini API key before starting the Code Assistant MCP server. A standard stdio configuration runs the published package with npx:

config.json
{
  "mcpServers": {
    "code-lens": {
      "command": "npx",
      "args": ["-y", "@j0hanz/code-lens-mcp@latest"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Docker is also supported through the published GitHub Container Registry image, with the Gemini key passed as an environment variable. The README provides configuration examples for Claude Desktop, Claude Code, Cursor, Windsurf, LM Studio, VS Code, VS Code Insiders, Visual Studio, and Goose.

Tools and capabilities

Available MCP tools include:

  • Capture staged or unstaged diffs and cache them for later analysis.
  • Assess pull-request impact, risk, breaking changes, rollback complexity, and merge readiness.
  • Produce prioritized test cases and coverage guidance.
  • Analyze Big-O time and space complexity, including degradation risks.
  • Inspect cached files for refactoring opportunities, duplication, naming issues, grouping issues, and Fowler-style code smells.
  • Generate JSDoc, TSDoc, or docstring stubs for public exports.
  • Answer natural-language questions about a cached file.
  • Verify algorithms with Gemini code execution and retrieve grounded web results.

Limitations and notes

The server depends on access to Google Gemini and requires a compatible API key. Its analysis tools operate on captured diffs or files loaded into the server cache, so relevant content must be supplied through the corresponding tools. The repository is licensed under MIT.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Code Assistant

Code Assistant is an MCP server that connects MCP clients to Google Gemini, Git diffs, and cached source files. Its main tools generate reviews, assess pull-request impact, analyze complexity, detect code smells and breaking API changes, create documentation and test plans, answer questions about code, verify logic, and perform grounded web searches.

Install it as a stdio MCP server with Node.js 24 or newer, using npx and the @j0hanz/code-lens-mcp package. Add the command and package arguments to your client's MCP configuration, then provide GEMINI_API_KEY or GOOGLE_API_KEY. Docker is also supported through the published GitHub Container Registry image.

The server needs a Google Gemini API key in GEMINI_API_KEY or GOOGLE_API_KEY. The key is supplied as an environment variable in the MCP client configuration or Docker command before starting the server.

Yes, Code Assistant can be configured in Cursor as a stdio MCP server. The README provides a Cursor configuration using npx, the @j0hanz/code-lens-mcp package, and a Gemini API key.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCode Assistant AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/code-assistant?style=directory)](https://allmcps.com/mcp/code-assistant)
HTML Embed
<a href="https://allmcps.com/mcp/code-assistant"><img src="https://allmcps.com/api/badge/code-assistant?style=directory" alt="Code Assistant on AllMCPs" /></a>