MCP ExplorerExplorer

Code Reviewer Fixer

@gokborayilmazon 4 days ago
10 MIT
FreeCommunity
AI Systems
This AI agent analyzes code repositories, detects potential security vulnerabilities, reviews code quality, and suggests fixes based on Sentry error logs using Sentry and GitHub MCP servers!

Overview

What is Code Reviewer Fixer

AI Code Review & Issue Fixer is an AI agent designed to analyze code repositories for quality and security issues. It connects with GitHub/GitLab to fetch code commits and integrates with Sentry to retrieve error logs, offering actionable insights and fixes for identified problems.

Use cases

This agent can be used by software developers, DevOps teams, and security professionals who wish to improve code quality, identify vulnerabilities, and streamline error resolution in codebases. It is particularly useful in continuous integration/continuous deployment (CI/CD) environments and during code reviews.

How to use

To use the application, clone the repository and install necessary dependencies. Configure the .env file with required API keys and tokens. Start the FastAPI server with ‘uvicorn’ and access the UI via a web browser. Configure the MCP settings for GitHub and Sentry before running for optimal functionality.

Key features

Key features include automatic fetching of recent commits, detailed code quality analysis, security vulnerability detection, Sentry error log retrieval, and provision of actionable insights and code fixes for issues identified during analysis.

Where to use

This agent can be deployed in development environments, CI/CD pipelines, and in projects that utilize GitHub/GitLab for code management. It is also suitable for integration into larger software development workflows where code quality and security are priorities.

Content

21-Day Agent Series: Day 11 AGENT : AI Code Review & Issue Fixer

AI Code Review & Issue Fixer
This agent is part of the “A New AI Agent Every Day!” Series - Day 11/21 - AI Code Review & Issue Fixer 🛠🚀 This AI agent analyzes code repositories, detects potential security vulnerabilities, reviews code quality, and suggests fixes based on Sentry error logs using Sentry and GitHub MCP servers!

Installation

Prerequisites

  • Python 3.9 or higher
  • Git
  • Virtual environment (recommended)

Steps

Don’t forget to download nodejs for MCP

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-folder>
    
  2. Install dependencies:

    pip install -r requirements.txt
    
    
  3. Create a .env file in the root directory and configure it as follows:

    AZURE_OPENAI_ENDPOINT="your_azure_openai_endpoint"
    AZURE_OPENAI_API_VERSION="your_azure_openai_api_version"
    AZURE_OPENAI_API_KEY="your_azure_openai_api_key"
    GITHUB_PERSONAL_ACCESS_TOKEN="YOUR_GITHUB_TOKEN"
    SENTRY_AUTH_TOKEN="YOUR_SENTRY_TOKEN"
    

Running the Application

Start the FastAPI server:

uvicorn upsonicai:app --reload

Open the UI in your browser:

http://127.0.0.1:8000/

MCP Configuration

Modify your MCP configuration to include GitHub and Sentry:

How It Works

  • Fetches recent commits from GitHub/GitLab repositories
  • Analyzes code quality and detects security vulnerabilities
  • Retrieves error logs from Sentry
  • Provides actionable insights and fixes for detected issues

API Documentation

Interactive API docs are available at:

Tools

No tools

Comments