Rubber Duck
概览
作者提供的说明(英文原文)
Bridge to multiple LLMs and CLI agents: councils, debates, voting, and more
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i起步阶段↓ 1119/周 · ★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 搜索与 AI 记忆
- 你需要填写:OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
OPENAI_API_KEY,GEMINI_API_KEY,GROQ_API_KEY,DEFAULT_PROVIDER
标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
- npm已安装 Node.js(用于 npx 命令)
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"rubber-duck": {
"command": "npx",
"args": [
"-y",
"mcp-rubber-duck"
],
"env": {
"OPENAI_API_KEY": "your-value",
"GEMINI_API_KEY": "your-value",
"GROQ_API_KEY": "your-value",
"DEFAULT_PROVIDER": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add rubber-duck --env OPENAI_API_KEY=your-value --env GEMINI_API_KEY=your-value --env GROQ_API_KEY=your-value --env DEFAULT_PROVIDER=your-value -- npx -y mcp-rubber-duck运行前请先填写空着的值。
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"rubber-duck": {
"command": "npx",
"args": [
"-y",
"mcp-rubber-duck"
],
"env": {
"OPENAI_API_KEY": "your-value",
"GEMINI_API_KEY": "your-value",
"GROQ_API_KEY": "your-value",
"DEFAULT_PROVIDER": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"rubber-duck": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-rubber-duck"
],
"env": {
"OPENAI_API_KEY": "your-value",
"GEMINI_API_KEY": "your-value",
"GROQ_API_KEY": "your-value",
"DEFAULT_PROVIDER": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
- OpenAI API key (starts with sk-)
- Google Gemini API key
- Groq API key (starts with gsk_)
DEFAULT_PROVIDERenvDefault LLM provider to use
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 nesquikm 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“搜索与 AI 记忆”中的其他服务器比较i
- 星标数多于此分类中其他 5684 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5684 个服务器的 8% 更新
- 基础检查结果等于或优于此分类中其他 5684 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Rubber Duck 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(1.18.0)于7个月前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
有什么可以替代它?
同一分类中有:Context7, Codebase Memory, Exa
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Codebase Memory
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Exa
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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!
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
# Install globally
npm install -g mcp-rubber-duck
Or use npx directly in Claude Desktop config
npx mcp-rubber-duck
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
npm install -g mcp-rubber-duck
Install from Source
git clone https://github.com/nesquikm/mcp-rubber-duck.git
cd mcp-rubber-duck npm install npm run build npm start
Configuration
Create a .env file or config/config.json. Key environment variables:
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key |
GEMINI_API_KEY | Google Gemini API key |
GROQ_API_KEY | Groq API key |
OPENAI_DEFAULT_MODEL | OpenAI model (default: gpt-5.4) |
GEMINI_DEFAULT_MODEL | Gemini model (default: gemini-3.8-flash) |
GROQ_DEFAULT_MODEL | Groq model (default: openai/gpt-oss-120b) |
DEFAULT_PROVIDER | Default provider key: openai, google, groq, ollama, or a custom name |
DEFAULT_TEMPERATURE | Default temperature (e.g., 0.7) |
LOG_LEVEL | debug, info, warn, error |
MCP_SERVER | Set to true for MCP server mode |
MCP_BRIDGE_ENABLED | Enable MCP Bridge (ducks access external MCP servers) |
CUSTOM_{NAME}_* | Custom HTTP providers |
CLI_{AGENT}_ENABLED | Enable CLI agents (CLAUDE, CODEX, GEMINI, GROK, AIDER) |
Full reference: [Configuration docs](./docs/configuration.md)
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.
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
| Tool | Description |
|---|---|
ask_duck | Ask a single question to a specific LLM provider |
chat_with_duck | Conversation with context maintained across messages |
clear_conversations | Clear all conversation history |
list_ducks | List configured providers and health status |
list_models | List available models for providers |
compare_ducks | Ask the same question to multiple providers simultaneously |
duck_council | Get responses from all configured ducks |
get_usage_stats | Usage statistics and estimated costs |
duck_vote | Multi-duck voting with reasoning and confidence |
duck_judge | Have one duck evaluate and rank others' responses |
duck_iterate | Iteratively refine a response between two ducks |
duck_debate | Structured multi-round debate between ducks |
mcp_status | MCP Bridge status and connected servers |
get_pending_approvals | Pending MCP tool approval requests |
approve_mcp_request | Approve or deny a duck's MCP tool request |
Full reference with input schemas: [Tools docs](./docs/tools.md)
Available Prompts
| Prompt | Purpose | Required Arguments |
|---|---|---|
perspectives | Multi-angle analysis with assigned lenses | problem, perspectives |
assumptions | Surface hidden assumptions in plans | plan |
blindspots | Hunt for overlooked risks and gaps | proposal |
tradeoffs | Structured option comparison | options, criteria |
red_team | Security/risk analysis from multiple angles | target |
reframe | Problem reframing at different levels | problem |
architecture | Design review across concerns | design, workloads, priorities |
diverge_converge | Divergent exploration then convergence | challenge |
Full reference with examples: [Prompts docs](./docs/prompts.md)
Development
npm run dev # Development with watch mode
npm test # Run all tests npm run lint # ESLint npm run typecheck # Type check without emit
Documentation
| Topic | Link |
|---|---|
| Setup guide (all tools) | [docs/setup.md](./docs/setup.md) |
| Full configuration reference | docs/configuration.md |
| Claude Desktop setup | docs/claude-desktop.md |
| All tools with schemas | docs/tools.md |
| Prompt templates | docs/prompts.md |
| CLI coding agents | docs/cli-providers.md |
| MCP Bridge | docs/mcp-bridge.md |
| Guardrails | docs/guardrails.md |
| Docker deployment | docs/docker.md |
| Provider-specific setup | docs/provider-setup.md |
| Usage examples | docs/usage-examples.md |
| Architecture | docs/architecture.md |
| Roadmap | docs/roadmap.md |
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
__
<(o )___ ( ._> / `---' Quack! Ready to debug!
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 co
只显示了开头部分;其余内容请在仓库中阅读