OpenClaw Consensus

السجل الرسمي الذكاء الاصطناعي والوكلاء

9-LLM consensus + disagreement scoring + cheapest-route picks to fight hallucinations.

ماذا يمكنك أن تفعل مع OpenClaw Consensus؟

  • a consensus answer with confidence and model response metadata,
  • a disagreement heuristic derived from the deep consensus response, and
  • a cheapest route recommendation that tries smaller model sets before escalating.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package openclaw-consensus-mcp
Claude Code
claude mcp add openclaw-consensus -e 'RAPIDAPI_KEY=<your rapidapi_key>' -- uvx openclaw-consensus-mcp==0.1.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "openclaw-consensus": {
            "command": "uvx",
            "args": [
                "openclaw-consensus-mcp==0.1.1"
            ],
            "env": {
                "RAPIDAPI_KEY": "<your rapidapi_key>"
            }
        }
    }
}

متغيرات البيئة

  • RAPIDAPI_KEY إلزامي سري Your RapidAPI key from https://rapidapi.com/yanmiayn/api/openclaw-consensus

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. OpenClaw Consensus MCP
  2. What it does
  3. Why consensus?
  4. Install
  5. Claude Desktop config
  6. Tools
  7. Local development
  8. Publish
  9. Limitations
  10. Security
  11. License

OpenClaw Consensus MCP

Multi-model consensus inside MCP clients: compare answers, surface disagreement, and escalate only when needed.

OpenClaw Consensus MCP wraps the OpenClaw Consensus API as three Model Context Protocol tools. It is designed for workflows where a maintainer wants a second opinion before accepting a risky answer, review summary, or routing decision.

What it does

OpenClaw runs the same prompt across multiple models, then returns:

  • a consensus answer with confidence and model response metadata,
  • a disagreement heuristic derived from the deep consensus response, and
  • a cheapest route recommendation that tries smaller model sets before escalating.

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

Why consensus?

A single model can produce a confident but incorrect answer. Comparing multiple responses does not prove correctness, but disagreement is a useful signal that a maintainer should review the output more carefully.

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

{
  "consensus": "string",
  "confidence": 0.0,
  "models_responded": 5,
  "votes": []
}

The consensus tool returns the upstream API response as-is. Fields may expand as the endpoint evolves.

disagreement_score(prompt)

How much the deep consensus response disagrees on a prompt.

Returns

{
  "disagreement": 0.0,
  "confidence": 1.0,
  "models_responded": 9,
  "votes": []
}
cheapest_route(prompt, target_quality=0.85)

Try fast, balanced, and deep modes in order until the confidence threshold is met.

Returns

{
  "selected_mode": "balanced",
  "models_used": 5,
  "confidence": 0.9,
  "answer": "string"
}

Local development

git clone https://github.com/MICONNM/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

See CONTRIBUTING.md for the development workflow and docs/maintainer-workflow.md for triage, review, security, and release responsibilities.

Limitations

  • Consensus is a review aid, not a correctness guarantee.
  • Network-backed tools require a configured OpenClaw endpoint and may incur provider charges.
  • Do not send secrets, private source code, or personal data unless your endpoint policy explicitly allows it.

Security

Please report vulnerabilities privately using the process in SECURITY.md.

License

MIT — see LICENSE.

الأسئلة الشائعة

ما هو OpenClaw Consensus؟

9-LLM consensus + disagreement scoring + cheapest-route picks to fight hallucinations.

كيف أثبّت OpenClaw Consensus؟

يعمل على جهازك. في Claude Code: claude mcp add openclaw-consensus -e 'RAPIDAPI_KEY=<your rapidapi_key>' -- uvx openclaw-consensus-mcp==0.1.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج OpenClaw Consensus إلى مفتاح API؟

نعم. يتطلب RAPIDAPI_KEY، وتضبطها في إعداداته.

هل OpenClaw Consensus مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون OpenClaw Consensus؟

ينشره MICONNM. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.