Joint Chiefs
Multi-model AI code review with structured debate. OpenAI, Gemini, Grok, and Claude review your code in parallel, then an anonymized arbitration produces a single consensus summary.
README
Joint Chiefs
Multi-model AI code review. One command sends your code to OpenAI, Gemini, Grok, and Claude in parallel, runs a structured debate where they challenge each other's findings, and streams a single consensus summary back.
Website: jointchiefs.ai
$ jointchiefs review src/auth.swift --goal "security audit"
Why
Single-model code review has blind spots. GPT misses things Gemini catches; Gemini misses things Grok catches. Joint Chiefs runs them all, then has them argue.
The debate protocol is grounded in Multi-Agent Debate research (Liang et al., 2023), which shows that adversarial collaboration between LLMs produces more reliable output than any single model — including a single model reflecting on its own work.
Surfaces
Joint Chiefs ships as three binaries, one engine:
| Binary | Use | How |
|---|---|---|
jointchiefs |
CLI for terminal, CI, scripting | jointchiefs review <file> |
jointchiefs-mcp |
MCP stdio server for any MCP-aware client | Paste the setup app's JSON snippet into your client's MCP config |
jointchiefs-setup |
One-shot SwiftUI installer (macOS) | Handles API key entry, strategy config, installs all three binaries |
A fourth binary, jointchiefs-keygetter, is the single binary that reads and writes the local API-key file. The CLI and MCP server call it via Process.
Requirements
- Apple Silicon Mac (M-series). Intel Macs are not supported.
- macOS 15 (Sequoia) or later.
- Xcode 16+ with the macOS 15 SDK.
- API keys for at least one supported provider.
Install
From source
git clone https://github.com/djfunboy/joint-chiefs.git
cd joint-chiefs/JointChiefs
swift build -c release
cp .build/release/jointchiefs .build/release/jointchiefs-mcp .build/release/jointchiefs-keygetter /opt/homebrew/bin/
API keys
Two paths:
a) Environment variables (CI-friendly):
export OPENAI_API_KEY="sk-..."
export GEMINI_API_KEY="..."
export GROK_API_KEY="..."
export ANTHROPIC_API_KEY="sk-ant-..." # also acts as the moderator
b) Local credential file (end-user default, via the setup app):
Run jointchiefs-setup. It walks through disclosure, key entry (with live Test buttons), strategy config, install location, and outputs the MCP config snippet for your AI client. Keys are saved to ~/Library/Application Support/Joint Chiefs/credentials.json (mode 0600), so the CLI and headless agents read them with no prompt. Upgrading from v0.5.6 or earlier? The setup app migrates any keys from the old macOS Keychain automatically on first launch.
You only need one key to get started. More keys = more diverse debate.
Verify:
jointchiefs models
Usage
Review a file:
jointchiefs review src/auth.swift
With a directive to focus the panel:
jointchiefs review src/auth.swift --goal "look for race conditions in token refresh"
Pipe a diff in from stdin:
git diff main | jointchiefs review --stdin --goal "pre-commit check"
Quiet mode (suppress streaming, print only the final consensus):
jointchiefs review src/auth.swift --quiet
JSON output:
jointchiefs review src/auth.swift --format json
MCP integration
The MCP server (jointchiefs-mcp) works with any MCP-aware client. The setup app's MCP Config tab emits a ready-to-paste mcpServers JSON snippet keyed at the installed binary path. No keys live in the snippet — Joint Chiefs resolves them from the local credential file at tool-call time.
Minimal snippet shape:
{
"mcpServers": {
"joint-chiefs": {
"command": "/opt/homebrew/bin/jointchiefs-mcp"
}
}
}
How it works
┌──────────────────────┐
│ DebateOrchestrator │
└──────────┬───────────┘
│
┌──────────┬──────────┼──────────┬──────────┐
▼ ▼ ▼ ▼ ▼
┌────────┐┌──────────┐┌────────┐┌────────┐┌─────────┐
│ OpenAI ││Anthropic ││ Gemini ││ Grok ││ local │ parallel review
└────┬───┘└────┬─────┘└───┬────┘└───┬────┘└────┬────┘ (Ollama / LM Studio
└────────┴──────────┼──────────┴──────────┘ / any OpenAI-compat)
│ anonymized findings
▼
┌────────────────────┐
│ Moderator │ synthesizes round, writes brief
│ (default: Claude) │
└─────────┬──────────┘
│
▼
Next round, or — if positions converged —
the moderator writes the final consensus.
You pick which providers participate. The moderator is configurable too (default: Claude); the same provider can serve as both a spoke and the moderator if you want, or you can split the roles.
Up to 5 debate rounds with adaptive early break when positions converge. Findings are anonymized before the final synthesis to reduce bias toward any single provider. Four consensus modes (moderatorDecides, strictMajority, bestOfAll, votingThreshold) with per-provider weighting.
Full details: docs/ARCHITECTURE.md.
Configuration
| Variable | Purpose | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI authentication | (required to enable OpenAI) |
OPENAI_MODEL |
OpenAI model override | gpt-5.5 |
GEMINI_API_KEY |
Google Gemini authentication | (required to enable Gemini) |
GEMINI_MODEL |
Gemini model override | gemini-3.5-flash |
GROK_API_KEY |
xAI Grok authentication | (required to enable Grok) |
GROK_MODEL |
Grok model override | grok-4.3 |
ANTHROPIC_API_KEY |
Anthropic — also serves as moderator | (required to enable Claude) |
ANTHROPIC_MODEL |
Claude model override | claude-fable-5 |
OLLAMA_ENABLED |
Set to 1 to force-include / 0 to force-exclude the local Ollama general (overrides StrategyConfig.ollama.enabled) |
unset (use StrategyConfig) |
OLLAMA_MODEL |
Ollama model override | llama3 |
OPENAI_COMPATIBLE_BASE_URL |
Force-enable an OpenAI-compatible local server (LM Studio, Jan, llama.cpp-server, Msty, LocalAI). CI override for StrategyConfig.openAICompatible. |
unset |
OPENAI_COMPATIBLE_MODEL |
Model identifier as the local server exposes it | unset |
CONSENSUS_MODEL |
Override the Claude model used for the final synthesis | falls back to ANTHROPIC_MODEL |
CLI flags:
| Flag | Purpose | Default |
|---|---|---|
--goal "..." |
Directive to the panel | (none) |
--context "..." |
Free-form additional context | (none) |
--rounds N |
Max debate rounds | 5 |
--timeout N |
Per-provider timeout in seconds | 120 |
--format |
summary, json, or full |
summary |
--quiet |
Suppress streaming, only show final result | off |
--stdin |
Read code from standard input | off |
Privacy
- API keys live in a permission-locked local file (
~/Library/Application Support/Joint Chiefs/credentials.json, mode0600), encrypted at rest by FileVault and read only via thejointchiefs-keygetterbinary. Env vars exist as a CI fallback. - No telemetry. No analytics. The only network traffic is to the LLM APIs you've configured.
- The MCP server is stdio-only — nothing binds a port.
- Code sent for review is stored only in local transcript files. Delete them whenever.
Development
cd JointChiefs
swift test # current test count changes over time
swift build -c release
The project layout:
JointChiefs/
├── Package.swift
├── Sources/
│ ├── JointChiefsCore/ # Models, providers, orchestrator, APIKeyResolver
│ ├── JointChiefsCLI/ # jointchiefs executable
│ ├── JointChiefsMCP/ # jointchiefs-mcp stdio server
│ ├── JointChiefsSetup/ # jointchiefs-setup SwiftUI installer
│ └── JointChiefsKeygetter/ # jointchiefs-keygetter — sole credential-file accessor
└── Tests/JointChiefsCoreTests/
Contributing
PRs welcome — especially first-class providers for Mistral and DeepSeek. Both are reachable today via the OpenAI-compatible path (point OPENAI_COMPATIBLE_BASE_URL at https://api.mistral.ai/v1 or https://api.deepseek.com/v1); native providers would add curated model lists and provider-specific handling. This is a solo-maintained project, so response times will vary. No SLA, no promises about backwards compatibility, and breaking changes can land on main between releases.
If you want to add a provider, conform to the ReviewProvider protocol in Sources/JointChiefsCore/Services/Providers/ReviewProvider.swift and use SSE streaming end-to-end — non-streaming LLM calls are not accepted.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。