Tetrad MCP Server

Quadruple consensus MCP server for code validation using Codex, Gemini, and Qwen

Local serverstdio

What is the Tetrad MCP server?

Most developer tooling work still happens through a UI a human drives. Tetrad MCP server moves it into the conversation instead. Quadruple consensus MCP server for code validation using Codex, Gemini, and Qwen.

The short version

The system implements a quadruple consensus protocol where no code or plan is accepted without approval from four intelligences: the three external evaluators + Claude Code itself.

  • Quadruple Consensus — 4 AI models must agree to approve code
  • ReasoningBank — Continuous learning system with RETRIEVE→JUDGE→DISTILL→CONSOLIDATE cycle
  • High Performance — Written in Rust with parallel execution via Tokio
  • MCP Server — JSON-RPC 2.0 server over stdio for Claude Code integration
  • Full CLI — Intuitive commands (init, serve, status, doctor, config, etc.)
  • LRU Cache — Result caching with configurable TTL

The tools it exposes

The server publishes 6 tools. What each one is for:

  • 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

What it needs from you

Configuration is passed through the environment: OPENAI_API_KEY, GOOGLE_API_KEY, DASHSCOPE_API_KEY, GEMINI_API_KEY, OPENAI_BASE_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

To use Tetrad, you need at least one of the AI CLIs installed and authenticated: | CLI | Installation | Auth Without API Key? | Free Tier | |-----|--------------|----------------------|-----------| | Codex CLI | npm i -g @openai/codex | ✅ ChatGPT Plus/Pro/Business | Via subscription | | Gemini CLI | `npm i -g

Getting it running

@samoradc/tetrad on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Tetrad's toolset — tetrad_review_plan, tetrad_review_code, tetrad_review_tests and 3 more — is a fair guide to whether it matches your workflow. It is maintained by SamoraDC; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
tetrad_review_planReview implementation plans before coding
tetrad_review_codeReview code before saving
tetrad_review_testsReview tests before finalizing
tetrad_confirmConfirm agreement with received feedback
tetrad_final_checkFinal verification before commit
tetrad_statusCheck health of evaluators

How to install the Tetrad MCP server

{
  "mcpServers": {
    "tetrad": {
      "command": "npx",
      "args": ["-y", "@samoradc/tetrad"],
      "env": {
        "OPENAI_API_KEY": "your-value",
        "GOOGLE_API_KEY": "your-value",
        "DASHSCOPE_API_KEY": "your-value",
        "GEMINI_API_KEY": "your-value",
        "OPENAI_BASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

To use Tetrad, you need at least one of the AI CLIs installed and authenticated: | CLI | Installation | Auth Without API Key? | Free Tier | |-----|--------------|----------------------|-----------| | Codex CLI | npm i -g @openai/codex | ✅ ChatGPT Plus/Pro/Business | Via subscription | | Gemini CLI | `npm i -g

VariableDescriptionRequired
OPENAI_API_KEYCredential the server authenticates with.Yes
GOOGLE_API_KEYCredential the server authenticates with.Yes
DASHSCOPE_API_KEYCredential the server authenticates with.Yes
GEMINI_API_KEYCredential the server authenticates with.Yes
OPENAI_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Tetrad to tetrad review plan.
  • Use Tetrad to tetrad review code.
  • Use Tetrad to tetrad review tests.

Frequently asked questions

It connects Tetrad to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (tetrad_review_plan, tetrad_review_code, tetrad_review_tests, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Tetrad directly.