mutual-review-mcp
Provides tools for leveraging OpenAI's GPT model to conduct independent code reviews in parallel with Claude.
Click on "Install 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., "@mutual-review-mcpreview the file src/auth.py"
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.
mutual-review-mcp
📖 解説記事 (日本語): 自作MCPサーバーを書いて公開するまで
Claude × GPT-4o 相互コードレビュー MCP サーバー
2つの LLM がそれぞれ独立にコードをレビューし、Claude が両方の指摘を統合した最終レポートを返す MCP (Model Context Protocol) サーバーです。
30秒で読める要約
Claude Desktop / Claude Code / 任意の MCP クライアントから呼べる
review_file/review_code/review_diffの 3 ツール拡張子から言語自動推定 (
.py→ python,.ts→ typescript, ...)API キーは環境変数で渡す
コスト追跡はオプション (
ENABLE_COST_TRACKING=1で有効化)
Related MCP server: Claude Code Review MCP
クイックスタート (Claude Code)
claude mcp add mutual-review -- uvx mutual-review-mcp事前に ANTHROPIC_API_KEY と OPENAI_API_KEY を環境変数に設定してください。
インストール
pip install mutual-review-mcp
# または、インストールせず一時実行:
uvx mutual-review-mcp詳細
A. uvx (推奨・一時実行)
uvx mutual-review-mcp # MCPサーバー起動 (stdio)
uvx --from mutual-review-mcp mutual-review path/to/foo.py # CLIB. pip
pip install mutual-review-mcp
mutual-review-mcp # MCP サーバー起動
mutual-review path/to/foo.py # 単発 CLIC. git clone (開発用)
git clone https://github.com/miharu8686/mutual-review-mcp
cd mutual-review-mcp
pip install -e .[dev]
pytestClaude Desktop 設定
%APPDATA%/Claude/claude_desktop_config.json (macOS は ~/Library/Application Support/Claude/claude_desktop_config.json) に:
{
"mcpServers": {
"mutual-review": {
"command": "uvx",
"args": ["mutual-review-mcp"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"OPENAI_API_KEY": "sk-..."
}
}
}
}完全な例は examples/claude_desktop_config.json を参照。
Claude Code 設定
claude mcp add mutual-review -- uvx mutual-review-mcpまたは .mcp.json を手書き:
{
"mcpServers": {
"mutual-review": {
"command": "uvx",
"args": ["mutual-review-mcp"]
}
}
}ツール一覧
review_file
ファイルをディスクから読んで両モデルでレビュー。
引数 | 型 | 必須 | 説明 |
| string | yes | レビュー対象ファイルの絶対パス |
| string | no | 言語ヒント。省略時は拡張子から自動推定 |
| string | no | コードの背景情報 |
| boolean | no | 統合レポート生成 (default: true) |
呼び出し例:
review_file(path="/repo/src/auth.py", context="OAuth2 callback handler")review_code
コードスニペットを直接渡してレビュー。
引数 | 型 | 必須 | 説明 |
| string | yes | レビュー対象コード |
| string | no | 言語ヒント |
| string | no | 文脈用ファイル名 |
| string | no | 背景情報 |
| boolean | no | 統合レポート生成 (default: true) |
review_diff
unified diff 文字列を直接渡してレビュー。v0.1 では git 実行は行わない。
呼び出し側で git diff の出力を取得して渡す:
git diff HEAD~1 | mutual-review --diff -引数 | 型 | 必須 | 説明 |
| string | yes | unified diff テキスト |
| string | no | 背景情報 |
| boolean | no | 統合レポート生成 (default: true) |
v0.2 で
review_diff_git(repo_path, ref)を追加予定。詳細は docs/ROADMAP.md。
CLI
MCP を経由せず直接実行する CLI も同梱:
# ファイルレビュー (拡張子から言語自動推定)
mutual-review path/to/foo.py
# スニペット
mutual-review --code "def foo(): pass" --language python
# 標準入力から diff
git diff HEAD~1 | mutual-review --diff -
# 統合レポートを省略
mutual-review path/to/foo.py --no-synth動作のしくみ
[ Code / File / Diff ]
|
+----------+----------+
| |
v v
+-----------------+ +-----------------+
| Claude reviewer | | GPT reviewer | (並列実行)
+-----------------+ +-----------------+
| |
+----------+----------+
|
v
+------------------+
| Claude synthesizer| (両レビューを統合)
+------------------+
|
v
[ Final Report ]統合レポートには以下が含まれます:
両モデルが合意した指摘 (高優先度)
各モデル固有の発見
優先順位付きアクションアイテム
総合判定 (Ready / Needs Minor Work / Needs Major Work)
コスト目安
multi_agent.py (520 行・約 7,000 文字) を 1 ファイルレビュー (統合あり) した実測値:
モデル構成 | 合計トークン (in/out) | 1ファイルあたり |
| 16,130 / 4,489 | 約 $0.025 (約 ¥4) |
| 16,161 / 4,204 | 約 $0.105 (約 ¥16) |
1 USD = 155 円換算・2026-05 時点。価格は reviewer.py の
PRICINGで管理しています。
--no-synthで 3 回中 1 回 (統合呼び出し) を省略でき、Sonnet/gpt-4o 構成で約 30% コスト削減できます。
モデル変更は環境変数で:
MUTUAL_REVIEW_CLAUDE_MODEL=claude-haiku-4-5-20251001
MUTUAL_REVIEW_GPT_MODEL=gpt-4o-mini環境変数一覧
変数 | デフォルト | 説明 |
| — | (必須) Anthropic API キー |
| — | (必須) OpenAI API キー |
|
| Claude モデル名 |
|
| GPT モデル名 |
|
|
|
| OS依存 (XDG 準拠) | コストログの出力先 ( |
| OS依存 | JSON 設定ファイルパス (APIキーフォールバック) |
設定ファイル (オプション)
環境変数の代わりに JSON 設定ファイルから API キーを読むこともできます。
デフォルトパス:
Windows:
%APPDATA%\mutual-review-mcp\config.jsonmacOS:
~/Library/Application Support/mutual-review-mcp/config.jsonLinux:
~/.config/mutual-review-mcp/config.json
内容:
{
"anthropic_api_key": "sk-ant-...",
"openai_api_key": "sk-..."
}エラーメッセージ
エラーメッセージは日英併記です:
ANTHROPIC_API_KEY が設定されていません / ANTHROPIC_API_KEY is not set. ...
Anthropic API への接続に失敗しました: ... / Failed to call Anthropic API: ...ライセンス
関連
英語版 README: README.en.md
ロードマップ: docs/ROADMAP.md
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/miharu8686/mutual-review-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server