PluginBench
MCP Server
Active
MIT

io.github.nesquikm/rubber-duck MCP Server

io.github.nesquikm/rubber-duck

Query multiple LLMs simultaneously—OpenAI-compatible APIs and CLI agents—for diverse perspectives, voting, debates, and consensus.

What is the io.github.nesquikm/rubber-duck MCP server?

The Rubber Duck MCP server is a bridge that lets you query multiple LLMs—both OpenAI-compatible HTTP APIs and CLI coding agents—simultaneously from a single interface. It implements rubber duck debugging at scale, letting you ask questions to different AI "ducks" and compare their perspectives, vote on answers, run structured debates, and achieve consensus.

Rubber Duck acts as a multi-LLM orchestration layer. Configure any number of OpenAI-compatible providers (OpenAI, Gemini, Groq, Ollama, etc.) and CLI agents (Claude Code, Aider, Grok, etc.), then use tools to query them individually, compare responses, run voting and debate formats, and track usage across providers. It's designed for scenarios where you want diverse AI perspectives—code review, brainstorming, risk analysis, decision-making—without switching between tools.

How to install io.github.nesquikm/rubber-duck

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • OPENAI_API_KEY
    secret

    OpenAI API key (starts with sk-)

  • GEMINI_API_KEY
    secret

    Google Gemini API key

  • GROQ_API_KEY
    secret

    Groq API key (starts with gsk_)

  • DEFAULT_PROVIDER

    Default LLM provider to use

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "rubber-duck": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-rubber-duck"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
        "GROQ_API_KEY": "<YOUR_GROQ_API_KEY>",
        "DEFAULT_PROVIDER": "<YOUR_DEFAULT_PROVIDER>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • ask_duck — Ask a single question to a specific LLM provider
  • chat_with_duck — Maintain conversation context across multiple messages with a provider
  • clear_conversations — Clear all conversation history
  • list_ducks — List configured providers and their health status
  • list_models — List available models for each provider
  • compare_ducks — Ask the same question to multiple providers and compare responses
  • duck_council — Get responses from all configured ducks simultaneously
  • get_usage_stats — Track requests, tokens, and estimated costs per provider
  • duck_vote — Multi-duck voting on options with reasoning and confidence scores
  • duck_judge — Have one duck evaluate and rank other ducks' responses
  • duck_iterate — Iteratively refine a response between two ducks
  • duck_debate — Structured multi-round debate between ducks (Oxford, Socratic, adversarial formats)
  • mcp_status — Check MCP Bridge status and connected servers
  • get_pending_approvals — View pending MCP tool approval requests
  • approve_mcp_request — Approve or deny a duck's MCP tool request

Use cases

  • Compare code reviews or architectural decisions across multiple LLMs to identify blind spots and tradeoffs
  • Run multi-duck voting or debate to reach consensus on complex problems or design choices
  • Orchestrate CLI coding agents (Claude Code, Aider) alongside cloud LLMs for collaborative problem-solving
  • Track token usage and costs across multiple providers to optimize spend and performance
  • Use vision-capable models to analyze images alongside text prompts for richer context

io.github.nesquikm/rubber-duck MCP server FAQ

What is the Rubber Duck MCP server?

It's an MCP server that bridges your AI client (Claude, Cursor, etc.) to multiple LLMs—both OpenAI-compatible APIs and CLI agents. You can query them individually, compare responses, run voting/debates, and get consensus, all from one interface.

Is it free?

The server itself is free and open-source (MIT license). You pay only for the LLM APIs you use (OpenAI, Gemini, Groq, etc.). CLI agents like Claude Code or Aider may have their own licensing.

How do I install it in Claude Desktop or Cursor?

Install via npm: `npm install -g mcp-rubber-duck`. Then add it to your client's MCP config (Claude Desktop config.json or Cursor settings). See docs/setup.md for step-by-step instructions for each tool.

What API keys do I need?

At least one: an API key for an OpenAI-compatible provider (OpenAI, Gemini, Groq, etc.) OR a CLI agent installed locally (Claude Code, Aider, etc.). You can configure multiple providers and switch between them.

Can I use it with local models?

Yes. You can use Ollama, LM Studio, or any OpenAI-compatible endpoint. You can also use CLI agents like Aider or local Claude Code installations.

Does it support vision/image input?

Yes. You can send images alongside prompts to vision-capable models. See docs/tools.md#vision-input for details.

README (reference)

Source of truth, from the repository.

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

<p align="center"> <img src="assets/mcp-rubber-duck.jpg" alt="MCP Rubber Duck - AI ducks helping debug code" width="600"> </p>

Why direct provider integration? MCP's sampling primitive -- 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 -- outputSchema on 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-28 spec recommends now that server-side sampling is 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)
  • Anyscale, 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:

VariableDescription
OPENAI_API_KEYOpenAI API key
GEMINI_API_KEYGoogle Gemini API key
GROQ_API_KEYGroq API key
DEFAULT_PROVIDERDefault provider (e.g., openai)
DEFAULT_TEMPERATUREDefault temperature (e.g., 0.7)
LOG_LEVELdebug, info, warn, error
MCP_SERVERSet to true for MCP server mode
MCP_BRIDGE_ENABLEDEnable MCP Bridge (ducks access external MCP servers)
CUSTOM_{NAME}_*Custom HTTP providers
CLI_{AGENT}_ENABLEDEnable CLI agents (CLAUDE, CODEX, GEMINI, GROK, AIDER)

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.

<p align="center"> <img src="assets/ext-apps-compare.png" alt="Compare Ducks interactive UI" width="600"> </p>

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.

<p align="center"> <img src="assets/ext-apps-vote.png" alt="Duck Vote interactive UI" width="600"> </p>

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.

<p align="center"> <img src="assets/ext-apps-debate.png" alt="Duck Debate interactive UI" width="600"> </p>

Usage Stats

Usage analytics with summary cards, provider breakdown with expandable rows, token distribution bars, and estimated costs.

<p align="center"> <img src="assets/ext-apps-usage-stats.png" alt="Usage Stats interactive UI" width="600"> </p>

Available Tools

ToolDescription
ask_duckAsk a single question to a specific LLM provider
chat_with_duckConversation with context maintained across messages
clear_conversationsClear all conversation history
list_ducksList configured providers and health status
list_modelsList available models for providers
compare_ducksAsk the same question to multiple providers simultaneously
duck_councilGet responses from all configured ducks
get_usage_statsUsage statistics and estimated costs
duck_voteMulti-duck voting with reasoning and confidence
duck_judgeHave one duck evaluate and rank others' responses
duck_iterateIteratively refine a response between two ducks
duck_debateStructured multi-round debate between ducks
mcp_statusMCP Bridge status and connected servers
get_pending_approvalsPending MCP tool approval requests
approve_mcp_requestApprove or deny a duck's MCP tool request

Full reference with input schemas: Tools docs

Available Prompts

PromptPurposeRequired Arguments
perspectivesMulti-angle analysis with assigned lensesproblem, perspectives
assumptionsSurface hidden assumptions in plansplan
blindspotsHunt for overlooked risks and gapsproposal
tradeoffsStructured option comparisonoptions, criteria
red_teamSecurity/risk analysis from multiple anglestarget
reframeProblem reframing at different levelsproblem
architectureDesign review across concernsdesign, workloads, priorities
diverge_convergeDivergent exploration then convergencechallenge

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 emit

Documentation

TopicLink
Setup guide (all tools)docs/setup.md
Full configuration referencedocs/configuration.md
Claude Desktop setupdocs/claude-desktop.md
All tools with schemasdocs/tools.md
Prompt templatesdocs/prompts.md
CLI coding agentsdocs/cli-providers.md
MCP Bridgedocs/mcp-bridge.md
Guardrailsdocs/guardrails.md
Docker deploymentdocs/docker.md
Provider-specific setupdocs/provider-setup.md
Usage examplesdocs/usage-examples.md
Architecturedocs/architecture.md
Roadmapdocs/roadmap.md

Troubleshooting

Provider Not Working

  1. Check API key is correctly set
  2. Verify endpoint URL is correct
  3. Run health check: list_ducks({ check_health: true })
  4. Check logs for detailed error messages

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_retries and timeout settings
  • 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:

  1. Fork the repository
  2. Create a feature branch
  3. Follow our conventional commit guidelines
  4. Add tests for new functionality
  5. 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

Support


Happy Debugging with your AI Duck Panel!

Related MCP servers

NENetallion MCP Lite logo

Local secret & credential checks for AI-assisted dev — runs on your machine, results redacted.

0
Python
MIT
View repository →

Auto-route AI requests to 13 models (Claude, GPT, Gemini, Qwen, DeepSeek). 57% cost savings.

View repository →
NENetdata logo

Netdata

Active

Real-time infrastructure monitoring with per-second metrics, logs, alerts, and ML-powered anomaly detection.

80k
Go
GPL-3.0
View repository →
SQSQL MCP Server logo

SQL MCP Server

Maintained

Controlled SQL access gateway with policy, cost limits, tenant isolation, and safe tools.

0
Go
MIT
View repository →

MCP server for the Netify Reseller Programme: eligibility, commission, application URL builder.

0
MIT
View repository →

Search, play, and control Stremio on Android TV over native ADB.

5
Python
MIT
View repository →