MCP Server

v1.0.0 · Last updated: 2026-03-24

Integrate Open Code Review's AI code review capabilities directly into Claude Desktop, Cursor, Windsurf, VS Code Copilot, and any MCP-compatible AI coding agent. No context switching — the AI agent calls review tools automatically.

Free to use6+ platform supportRuns locally, code never leaves your machine

#Quick Setup

No installation required. Run the MCP server via npx. Add the following config to your AI tool's settings:

json
{
  "mcpServers": {
    "open-code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@opencodereview/mcp-server"
      ]
    }
  }
}

npx automatically downloads and runs the latest MCP Server version. First launch may take a few seconds.

#Supported Platforms

Claude Desktop

claude_desktop_config.json

json
{
  "mcpServers": {
    "open-code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@opencodereview/mcp-server"
      ]
    }
  }
}

Cursor

.cursor/mcp.json

json
{
  "mcpServers": {
    "open-code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@opencodereview/mcp-server"
      ]
    }
  }
}

Windsurf

.windsurf/mcp.json

json
{
  "mcpServers": {
    "open-code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@opencodereview/mcp-server"
      ]
    }
  }
}

VS Code Copilot

.vscode/mcp.json

json
{
  "servers": {
    "open-code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@opencodereview/mcp-server"
      ]
    }
  }
}

#Available Tools

The MCP Server exposes 6 tools that your AI agent can invoke directly:

Scan code for AI-generated defects: hallucinated packages, stale APIs, logic gaps, security anti-patterns, and over-engineering.

ParameterTypeRequiredDescription
codestringYesThe source code to scan
languagestringNoProgramming language (auto-detected if omitted)
levelstringNoScan depth: l1 (fast) | l2 (standard) | l3 (deep, default)

#Usage Examples

Use in Claude Desktop

After configuration, just chat in Claude Desktop:

U
Review the code quality of utils/helpers.ts
C

Scanning file with open-code-review...

scan_file(file_path="utils/helpers.ts")

Found 2 issues

  • ⚠️ Hallucinated package: lodash-utils not found on npm (line 3)
  • ⚠️ Stale API: request() is deprecated (line 15)

Found 2 AI-generated defects. Recommend replacing `lodash-utils` with `lodash` and swapping `request` for `axios` or `fetch`. Want me to auto-fix?

Detect & Heal Workflow

Leverage the MCP tool chain to let the AI agent complete scan → analyze → heal workflow:

text
# User sends in Cursor:
"Review all TypeScript files in src/services/ and auto-fix any issues"

# Cursor's AI agent automatically calls the tool chain:
1. scan_repository(repo_path="src/services/", paths=["**/*.ts"], level="l3")
   → Returns scan results: 3 issues, quality score 72/100

2. explain_issue(issue=<first issue>)
   → Returns detailed explanation, impact scope, fix guidance

3. heal_code(code=<file content>, issues=[...])
   → Returns fixed code + change summary

4. AI Agent applies fixes to files
   → Review and fix complete, notifies user of results

#Configuration

The MCP Server supports configuration via environment variables and parameters:

json
{
  "mcpServers": {
    "open-code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@opencodereview/mcp-server"
      ],
      "env": {
        "OCR_PROVIDER": "glm",
        "OCR_API_KEY": "your-api-key-here",
        "OCR_DEFAULT_LEVEL": "l3",
        "OCR_THRESHOLD": "70"
      }
    }
  }
}
VariableDescriptionDefault
OCR_PROVIDERLLM provider (glm, openai, deepseek, ollama, ...)glm
OCR_API_KEYAPI key for the LLM provider
OCR_DEFAULT_LEVELDefault scan depthl3
OCR_THRESHOLDQuality score threshold (0-100)70
OCR_MODELSpecific model to useprovider default

#FAQ

Ready to get started?

Add Open Code Review to your AI coding tool and let your AI agent become your code review assistant.