mcp-rubber-duck
This MCP server lets you query multiple LLM "ducks" (OpenAI-compatible providers) from any MCP client—individually or as a group—for rubber-duck debugging, comparison, voting, judging, and debate.
Ask one provider a question (
ask_duck), with optional model, provider, temperature, and image/vision inputMaintain context across messages with
chat_with_duck, and reset state viaclear_conversationsDiscover configured providers and health status (
list_ducks) and available models (list_models)Fan out the same prompt to several providers (
compare_ducks) or all configured ducks (duck_council)Collect multi-duck votes with reasoning, confidence, and consensus level (
duck_vote)Have one duck evaluate and rank others' responses against criteria/persona (
duck_judge)Iteratively refine an answer between exactly two ducks (
duck_iterate, refine or critique-improve modes)Run structured multi-round debates—oxford, socratic, or adversarial—with a synthesizer (
duck_debate)Track token usage, request counts, errors, and estimated costs over selectable periods (
get_usage_stats)Receive structured JSON output from several tools and rich interactive HTML panels (compare, vote, debate, usage) in MCP Apps–capable clients
Enables querying Google's Gemini language models (including Gemini 2.5 Flash and Gemini 2.0 Flash) through OpenAI-compatible API endpoints
Enables interaction with locally-hosted language models through Ollama's OpenAI-compatible API endpoint for private AI conversations
Provides direct integration with OpenAI's language models including GPT-4 and GPT-3.5 for AI conversations and queries
Provides access to Perplexity's online language models with web search capabilities through OpenAI-compatible endpoints
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-rubber-duck Can you help me debug this Python function that's returning None unexpectedly?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
Related MCP server: mcp-llm
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-duckUsing 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-duckInstall from Source
git clone https://github.com/nesquikm/mcp-rubber-duck.git
cd mcp-rubber-duck
npm install
npm run build
npm startConfiguration
Create a .env file or config/config.json. Key environment variables:
Variable | Description |
| OpenAI API key |
| Google Gemini API key |
| Groq API key |
| OpenAI model (default: |
| Gemini model (default: |
| Groq model (default: |
| Default provider key: |
| Default temperature (e.g., |
|
|
| Set to |
| Enable MCP Bridge (ducks access external MCP servers) |
| Custom HTTP providers |
| Enable CLI agents ( |
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.
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 a single question to a specific LLM provider |
| Conversation with context maintained across messages |
| Clear all conversation history |
| List configured providers and health status |
| List available models for providers |
| Ask the same question to multiple providers simultaneously |
| Get responses from all configured ducks |
| Usage statistics and estimated costs |
| Multi-duck voting with reasoning and confidence |
| Have one duck evaluate and rank others' responses |
| Iteratively refine a response between two ducks |
| Structured multi-round debate between ducks |
| MCP Bridge status and connected servers |
| Pending MCP tool approval requests |
| Approve or deny a duck's MCP tool request |
Full reference with input schemas: Tools docs
Available Prompts
Prompt | Purpose | Required Arguments |
| Multi-angle analysis with assigned lenses |
|
| Surface hidden assumptions in plans |
|
| Hunt for overlooked risks and gaps |
|
| Structured option comparison |
|
| Security/risk analysis from multiple angles |
|
| Problem reframing at different levels |
|
| Design review across concerns |
|
| Divergent exploration then convergence |
|
Full reference with examples: Prompts docs
Development
npm run dev # Development with watch mode
npm test # Run all tests
npm run lint # ESLint
npm run typecheck # Type check without emitDocumentation
Topic | Link |
Setup guide (all tools) | |
Full configuration reference | |
Claude Desktop setup | |
All tools with schemas | |
Prompt templates | |
CLI coding agents | |
MCP Bridge | |
Guardrails | |
Docker deployment | |
Provider-specific setup | |
Usage examples | |
Architecture | |
Roadmap |
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_retriesandtimeoutsettingsSee 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 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-duckGlama 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!
Available Tools
12 toolsask_duckAsk a DuckCRead-only
Ask a question to a specific LLM provider (duck)
Inputs: prompt (required), model, images, provider, +1 more.
chat_with_duckChat with a DuckA
Have a conversation with a duck, maintaining context across messages
Inputs: message (required), conversation_id (required), model, images, +1 more.
clear_conversationsClear ConversationsADestructiveIdempotent
Clear all conversation history and start fresh
Inputs: no named parameters.
compare_ducksCompare DucksBRead-only
Ask the same question to multiple ducks simultaneously
Inputs: prompt (required), model, images, providers. Returns: responses
duck_councilDuck CouncilCRead-only
Get responses from all configured ducks (like a panel discussion)
Inputs: prompt (required), model, images.
duck_debateDuck DebateBRead-only
Structured multi-round debate between ducks. Supports oxford (pro/con), socratic (questioning), and adversarial (attack/defend) formats.
Inputs: format (required), prompt (required), rounds, providers, +1 more. Returns: topic, format, rounds, synthesis, +3 more
duck_iterateDuck IterationBRead-only
Iteratively refine a response between two ducks. One generates, the other critiques/improves, alternating for multiple rounds.
Inputs: mode (required), prompt (required), providers (required), iterations.
duck_judgeDuck JudgeARead-only
Have one duck evaluate and rank other ducks' responses. Use after duck_council to get a comparative evaluation.
Inputs: responses (required), judge, persona, criteria.
duck_voteDuck VoteBRead-only
Have multiple ducks vote on options with reasoning. Returns vote tally, confidence scores, and consensus level.
Inputs: options (required), question (required), voters, require_reasoning. Returns: isTie, tally, votes, winner, +6 more
get_usage_statsUsage StatisticsARead-only
Get usage statistics for a time period. Shows token counts and costs (when pricing configured).
Inputs: period. Returns: usage, period, totals, endDate, +2 more
list_ducksList DucksBRead-only
List all available LLM providers (ducks) and their status
Inputs: check_health.
list_modelsList ModelsBRead-only
List available models for LLM providers
Inputs: provider, fetch_latest.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target distinct actions, but compare_ducks and duck_council both send the same question to multiple providers and could be confused. The orchestration tools duck_vote, duck_judge, duck_iterate, and duck_debate are differentiated by their descriptions, though the boundaries remain somewhat subtle.
About half the tools follow a clear verb_noun pattern (list_ducks, ask_duck, chat_with_duck, compare_ducks, get_usage_stats), while the multi-duck orchestration tools use duck_<verb> nouns (duck_council, duck_vote, duck_judge, duck_iterate, duck_debate). The duck-themed naming is readable but the two conventions are mixed.
The 12 tools are well within the appropriate range for a multi-provider LLM orchestration server. Each tool appears to cover a distinct workflow such as listing, chatting, comparing, voting, judging, iterating, debating, or usage reporting.
The surface covers provider/model listing, one-shot and contextual chat, several multi-duck orchestration modes, conversation clearing, and usage statistics. Minor gaps exist around managing individual conversations or configuring provider/model selection per request, but core workflows are covered.
Maintenance
Related MCP Connectors
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
Hosted MCP server to manage a restaurant menu from AI agents - 39 tools over the DuckHub API.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceThis MCP server utilizes DuckDuckGo for web searches, providing structured search results with metadata and features like smart content classification and language detection, facilitating easy integration with AI clients supporting the MCP protocol.159 npm2MIT
- AlicenseBqualityDmaintenanceAn MCP server that provides LLMs access to other LLMs449 npm82MIT
- AlicenseBqualityDmaintenanceAn MCP server that queries multiple Ollama models and combines their responses, providing diverse AI perspectives on a single question for more comprehensive answers.289MIT
- FlicenseBqualityDmaintenanceA lightweight MCP server that provides a unified interface to various LLM providers including OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama.6736-