🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@samoradc/tetrad

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samoradc/tetrad

Quadruple Consensus MCP Server for Claude Code - Validates code using Codex, Gemini and Qwen

latest
Source
npmnpm
Version
0.1.15
Version published
Maintainers
1
Created
Source

Tetrad

npm CI License: MIT

Quadruple Consensus MCP Server for Claude Code

Tetrad is a high-performance MCP (Model Context Protocol) server that orchestrates three AI-powered CLI tools (Codex, Gemini CLI, Qwen) to validate all code produced by Claude Code.

Quick Start

1. Initialize in your project

npx @samoradc/tetrad init

This will:

  • Create tetrad.toml configuration file
  • Create .tetrad/ directory for the database
  • Add .tetrad/ to your .gitignore

2. Add to Claude Code

# Add as MCP server (available in all projects)
claude mcp add --scope user tetrad -- npx @samoradc/tetrad serve

# Or for current project only
claude mcp add tetrad -- npx @samoradc/tetrad serve

3. Verify

# Check version
npx @samoradc/tetrad version

# Check CLI availability
npx @samoradc/tetrad status

# Diagnose issues
npx @samoradc/tetrad doctor

Commands

npx @samoradc/tetrad init              # Initialize config in current directory
npx @samoradc/tetrad serve             # Start MCP server (used by Claude Code)
npx @samoradc/tetrad status            # Show CLI status (codex, gemini, qwen)
npx @samoradc/tetrad config            # Interactive configuration
npx @samoradc/tetrad doctor            # Diagnose configuration issues
npx @samoradc/tetrad version           # Show version
npx @samoradc/tetrad evaluate -c CODE  # Manual code evaluation (without MCP)
npx @samoradc/tetrad history           # Show evaluation history from ReasoningBank

Manual MCP Configuration

Add to your .mcp.json:

{
  "mcpServers": {
    "tetrad": {
      "type": "stdio",
      "command": "npx",
      "args": ["@samoradc/tetrad", "serve"]
    }
  }
}

Requirements

Tetrad requires at least one of these AI CLI tools:

  • Codex CLI (OpenAI): npm install -g @openai/codex
  • Gemini CLI (Google): npm install -g @google/gemini-cli
  • Qwen CLI (Alibaba): pip install dashscope

Features

  • Quadruple Consensus: 4 AI models must agree to approve code
  • ReasoningBank: Continuous learning system with SQLite
  • High Performance: Written in Rust
  • LRU Cache: Result caching with configurable TTL
  • Hook System: Pre/post evaluation callbacks
  • Auto .gitignore: Automatically ignores local data

Configuration

After npx @samoradc/tetrad init, edit tetrad.toml:

[general]
log_level = "info"
timeout_secs = 60

[executors.codex]
enabled = true
command = "codex"
args = ["exec", "--json"]

[executors.gemini]
enabled = true
command = "gemini"
args = ["-o", "json"]

[executors.qwen]
enabled = true
command = "qwen"

[consensus]
default_rule = "strong"  # golden, strong, weak
min_score = 70
max_loops = 3

[reasoning]
enabled = true
db_path = ".tetrad/tetrad.db"

[cache]
enabled = true
capacity = 1000
ttl_secs = 300

Documentation

Full documentation: GitHub Repository

License

MIT

Keywords

mcp

FAQs

Package last updated on 29 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts