Code Review MCP Server
Uses the OpenAI API to power AI-driven code review, security vulnerability analysis, and code quality improvement suggestions.
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., "@Code Review MCP Server review this pull request for security vulnerabilities and code quality"
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.
Code Review MCP Server
AI-powered code review MCP server for automated pull request analysis.
Features
Code Review: Automated PR review with actionable feedback
Security Analysis: Identify security vulnerabilities in code
Improvement Suggestions: Get code quality improvement recommendations
MCP Compatible: Works with any MCP client (Claude, Cursor, etc.)
Related MCP server: code-review-mcp-server
Installation
npm install -g code-review-mcpSetup
Set your OpenAI API key:
export OPENAI_API_KEY="your-api-key-here"Configure in your MCP client:
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"code-review": {
"command": "node",
"args": ["/path/to/code-review-mcp/index.js"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"code-review": {
"command": "node",
"args": ["/path/to/code-review-mcp/index.js"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}Available Tools
1. review_code
Review code changes and provide feedback.
Parameters:
diff(required): The code diff to reviewcontext(optional): Additional context about the changes
Example:
{
"diff": "--- a/file.js\n+++ b/file.js\n@@ -1,3 +1,5 @@\n+// New function\n+function add(a, b) {\n+ return a + b;\n+}",
"context": "Added new utility function for arithmetic operations"
}2. analyze_security
Analyze code for security vulnerabilities.
Parameters:
code(required): The code to analyzelanguage(optional): Programming language
Example:
{
"code": "const query = `SELECT * FROM users WHERE id = ${userId}`;",
"language": "javascript"
}3. suggest_improvements
Suggest code quality improvements.
Parameters:
code(required): The code to analyzefocus(optional): Focus area (performance, readability, best_practices, all)
Example:
{
"code": "function processData(data) { return data.filter(x => x).map(x => x * 2); }",
"focus": "performance"
}Usage with AI Agents
This MCP server can be used by AI agents to automatically review code:
// Example: AI agent using the MCP server
const review = await mcpClient.callTool({
name: "review_code",
arguments: {
diff: prDiff,
context: "Feature: user authentication"
}
});
console.log(review.content[0].text);Enterprise Features
For enterprise use cases, contact us for:
Custom review rules and guidelines
Integration with CI/CD pipelines
Team-specific coding standards
Priority support
On-premise deployment
License
MIT
Author
ContentForge Press
Support
GitHub Issues: https://github.com/contentforge-press/code-review-mcp/issues
Email: support@contentforge.press
CLI mode (CI-friendly)
Run a one-shot review without an MCP client:
# Review a diff file
reviewpilot-mcp --review pr.diff
# With context
reviewpilot-mcp --review pr.diff --context "PR #123: auth feature"
# Security scan a source file
reviewpilot-mcp --security src/app.js --language javascriptGitHub Actions automatic PR review
Copy examples/github-action/reviewpilot.yml to .github/workflows/. Every PR gets an automated review comment.
Configuration
Variable | Required | Default | Purpose |
| yes | — | API key |
| no | OpenAI | Any OpenAI-compatible endpoint (gateways, local servers) |
| no |
| Model used for review |
Use a local or cheaper model by pointing OPENAI_BASE_URL and REVIEW_MODEL at an OpenAI-compatible server.
Available Tools
3 toolsanalyze_securityC
Analyze code for security vulnerabilities
Inputs: code (required), language.
review_codeC
Review code changes and provide feedback
Inputs: diff (required), context.
suggest_improvementsC
Suggest code quality improvements
Inputs: code (required), focus.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
review_code is broad and overlaps with suggest_improvements (both provide code quality feedback) and partially with analyze_security. The descriptions help but do not fully draw clear boundaries between general review and targeted analysis.
All three tools follow a consistent verb_noun snake_case pattern: review_code, analyze_security, suggest_improvements. The convention is predictable and readable.
Three tools is reasonable for a focused code-review server, with each targeting a distinct analysis angle. It is slightly thin for a full code-review workflow (e.g., no diff retrieval or comment posting), but not problematic.
The surface covers three common analysis types but lacks lifecycle operations such as fetching code changes, retrieving diffs, or posting review comments. These gaps may force agents to combine with other tools to complete a review workflow.
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables code review operations on GitHub and GitLab, including fetching pull/merge requests, viewing diffs, adding comments, analyzing code quality, and creating merge requests directly from your MCP client.1521 npm4MIT
- AlicenseNot gradedqualityCmaintenanceEnables automated code review and GitHub PR commenting through MCP integration.1,032 npm9MIT
- FlicenseNot gradedqualityDmaintenanceEnables automated AI-powered code review for pull requests across GitHub, GitLab, Bitbucket, and Azure DevOps via webhooks, and manual code review through MCP tools using Groq, Claude, or GPT-4.1-
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to run security and code review on pull requests and diffs, exposing review_pr and review_diff capabilities with local-first analyzers and LLM explanations.2MIT