Enables containerized deployment of the MAGI MCP Server, allowing for portable and consistent code review environments with configurable gateway connections.
Provides a standardized interface for submitting Python code for review through the MAGI system, with support for analysis by Melchior, Balthasar, and Casper agents.
MAGI MCP Server
MCP Server implementation for MAGI code review system. This server provides a standardized interface for submitting code reviews and monitoring their progress using the Model Context Protocol (MCP).
Features
Code submission and review orchestration
Integration with MAGI Gateway for distributed code review
Multi-agent review system with Melchior, Balthasar, and Casper agents
Majority-based decision making for code quality assessment
Getting Started
Prerequisites
Python 3.11+
Access to MAGI Gateway (default: ws://127.0.0.1:8000/ws)
Docker (optional, for containerized deployment)
Installation
Clone the repository
Install dependencies:
pip install -r requirements.txt
Usage
The project consists of two main components:
MCP Server (
src/server.py
) - Implements the MCP protocol for code reviewTest Client (
src/client.py
) - A simple client for testing the server functionality
Running the Server
By default, the server connects to the MAGI Gateway at ws://127.0.0.1:8000/ws
. You can override this by setting the MAGI_URL
environment variable:
Note: You can use the MAGI System official gateway:
Docker Deployment
You can also deploy the MAGI MCP SSE Server using Docker:
Build the Docker image:
docker build -t magi-mcp-server .Run the container:
docker run -p 8080:8080 magi-mcp-serverTo connect to a specific MAGI Gateway:
docker run -p 8080:8080 -e MAGI_URL=ws://your-magi-gateway.com/ws magi-mcp-serverTo run in debug mode:
docker run -p 8080:8080 -e DEBUG=1 magi-mcp-server
Testing with the Client
The client.py
script is provided as a testing tool to verify the MCP Server functionality. It is not intended for production use.
Client Options
--file
,-f
: Path to the Python file to review--magi-url
: MAGI Gateway WebSocket URL (default: ws://127.0.0.1:8000/ws)--server-script
: Path to the server script (default: src/server.py)--timeout
: Review timeout in seconds (default: 300)--output
,-o
: Save results to JSON file--debug
: Enable debug mode
If no file is provided, the client will use an example code snippet for testing.
Example
Example
Architecture
The server acts as a bridge between MCP clients and the MAGI Gateway:
The review process:
Client submits code to the MCP Server
Server forwards the code to the MAGI Gateway
MAGI Gateway distributes the code to three review agents
Each agent reviews the code and provides a POSITIVE or NEGATIVE decision
The final decision is based on majority vote (at least 2 positive reviews to pass)
Results are returned to the client
Development
For development purposes, you can enable debug logging:
Or when using the client:
License
MIT License
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A server that implements the Model Context Protocol (MCP) for orchestrating code reviews using a multi-agent system with Melchior, Balthasar, and Casper agents.
Related MCP Servers
- -securityAlicense-qualityA server implementation of the Model Context Protocol (MCP) for managing development workflow with features like project management, task tracking, and QA review support.Last updated -3AGPL 3.0
- AsecurityAlicenseAqualityAn MCP server that provides code review functionality using OpenAI, Google, and Anthropic models, serving as a "second opinion" tool that works with any MCP client.Last updated -11716MIT License
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server for advanced code analysis and editing with semantic search capabilities, enabling AI assistants to perform complex code operations through a standardized interface.Last updated -151
- -securityFlicense-qualityA comprehensive Model Context Protocol (MCP) server that provides 37+ intelligent development tools across JavaScript/TypeScript, Rust, and Python with security-first design and high-performance features.Last updated -111