- Home
- MCP servers
- Quadruple Consensus MCP Server for Claude Code
Quadruple Consensus MCP Server for Claude Code
- rust
0
GitHub Stars
rust
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"samoradc-tetrad": {
"command": "npx",
"args": [
"@samoradc/tetrad",
"serve"
],
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY",
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
"DASHSCOPE_API_KEY": "YOUR_DASHSCOPE_API_KEY"
}
}
}
}Tetrad is a high‑performance MCP server written in Rust that coordinates three AI‑powered CLI evaluation tools to validate code produced by Claude Code. It implements a quadruple consensus protocol, requiring approval from Codex, Gemini, Qwen, and Claude Code itself before code is accepted, ensuring robust verification and safer code generation workflows.
How to use
You run Tetrad as an MCP server and connect Claude Code or another MCP client to it. When Claude Code asks you to write code, Tetrad automatically validates the output by sending it to Codex, Gemini, and Qwen for assessment and then returns a consolidated consensus decision. You can customize evaluation hooks, inspect evaluation history, and manage patterns with the ReasoningBank.
How to install
Prerequisites: you need Node.js and Cargo installed on your system. You will install Tetrad, configure access to Codex, Gemini, and Qwen CLIs, and set up Claude Code to call the MCP server.
Step 1 — Install Tetrad (recommended method that works smoothly with Claude Code):
# Via npm (recommended - integrates well with Claude Code)
npm install -g @samoradc/tetrad
# Or via cargo (requires Rust toolchain)
cargo install tetrad
sudo cp ~/.cargo/bin/tetrad /usr/local/bin/
Step 2 — Initialize in your project (optional):
npx @samoradc/tetrad init
Step 3 — Verify installation and readiness:
# Check version and status
tetrad version
tetrad status
tetrad doctor
Step 4 — Add Tetrad to Claude Code MCP configuration so Claude Code can use it as an MCP server:
# Add Tetrad as MCP server for all projects
claude mcp add --scope user tetrad -- npx @samoradc/tetrad serve
# Verify configuration
claude mcp list
Alternative installation methods include configuring a per‑project MCP entry or using a cargo‑installed binary if needed. A manual configuration example is provided later for reference.
Configuration and security
The server can be wired via a simple local process (stdio) or through explicit MCP configuration. You provide the command to start Tetrad and any necessary environment variables for external AI CLIs. A sample per‑project configuration is shown below.
Example per‑project MCP configuration (stdio):
{
"mcpServers": {
"tetrad": {
"type": "stdio",
"command": "npx",
"args": ["@samoradc/tetrad", "serve"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}",
"GOOGLE_API_KEY": "${GOOGLE_API_KEY}",
"DASHSCOPE_API_KEY": "${DASHSCOPE_API_KEY}"
}
}
}
}
Alternatively, global user configuration can be placed in the MCP config file at ~/.claude.json under the mcpServers section with the same shape but without necessarily redefining environment defaults.
Troubleshooting and notes
If you encounter issues like the CLI not being found or a JSON response error from evaluators, ensure the executor commands are correct for each tool and that the MCP server is reachable by Claude Code. Common checks include confirming that each CLI is installed and authenticated, and that the MCP server command and arguments exactly match the expected structure.
Key notes to remember: you must have at least one of Codex, Gemini, or Qwen CLI tools installed and authenticated to use Tetrad. You can run status and doctor commands to verify installation and configuration. If you split configuration across projects, keep environment keys consistent to avoid authentication mismatches.
Advanced usage and patterns
Tetrad offers a set of CLI commands to manage evaluations, history, and patterns via the ReasoningBank. You can inspect evaluation history, export patterns for sharing, and import patterns from other ReasoningBank instances. These features help you iterate on code generation while tracking and consolidating best practices.
Available tools
tetrad_review_plan
Review implementation plans before coding
tetrad_review_code
Review code before saving
tetrad_review_tests
Review tests before finalizing
tetrad_confirm
Confirm agreement with received feedback
tetrad_final_check
Final verification before commit
tetrad_status
Check health of evaluators