This is Part 4 of the MCP Rubber Duck series. New here? Start with Part 1: Stop Copy-Pasting Between AI Tabs.
The Problem
You're paying $20/month for Claude Pro. Another $20 for ChatGPT Plus. Maybe $20 more for Gemini Advanced. And then MCP Rubber Duck comes along and says "great, now give me your API keys so I can charge you per token on top of all that."
That's... not ideal.
Here's what was happening:
Your wallet:
├── Claude Pro $20/mo ← subscription
├── ChatGPT Plus $20/mo ← subscription
├── Gemini Advanced $20/mo ← subscription
├── OpenAI API tokens $$$ ← per-token ON TOP of subscription
├── Gemini API tokens $$$ ← per-token ON TOP of subscription
└── Anthropic API? ❌ ← blocked for third-party SDK usage entirely
Anthropic specifically blocks subscription credentials from being used with their SDK. So even if you wanted to route your Claude Pro subscription through MCP Rubber Duck — you couldn't.
Meanwhile, you've got Claude Code, Codex, and Gemini CLI sitting right there on your machine, already authenticated with your subscriptions.
Me: "Hey Claude, review this error handling"
Claude (API): "That'll be $0.003 in tokens please"
Me: "But I'm already paying $20/mo for you"
Claude (API): "That's a different me. This is the API me."
Me: "..."
The Solution: CLI Ducks 🦆
Instead of making HTTP calls to API endpoints, MCP Rubber Duck now spawns CLI tools as subprocesses and parses their output. Your existing subscription auth applies transparently. No API keys. No per-token charges.
Before (API ducks only):
You → OpenAI API → $$$ per token
You → Gemini API → $$$ per token
You → Anthropic API → ❌ blocked entirely
After (CLI ducks):
You → spawns `claude -p "..."` → $0 (subscription)
You → spawns `codex exec "..."` → $0 (subscription)
You → spawns `gemini -p "..."` → $0 (free tier)
Notice that last line in "Before." With API ducks, you literally could not use Claude as a duck — Anthropic blocks third-party SDK access to subscription credentials. CLI ducks don't just save money. For Claude, they're the only way in.
One env var per duck:
CLI_CLAUDE_ENABLED=true # Claude Code
CLI_CODEX_ENABLED=true # OpenAI Codex
CLI_GEMINI_ENABLED=true # Gemini CLI
CLI_GROK_ENABLED=true # Grok
CLI_AIDER_ENABLED=true # Aider
That's it. If the CLI tool is installed and authenticated, it works.
What's Under the Hood
Each CLI has its own output format and quirks. MCP Rubber Duck handles all of them:
| CLI | Command | Output Format | How It Works |
|---|---|---|---|
| Claude Code | claude -p "..." --output-format json |
JSON | JSONPath extraction from $.result
|
| Codex | codex exec --json "..." |
JSONL | Event stream parsing |
| Gemini CLI | gemini -p "..." --output-format json |
JSON | JSONPath extraction from $.response
|
| Grok | grok -p "..." |
Plain text | Direct text capture |
| Aider | aider --message "..." --yes |
Plain text | Direct text capture |
Each preset is preconfigured with the right flags, output parsers, and timeouts. You can override the essentials:
# Use a specific model
CLI_CLAUDE_DEFAULT_MODEL=claude-sonnet-4-5-20250929
# Custom system prompt
CLI_GEMINI_SYSTEM_PROMPT=Be concise and technical
# Override CLI arguments (comma-separated)
CLI_CLAUDE_CLI_ARGS=--output-format,json,--max-turns,5
Custom CLI Providers
Got a CLI tool that accepts prompts? It's a duck now:
CLI_CUSTOM_MYTOOL_COMMAND=my-ai-tool
CLI_CUSTOM_MYTOOL_PROMPT_DELIVERY=flag
CLI_CUSTOM_MYTOOL_PROMPT_FLAG=--ask
CLI_CUSTOM_MYTOOL_OUTPUT_FORMAT=text
Three prompt delivery modes:
-
flag —
tool --flag "prompt"(Claude, Gemini, Grok, Aider) -
positional —
tool "prompt"(Codex) - stdin — pipe prompt to stdin
Three output formats:
- json — parse with JSONPath
- jsonl — parse event stream
- text — take the raw output
Mixed Councils: The Best of Both Worlds
Here's where it gets interesting. You can mix API ducks and CLI ducks in the same council:
Duck Council for "Should I use Redis or PostgreSQL for caching?"
🦆 GPT-4 (API) → HTTP call, $0.003 tokens
🦆 Claude Code (CLI) → subprocess, $0 (subscription)
🦆 Gemini CLI (CLI) → subprocess, $0 (subscription)
🦆 Groq (API) → HTTP call, $0.0001 tokens
Four perspectives. Two of them free. The API ducks give you access to specific models and MCP Bridge tools. The CLI ducks leverage your subscriptions.
⚠️ The Trade-Offs (Yes, Plural)
Free ducks come with strings attached. I'll be honest about all of them.
1. They're Slower
CLI ducks spawn an entire coding agent as a subprocess. That means startup time, authentication, and parsing overhead. An API duck gets you an answer in 1–3 seconds. A CLI duck takes 5–30 seconds depending on the agent and prompt complexity.
Me: "Quick, is this SQL injection-safe?"
API duck (Groq): "No. Here's why." [1.2 seconds]
CLI duck (Claude Code): [spawning subprocess...]
CLI duck: [authenticating...]
CLI duck: "No. Here's why, plus I refactored it for you." [18 seconds]
Me: "I just wanted a yes or no"
For duck_council and duck_vote this matters less — all ducks run in parallel, so you wait for the slowest one. But for quick ask_duck calls, API ducks are significantly snappier.
2. No Unified MCP Tools
This is the biggest one. CLI ducks cannot use MCP tools configured through MCP Bridge.
Important: this isn't a Rubber Duck limitation — it's how CLI agents work. Claude Code, Codex, and Gemini CLI are full-blown coding agents with their own native tool systems (Bash, Edit, Read, Write, file search). They run in isolated subprocesses. You can't inject MCP tools into them from the outside — their architectures simply don't support it.
API ducks use the OpenAI SDK, so MCP Rubber Duck injects tool definitions into the API call, and the model calls them. Simple. CLI ducks don't have that injection point.
What this means in practice:
| API Ducks (HTTP) | CLI Ducks (subprocess) | |
|---|---|---|
| MCP Bridge tools | ✅ fetch, search, Context7, etc. | ❌ Not supported |
| Speed | Fast (1–3s) | Slower (5–30s) |
| Cost | Per-token | Subscription (free*) |
| Tool access | Unified via Bridge | Agent's native tools only |
| Best for | Tool-heavy research | Quick opinions, code review |
3. You Configure Tools Per Agent
Since CLI ducks can't use MCP Bridge, if you want them to have tool access, you configure MCP servers in each CLI agent's native config separately:
# Codex
codex mcp add context7 --url https://mcp.context7.com/mcp
# Gemini CLI
gemini mcp add context7 https://mcp.context7.com/mcp -t http -s user --trust
# Claude Code — add to ~/.claude.json mcpServers section
Not as seamless as the unified bridge — you're managing N tool configs instead of one. But it works, and each CLI agent is capable of handling its own MCP connections.
Me: "Why can't you use Context7 like the API ducks?"
Claude Code duck: "I have Bash, Read, Write, Edit, and
WebSearch. I don't need your tools. I AM the tool."
Me: "Fair enough"
When to Use What
Use CLI ducks when:
- You want quick second opinions without API costs
- You're doing code review or architecture discussions
- You already have CLI agents installed and authenticated
- You're running
duck_councilorduck_voteand want more voices cheaply
Use API ducks when:
- You need MCP Bridge tools (web search, docs, databases)
- You need speed — API ducks respond in 1–3 seconds vs 5–30 for CLI
- You need specific model versions (gpt-4o-mini, gemini-2.0-flash)
- You're using
duck_iteratewith tool-heavy workflows
Mix both when:
- You want diversity of perspectives without breaking the bank
- Some questions need tools, others just need opinions
- You're building a cost-efficient multi-agent pipeline
Quick Start
- Install the CLI agents you want to use:
# Claude Code (if you have Claude Pro/Max)
npm install -g @anthropic-ai/claude-code
# Codex (if you have ChatGPT Plus/Pro)
npm install -g @openai/codex
# Gemini CLI (free tier available)
npm install -g @google/gemini-cli
- Enable them in your
.env:
CLI_CLAUDE_ENABLED=true
CLI_CODEX_ENABLED=true
CLI_GEMINI_ENABLED=true
- Ask your ducks:
> ask_duck: "Should I use a monorepo or polyrepo for this project?"
🦆 Claude Code: [detailed analysis from your Claude Pro subscription]
🦆 Codex: [different perspective from your ChatGPT subscription]
🦆 Gemini: [third angle from Gemini, possibly free tier]
No API keys entered. No tokens charged. Just your existing subscriptions doing double duty.
The Cost Math
Let's say you run 20 duck councils per day, each with 3 ducks:
Before (all API ducks):
- ~60 API calls/day × ~2000 tokens avg × $0.003/1K = ~$0.36/day
- ~$11/month in API costs (on top of subscriptions)
After (2 CLI + 1 API duck per council):
- ~20 API calls/day × ~2000 tokens avg × $0.003/1K = ~$0.12/day
- ~$3.60/month in API costs
- ~$7.40/month saved — and you're getting the same number of perspectives
The subscriptions you're already paying for become productive instead of sitting idle while you use API keys.
🦆 GitHub: mcp-rubber-duck — CLI ducks shipped in v1.14.0
P.S. — My Claude Pro subscription used to just sit there while I fed API tokens to the ducks. Now it's pulling double shifts. The subscription didn't sign up for this.

Top comments (0)