OpenClaw Consensus

io.github.MICONNM由 GitHub 账号 MICONNM 发布v0.1.1更新于 Oct 24, 2026

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

发布方自己的服务:OpenClaw Direct

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

封装 OpenClaw Consensus API,让助手把同一提示交给多个大模型比对答案、评估分歧程度,并挑选最省成本的调用路径。

可以做什么
  • 获取多模型共识答案,含置信度与各模型投票,可选 deep、balanced 或 fast 模式
  • 评估深度多模型回答在某个提示上的分歧程度
  • 按 fast、balanced、deep 顺序尝试,直到达到目标置信度,给出最省成本路径
  • 原样返回上游 API 响应,字段可能随接口演进而增加
适用场景
适合维护者在接受有风险的答案、评审摘要或路由决策前想要第二意见,或需要分歧信号来判断输出是否值得进一步人工复核时使用。
运行要求
以本地 Python 包形式通过 stdio 运行(pip 或 uv 安装),需在 Claude Desktop 或 Claude Code 配置中登记。需要 RAPIDAPI_KEY 环境变量提供 RapidAPI 密钥,并能访问 OpenClaw Consensus API 的网络。
安装前请注意
提示内容会发送给第三方 API 及多个模型;README 提醒除非端点策略明确允许,不要发送密钥、私有源代码或个人数据。联网工具可能产生服务商费用。共识结果只是复核辅助,不保证正确性。

安装

在 SourceWeft 中

  1. 打开 控制台中的 OpenClaw Consensus,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

OpenClaw Consensus MCP

[CI] [PyPI] [License: MIT]

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

bash
pip install openclaw-consensus-mcp# oruv 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:

bash
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):

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

For Claude Code:

bash
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

json
{  "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

json
{  "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

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

Local development

bash
git clone https://github.com/MICONNM/openclaw-consensus-mcpcd openclaw-consensus-mcpuv venv && source .venv/bin/activateuv pip install -e ".[dev]"pytest

Smoke-test the server with the official MCP Inspector:

bash
npx @modelcontextprotocol/inspector openclaw-consensus

Publish

bash
uv builduv publish      # to PyPImcp-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.

来源:README.md,提交 8f02319

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Openclaw 集成