Elenchus MCP Server

$npx -y @jhlee0409/elenchus-mcp
README.md

Adversarial code verification system using Verifier-Critic debate loop

Elenchus MCP Server

English | 한국어

Adversarial Code Verification System using Verifier↔Critic Debate Loop

Elenchus (ἔλεγχος): Socrates' method of refutation through systematic questioning - exposing contradictions to reach truth.


Overview

Elenchus is a Model Context Protocol (MCP) server that implements adversarial code verification. Unlike simple linting or static analysis, Elenchus orchestrates a debate between Verifier and Critic agents to systematically uncover issues through dialectical reasoning.

Why Adversarial Verification?

Traditional Approach Elenchus Approach
Single-pass analysis Multi-round debate
Checklist-based Intent-based semantic analysis
Fixed rules Adaptive convergence
Silent on clean code Explicit negative assertions

The Verifier↔Critic Loop

┌──────────────────────────────────────────────────────────────┐
│                    VERIFICATION LOOP                          │
├──────────────────────────────────────────────────────────────┤
│  Round 1: Verifier → Examines code, RAISES issues            │
│  Round 2: Critic   → Challenges issues (VALID/INVALID/PARTIAL)│
│  Round 3: Verifier → Defends, resolves, or finds new issues  │
│  Round 4: Critic   → Re-evaluates, checks coverage           │
│  ...continues until convergence...                            │
│  Final: Verdict (PASS / FAIL / CONDITIONAL)                  │
└──────────────────────────────────────────────────────────────┘

Key Features

🔄 Adversarial Debate System

  • Verifier: Finds issues with evidence
  • Critic: Challenges findings, validates claims
  • Role Enforcement: Strict alternation with compliance scoring

📊 Intent-Based Convergence

  • Semantic understanding instead of keyword matching
  • 5 category coverage (Security, Correctness, Reliability, Maintainability, Performance)
  • Edge case documentation requirements
  • Negative assertions for clean code

🧠 LLM-Based Evaluation (Optional)

  • Convergence Assessment: LLM judges verification quality (vs rigid boolean checks)
  • Severity Classification: Context-aware impact analysis
  • Edge Case Validation: Verifies actual analysis, not just keyword presence
  • False Positive Detection: Evidence-based issue validation

🔍 Automatic Impact Analysis

  • Multi-language dependency graph (15 languages via tree-sitter)
  • Ripple effect prediction
  • Cascade depth calculation
  • Risk level assessment

🌐 Multi-Language Support

Dependency analysis powered by tree-sitter AST parsing:

Category Languages
Web TypeScript, TSX, JavaScript, CSS
Systems Rust, Go, C, C++
Enterprise Java, C#
Scripting Python, Ruby, PHP, Bash, PowerShell

💾 Session Management

  • Checkpoint/rollback support
  • Global session storage
  • Audit trail preservation

⚡ Token Optimization (Optional)

  • Differential analysis (verify only changed code)
  • Response caching
  • Selective chunking
  • Tiered verification pipeline

Quick Start

Add to your MCP client configuration:

{
  "mcpServers": {
    "elenchus": {
      "command": "npx",
      "args": ["-y", "@jhlee0409/elenchus-mcp"]
    }
  }
}

Then use naturally with your AI assistant:

"Please verify src/auth for security issues"

See Installation for client-specific setup instructions.


Installation

Supported Clients

Client Status Notes
Claude Desktop ✅ Supported macOS, Windows
Claude Code ✅ Supported CLI tool
VS Code (Copilot) ✅ Supported Requires v1.102+
Cursor ✅ Supported 40 tool limit applies
Other MCP C

Tools (1)

verify_codeInitiates an adversarial debate loop to verify code for security, correctness, and performance issues.

Configuration

claude_desktop_config.json
{"mcpServers": {"elenchus": {"command": "npx", "args": ["-y", "@jhlee0409/elenchus-mcp"]}}}

Try it

Please verify src/auth for security issues using the Elenchus debate loop.
Run an adversarial verification on my database connection logic to find potential performance bottlenecks.
Analyze the recent changes in the repository and perform a differential verification on the affected files.
Use Elenchus to check for correctness and edge cases in my new TypeScript utility functions.

Frequently Asked Questions

What are the key features of Elenchus MCP Server?

Adversarial Debate System: Orchestrates Verifier and Critic agents to systematically uncover issues.. Intent-Based Convergence: Performs semantic analysis across security, correctness, reliability, maintainability, and performance.. Multi-Language Dependency Graph: Powered by tree-sitter AST parsing for 15+ languages including Rust, Go, and Python.. Automatic Impact Analysis: Predicts ripple effects and calculates cascade depth for code changes.. Token Optimization: Supports differential analysis to verify only changed code and response caching..

What can I use Elenchus MCP Server for?

Security Auditing: Uncovering deep-seated vulnerabilities that traditional static linters miss through dialectical reasoning.. Refactoring Validation: Using dependency graphs to predict the impact of changes across complex codebases.. Edge Case Discovery: Forcing explicit negative assertions to ensure clean code handles unexpected inputs.. Performance Optimization: Identifying semantic bottlenecks through multi-round agent debates..

How do I install Elenchus MCP Server?

Install Elenchus MCP Server by running: npx -y @jhlee0409/elenchus-mcp

What MCP clients work with Elenchus MCP Server?

Elenchus MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Elenchus MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free