mcp-code-agent
Integrates with Git repositories to retrieve diffs, commit history, and changed files for code review context.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π MCP-Powered AI Code Review Agent
An AI-powered code review agent that leverages Model Context Protocol (MCP) and Claude to provide intelligent, context-aware code reviews.
β¨ Features
π€ AI-Powered Reviews: Uses Claude to provide intelligent code analysis
π§ MCP Integration: Built on Model Context Protocol for tool-augmented LLM reasoning
π Code Metrics: Cyclomatic complexity, line counts, maintainability index
π¨ Style Checking: Detects common anti-patterns and style issues
π Git Integration: Review diffs, check history, understand context
β‘ Streaming Output: Real-time feedback as the AI analyzes your code
Related MCP server: Gemini MCP
π Quick Start
Installation
# Clone the repository
git clone https://github.com/geethikakoya/mcp-code-agent.git
cd mcp-code-agent
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .Set up API Key
# Get your API key from https://console.anthropic.com/
export ANTHROPIC_API_KEY=your_api_key_hereUsage
# Review a file
mcp-review review src/main.py
# Review with streaming output
mcp-review review --stream src/main.py
# Review git changes
mcp-review diff
# Explain what a file does
mcp-review explain src/utils.py
# Quick analysis (no AI, just metrics)
mcp-review analyze src/main.pyπ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Code Review Agent β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β CLI βββββββΆβ Agent βββββββΆβ Claude API β β
β β (typer) ββββββββ (reviewer) ββββββββ (LLM) β β
β ββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββ β
β β MCP Tools β β
β ββββββββββββββββ β
β β β
β ββββββββββββββΌβββββββββββββ β
β βΌ βΌ βΌ β
β βββββββββββ βββββββββββ βββββββββββ β
β β File β β Git β β Code β β
β β Tools β β Tools β β Analysisβ β
β βββββββββββ βββββββββββ βββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ§ MCP Tools
File Operations
Tool | Description |
| Read file contents with optional line range |
| List files and directories |
| Regex search across codebase |
Git Integration
Tool | Description |
| Get diff of changes |
| Get commit history |
| List modified files |
Code Analysis
Tool | Description |
| Cyclomatic complexity (Python) |
| LOC, comments, blanks |
| Style issues and anti-patterns |
π Example Output
π Reviewing: src/api/handler.py
π Metrics Summary
β’ Lines of Code: 142
β’ Cyclomatic Complexity: 8 (Moderate)
β’ Maintainability Index: 65.2
π΄ Critical Issues
1. Line 45: SQL injection vulnerability - use parameterized queries
β οΈ Warnings
1. Line 23: Function too long (>50 lines) - consider splitting
2. Line 67: Magic number - extract to constant
π‘ Suggestions
1. Add type hints to function parameters
2. Consider using dataclass for UserData
β
What's Good
β’ Good error handling in API endpoints
β’ Consistent naming conventionsποΈ Project Structure
mcp-code-agent/
βββ src/
β βββ mcp_server/ # MCP Server (exposes tools)
β β βββ server.py # Main MCP server
β β βββ tools/
β β βββ file_tools.py
β β βββ git_tools.py
β β βββ analysis_tools.py
β β
β βββ agent/ # AI Agent
β β βββ reviewer.py # Code review logic
β β βββ prompts.py # System prompts
β β
β βββ cli/ # CLI interface
β βββ main.py
β
βββ tests/
βββ pyproject.toml
βββ requirements.txt
βββ README.mdπ Using as MCP Server
You can use this as a standalone MCP server with any MCP-compatible client:
# Run the MCP server
mcp-review serverConfigure in your MCP client (e.g., Claude Desktop):
{
"mcpServers": {
"code-review": {
"command": "python",
"args": ["-m", "src.mcp_server.server"],
"cwd": "/path/to/mcp-code-agent"
}
}
}π§ͺ Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
ruff check src/π License
MIT License - see LICENSE for details.
π€ Author
Geethika Koya
GitHub: @geethikakoya
LinkedIn: geethika-koya
Built with β€οΈ using Model Context Protocol and Claude
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
Multi-brand AI code review for Claude: up to 12 reviewers and a judge, no install.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.825 npm188MIT
- AlicenseCqualityDmaintenanceAn AI-powered Model Context Protocol server for Claude Code that provides code intelligence tools including codebase analysis, task management, component generation, and deployment configuration.2315GPL 3.0
- AlicenseBqualityDmaintenanceAI-powered code review server that analyzes git diffs and PRs with context from project guidelines and task lists. Supports integration with Claude Code and Cursor via MCP.3MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides agentic code review powered by OpenAI-compatible models, designed for use with Claude Code.1MIT