Skip to main content

OpenClaw Consensus MCP

9-LLM consensus inside Claude — a hallucination guardrail you can call as a tool.

Built by yanmiayn — 16yo solo dev from Korea, building 9-LLM consensus to fight hallucinations.

What it does

OpenClaw runs the same prompt across 9 frontier LLMs (Claude, GPT, Gemini, Llama, Mistral, etc.), then returns:

  • a consensus answer (with confidence + which models contributed),
  • a disagreement score (high = your single LLM is probably about to hallucinate), and
  • a cheapest route (pick the smallest model combo that still hits your quality bar).

This MCP server exposes those three capabilities as tools so Claude Desktop / Claude Code can call them mid-conversation.

Why consensus?

A single LLM can confidently make things up. Nine models rarely make up the same thing. When 9 models agree, you can trust the answer; when they fan out, you have a cheap, calibrated hallucination signal — before the user sees the wrong answer.

Install

pip install openclaw-consensus-mcp
# or
uv pip install openclaw-consensus-mcp

You also need a RapidAPI key for the OpenClaw Consensus API: https://rapidapi.com/yanmiayn/api/openclaw-consensus

Set it in your environment:

export RAPIDAPI_KEY="your-rapidapi-key"

Claude Desktop config

Add to ~/.claude/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "openclaw-consensus": {
      "command": "openclaw-consensus",
      "env": {
        "RAPIDAPI_KEY": "your-rapidapi-key"
      }
    }
  }
}

For Claude Code:

claude mcp add openclaw-consensus -- openclaw-consensus

Tools

consensus(prompt, mode="balanced")

Get a 9-LLM consensus answer.

  • prompt (string) — the question.
  • mode (string, default balanced) — deep (9 models), balanced (5), or fast (3).

Returns

{
  "answer": "string",
  "confidence": 0.0,
  "models_used": ["claude-opus-4.7", "gpt-5.1", "..."],
  "disagreement": 0.0
}

disagreement_score(prompt)

How much the 9 models disagree on a prompt — a hallucination warning signal.

Returns

{
  "score": 0.0,
  "per_model": { "model-id": "answer summary" }
}

cheapest_route(prompt, target_quality=0.85)

Cheapest model combo that meets a quality threshold (0..1).

Returns

{
  "models": ["..."],
  "estimated_cost_usd": 0.0,
  "estimated_quality": 0.0
}

Local development

git clone https://github.com/yanmiayn/openclaw-consensus-mcp
cd openclaw-consensus-mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest

Smoke-test the server with the official MCP Inspector:

npx @modelcontextprotocol/inspector openclaw-consensus

Publish

uv build
uv publish      # to PyPI
mcp-publisher publish   # to the official MCP Registry

License

MIT — see LICENSE.

Metadata

Release files for openclaw-consensus-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openclaw-consensus-mcp 0.1.1
File Size Uploaded Provenance
openclaw_consensus_mcp-0.1.1.tar.gz 8.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openclaw-consensus-mcp 0.1.1
File Interpreter ABI Platform
openclaw_consensus_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / openclaw_consensus_mcp-0.1.1.tar.gz

Download URL openclaw_consensus_mcp-0.1.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
119bf8e98a969cfb3e2e57d05f7468f331a0ba0d954eaa0d68efcad4dcf05106
BLAKE2b-256 checksum
How to use checksums
a3059c7b39f9fc4d549aa4c11574b842e36054e0958ef1f5956cbadf0f923249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / openclaw_consensus_mcp-0.1.1-py3-none-any.whl

Download URL openclaw_consensus_mcp-0.1.1-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e6fb90cf46b361a236fcd2309a56ccd16e5dc5390289d886bb8bbbc12a1d27c
BLAKE2b-256 checksum
How to use checksums
2ed9c8fa5bcc8a3220b181c5b0fd006578f9643afa1f7fd702f7861746d2b4c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for openclaw-consensus-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page