MCP コード エキスパート システム
モデルコンテキストプロトコル(MCP)を使用したPythonベースのコードレビューシステム。Martin FowlerやRobert C. Martin(Uncle Bob)といった専門家のペルソナをシミュレートすることで、コードレビュー機能を提供します。
特徴
- マーティン・ファウラーのリファクタリング原則に基づいたコードレビュー
- Robert C. Martinのクリーンコード原則に基づいたコードレビュー
- コード、レビュー、関係性のナレッジグラフストレージ
- Ollamaとの統合によるAIを活用したレビュー
- Web統合のためのサーバー側イベント(SSE)のサポート
前提条件
Python 3.10以上
このプロジェクトには Python 3.10 以上が必要です。
オラマ
AI を活用したコードレビューにはOllamaが必要です。
- お使いのプラットフォームに Ollama をインストールします。
- macOS : ollama.comからダウンロード
- Linux :
curl -fsSL https://ollama.com/install.sh | sh
- Windows : Linux の指示による Windows WSL2 サポート
- 推奨モデルを取得します:
- Ollama サーバーを起動します。
インストール
セットアップ スクリプトを実行して依存関係をインストールし、仮想環境を作成します。
構成
.env
ファイルを編集して設定します (必要に応じて.env.example
から作成します)。
使用法
サーバーの実行
標準モード(カーソル統合用)
HTTP/SSE モード (Web 統合用)
これにより、SSE トランスポート用のhttp://localhost:8000/sse
でサーバーが起動します。
カスタム ポートの場合:
カーソルへのインストール
Cursor IDE にインストールするには:
利用可能なツール
サーバーは次のツールを公開します:
ask_martin
: Martin Fowler にコードのレビューとリファクタリングの提案を依頼するask_bob
: Robert C. Martin (Uncle Bob) にクリーンコードの原則に基づいてコードのレビューを依頼するread_graph
: ナレッジグラフ全体を読み取るsearch_nodes
: ナレッジグラフ内のノードを検索するopen_nodes
: 特定のノードを名前で開く
使用例
Martin Fowler と一緒にコード スニペットをレビューするには:
プロジェクト構造
server.py
: MCP 統合によるメインサーバーの実装experts/
: コードレビュー機能を実装するエキスパートモジュール__init__.py
: 共有モデルとインターフェースmartin_fowler/
: Martin Fowler エキスパート実装robert_c_martin/
: Robert C. Martin 専門家による実装
knowledge_graph.py
: コードとレビューを保存するためのナレッジグラフollama_service.py
: AIを活用したレビューのためのOllamaとの統合examples/
: さまざまな言語でのレビュー用サンプルコードrequirements.txt
: Python の依存関係setup.sh
: セットアップスクリプト
建築
システムはモジュラーアーキテクチャに従います。
- サーバー層: MCPプロトコル通信を処理し、リクエストをルーティングします
- エキスパートレイヤー: 各エキスパートのコードレビューロジックをカプセル化します
- サービス層: AI統合とナレッジグラフ機能を提供する
各エキスパートは標準インターフェースを実装しており、一貫した処理と新しいエキスパートの簡単な追加が可能です。
ライセンス
マサチューセッツ工科大学
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
モデル コンテキスト プロトコル (MCP) を使用して、Martin Fowler や Robert C. Martin などのシミュレートされた専門家ペルソナを通じて AI を活用したコード レビューを提供する Python ベースのシステムです。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.Last updated -5Python
- -securityFlicense-qualityA server that implements the Model Context Protocol (MCP) for orchestrating code reviews using a multi-agent system with Melchior, Balthasar, and Casper agents.Last updated -2Python
- 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 -1512TypeScriptMIT 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 -15Python