
Rubber Duck
io.github.nesquikm由 GitHub 账号 nesquikm 发布v1.18.0更新于 Oct 24, 2026
Bridge to multiple LLMs and CLI agents: councils, debates, voting, and more
概览
一个本地 MCP 服务器,把助手连接到多个 LLM 和命令行编程代理,可向它们提问、比较、投票、评判和辩论。
- 可以做什么
- 向选定的 LLM 提供方或命令行编程代理提问,并进行多轮对话,也可清空对话历史。列出已配置的提供方、健康状态和可用模型。把同一问题同时发给多个提供方,或向所有已配置的 duck 组成议会统一征询。进行多 duck 投票并给出理由和置信度,让一个 duck 评判并排序其他回答,在两个 duck 之间迭代改进回答,或进行结构化的多轮辩论。查看用量统计(请求数、token 数和预估费用),并检查 MCP Bridge 状态和待处理的工具审批请求。
- 适用场景
- 适合需要就问题、计划或设计听取第二、第三种意见,或希望多个模型互相比较、投票、辩论和交叉核对的场景。也适合同时使用云端 LLM API 和本地命令行编程代理的配置。
- 运行要求
- 以 npm 包 mcp-rubber-duck 通过 stdio 在本地运行,需要 Node.js 20 或更高版本以及 npm 或 yarn。至少需要一个 HTTP 提供方的 API 密钥(OPENAI_API_KEY、GEMINI_API_KEY 或 GROQ_API_KEY),或本地已安装的命令行编程代理。需要能访问所选提供方的网络;Ollama、LM Studio 等本地提供方需处于运行状态。
安装
在 SourceWeft 中
- 打开 控制台中的 Rubber Duck,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP Rubber Duck
An MCP (Model Context Protocol) server that acts as a bridge to query multiple LLMs -- both OpenAI-compatible HTTP APIs and CLI coding agents. Just like rubber duck debugging, explain your problems to various AI "ducks" and get different perspectives!
[npm version] [Docker Image] [MCP Registry]
[MCP Rubber Duck - AI ducks helping debug code]
Why direct provider integration? MCP's
samplingprimitive -- a server borrowing the host's model -- was deprecated in the 2026-07-28 spec RC in favor of servers integrating directly with LLM provider APIs. Rubber Duck has always worked this way (it brings its own ducks), so it's aligned with where the protocol is heading -- no migration required.
Features
- Universal OpenAI Compatibility -- Works with any OpenAI-compatible API endpoint
- CLI Agent Support -- Use CLI coding agents (Claude Code, Codex, Gemini CLI, Grok, Aider) as ducks
- Multiple Ducks -- Configure and query multiple LLM providers simultaneously
- Conversation Management -- Maintain context across multiple messages
- Duck Council -- Get responses from all your configured LLMs at once
- Consensus Voting -- Multi-duck voting with reasoning and confidence scores
- LLM-as-Judge -- Have ducks evaluate and rank each other's responses
- Iterative Refinement -- Two ducks collaboratively improve responses
- Structured Debates -- Oxford, Socratic, and adversarial debate formats
- MCP Prompts -- 8 reusable prompt templates for multi-LLM workflows
- Vision Input -- Send images alongside prompts to vision-capable models (docs)
- Automatic Failover -- Falls back to other providers if primary fails
- Health Monitoring -- Real-time health checks for all providers
- Usage Tracking -- Track requests, tokens, and estimated costs per provider
- MCP Bridge -- Connect ducks to other MCP servers for extended functionality (docs)
- Guardrails -- Pluggable safety layer with rate limiting, token limits, pattern blocking, and PII redaction (docs)
- Granular Security -- Per-server approval controls with session-based approvals
- Interactive UIs -- Rich HTML panels for compare, vote, debate, and usage tools (via MCP Apps)
- Tool Annotations -- MCP-compliant hints for tool behavior (read-only, destructive, etc.)
- Structured Output --
outputSchemaon tools returning structured JSON for client-side validation (Cursor, VS Code/Copilot) - Spec-Aligned by Design -- connects directly to provider APIs, the path the MCP
2026-07-28spec recommends now that server-sidesamplingis deprecated (SEP-2577)
Supported Providers
HTTP Providers (OpenAI-compatible API)
Any provider with an OpenAI-compatible API endpoint, including:
- OpenAI
- Google Gemini
- Anthropic (via OpenAI-compatible endpoints)
- Groq (fast inference for open-weight models)
- Together AI (broad open-weight model catalog)
- Perplexity (online models with web search)
- Azure OpenAI, Ollama, LM Studio, Custom
CLI Providers (Coding Agents)
Command-line coding agents that run as local processes:
- Claude Code (
claude) -- Codex (codex) -- Gemini CLI (gemini) -- Grok CLI (grok) -- Aider (aider) -- Custom
See CLI Providers for full setup and configuration.
Quick Start
Using Claude Desktop? Jump to Claude Desktop Configuration. Using Cursor, VS Code, Windsurf, or another tool? See the Setup Guide.
Installation
Prerequisites
- Node.js 20 or higher
- npm or yarn
- At least one API key for an HTTP provider, or a CLI coding agent installed locally
Install from NPM
Install from Source
Configuration
Create a .env file or config/config.json. Key environment variables:
Full reference: Configuration docs
Interactive UIs (MCP Apps)
Four tools -- compare_ducks, duck_vote, duck_debate, and get_usage_stats -- can render rich interactive HTML panels inside supported MCP clients via MCP Apps. Once this MCP server is configured in a supporting client, the UIs appear automatically -- no additional setup is required. Clients without MCP Apps support still receive the same plain text output (no functionality is lost). See the MCP Apps repo for an up-to-date list of supported clients.
Compare Ducks
Compare multiple model responses side-by-side, with latency indicators, token counts, model badges, and error states.
[Compare Ducks interactive UI]
Duck Vote
Have multiple ducks vote on options, displayed as a visual vote tally with bar charts, consensus badge, winner card, confidence bars, and collapsible reasoning.
Duck Debate
Structured multi-round debate between ducks, shown as a round-by-round view with format badge, participant list, collapsible rounds, and synthesis section.
Usage Stats
Usage analytics with summary cards, provider breakdown with expandable rows, token distribution bars, and estimated costs.
Available Tools
Full reference with input schemas: Tools docs
Available Prompts
Full reference with examples: Prompts docs
Development
Documentation
Troubleshooting
Provider Not Working
- Check API key is correctly set
- Verify endpoint URL is correct
- Run health check:
list_ducks({ check_health: true }) - Check logs for detailed error messages
OpenAI gpt-5.6 / gpt-6 Models Fail With the MCP Bridge
OpenAI's Chat Completions API rejects function tools for the gpt-5.6 and gpt-6 families (400 Function tools with reasoning_effort are not supported ... use /v1/responses). They work for plain calls, but with MCP_BRIDGE_ENABLED=true the ducks attach tools and those requests fail. Use gpt-5.4 (the default) or gpt-5.4-mini until Responses API support lands (#166).
Connection Issues
- For local providers (Ollama, LM Studio), ensure they're running
- Check firewall settings for local endpoints
- Verify network connectivity to cloud providers
Rate Limiting
- Configure failover to alternate providers
- Adjust
max_retriesandtimeoutsettings - See Guardrails for rate limiting configuration
Contributing
We love contributions! Whether you're fixing bugs, adding features, or teaching our ducks new tricks, we'd love to have you join the flock.
Check out our Contributing Guide to get started.
Quick start for contributors:
- Fork the repository
- Create a feature branch
- Follow our conventional commit guidelines
- Add tests for new functionality
- Submit a pull request
License
MIT License - see LICENSE file for details
Acknowledgments
- Inspired by the rubber duck debugging method
- Built on the Model Context Protocol (MCP)
- Uses OpenAI SDK for HTTP provider compatibility
- Supports CLI coding agents (Claude Code, Codex, Gemini CLI, Grok, Aider)
Changelog
See CHANGELOG.md for a detailed history of changes and releases.
Registry & Directory
- NPM Package: npmjs.com/package/mcp-rubber-duck
- Docker Images: ghcr.io/nesquikm/mcp-rubber-duck
- MCP Registry: Official MCP server
io.github.nesquikm/rubber-duck - Glama Directory: glama.ai/mcp/servers/@nesquikm/mcp-rubber-duck
- Awesome MCP Servers: Listed in the community directory
Support
- Report issues: https://github.com/nesquikm/mcp-rubber-duck/issues
- Documentation: https://github.com/nesquikm/mcp-rubber-duck/wiki
- Discussions: https://github.com/nesquikm/mcp-rubber-duck/discussions
Happy Debugging with your AI Duck Panel!
来源:README.md,提交 ade02a8
工具
0版本历史
1- v1.18.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分