Multi-model AI analysis for Claude - get second opinions from DeepSeek, Kimi, and OpenRouter
Project description
Second Opinion MCP
Get second opinions from multiple AI models while using Claude. Break the single-model echo chamber by consulting DeepSeek Reasoner, Kimi K2.5 (Moonshot), and 300+ OpenRouter models.
What It Does
When working with Claude Code or Claude Desktop, this MCP server lets you:
- Get alternative perspectives on code, architecture, and decisions
- Run systematic code reviews with severity-classified issues
- Stage multi-model debates where AI models argue opposing positions
- Challenge proposals with anti-sycophancy mode (finds weaknesses, not validation)
Quickstart
1. Install
Windows
# Install Python 3.10+ from python.org if not installed
# Then install pipx
pip install pipx
pipx ensurepath
# Restart your terminal, then install
pipx install second-opinion-mcp
macOS
# Install Python 3.10+ via Homebrew if not installed
brew install python@3.12
# Install pipx
pip3 install pipx
pipx ensurepath
# Restart your terminal, then install
pipx install second-opinion-mcp
Linux (Ubuntu/Debian)
# Install Python and pipx
sudo apt update
sudo apt install python3 python3-pip python3-venv
pip3 install pipx
pipx ensurepath
# Restart your terminal, then install
pipx install second-opinion-mcp
Linux (Fedora/RHEL)
sudo dnf install python3 python3-pip
pip3 install pipx
pipx ensurepath
# Restart your terminal, then install
pipx install second-opinion-mcp
2. Setup
Run the interactive setup wizard:
second-opinion-mcp setup
The wizard will guide you through selecting providers and entering API keys. Keys are stored securely in your system's credential manager.
After setup completes, see Client Integration below for instructions specific to your MCP client.
Client Integration
After running the setup wizard, register the MCP server with your client.
Claude Code CLI
Register the server:
claude mcp add -s user second-opinion -e SECOND_OPINION_PROVIDERS="deepseek,moonshot" -- second-opinion-mcp
Restart Claude Code after registering.
Verify the server is registered:
claude mcp list | grep second-opinion
Claude Desktop App
Add to your claude_desktop_config.json:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"second-opinion": {
"command": "second-opinion-mcp",
"env": {
"SECOND_OPINION_PROVIDERS": "deepseek,moonshot"
}
}
}
}
Restart Claude Desktop after saving. To verify, start a new conversation and check that the second-opinion tools appear in the available tools list.
OpenClaw
OpenClaw uses mcporter for MCP server integration.
Step 1: Run the setup wizard
second-opinion-mcp setup
This stores your API keys in ~/.second-opinion-config:
{
"credentials": {
"deepseek": "sk-...",
"moonshot": "sk-..."
}
}
Step 2: Install mcporter
npm install -g mcporter
Step 3: Add to mcporter config
Create or edit ~/.mcporter/mcporter.json:
{
"mcpServers": {
"second-opinion": {
"command": "second-opinion-mcp",
"env": {
"SECOND_OPINION_PROVIDERS": "deepseek,moonshot",
"SECOND_OPINION_ALLOWED_ROOTS": "/opt/openclaw"
}
}
}
}
Note: API keys are NOT in mcporter config. They stay in ~/.second-opinion-config, separate from server registration.
Step 4: Verify
mcporter list
mcporter tools second-opinion
OpenClaw automatically discovers servers configured in mcporter.
Other MCP Clients
For other MCP-compatible clients, the server requires:
- Command:
second-opinion-mcp - Environment variable:
SECOND_OPINION_PROVIDERS=deepseek,moonshot
Refer to your client's documentation for how to add stdio-based MCP servers.
Supported Models
DeepSeek V3.2 (Recommended)
Chain-of-thought reasoning model. Best for code reviews and complex analysis.
- Get your API key at https://platform.deepseek.com
- Pricing: ~$0.28/$0.42 per million tokens (input/output)
Kimi K2.5 (Moonshot)
Chinese AI model with thinking mode. Good for alternative perspectives and debates.
- Get your API key at https://platform.moonshot.ai
- Supports 256K context window
OpenRouter (Optional)
Access 300+ models through a single API. Enable for variety or specific model access.
- Get your API key at https://openrouter.ai/keys
Available Tools
second_opinion
Get a straightforward second opinion on any question, code, or decision.
Use second_opinion to review this database schema: [paste schema]
challenge
Anti-sycophancy mode. The model is instructed to find weaknesses, not validate.
Use challenge to critique: "We should use a global singleton for database connections"
code_review
Systematic directory-based code review with BLOCKER/CRITICAL/MAJOR/MINOR classifications.
Use code_review on directory="./src" with focus_areas=["security", "performance"]
consensus
Multi-model debate where DeepSeek and Moonshot argue opposing positions, then synthesize.
Use consensus to debate: "GraphQL vs REST for internal microservices"
review_synthesis
Full workflow: parallel reviews from both models, debate, then synthesis instructions.
Perform a comprehensive code review of ./myproject using review_synthesis
Usage Examples
Thorough Code Review Workflow
For comprehensive code reviews, use this prompt pattern with Claude Code:
MyProject: perform a comprehensive deep parallel code review with deepseek and kimi
using mcp server second-opinion - save resulting md files to the project folder
to the docs subfolder in md format.
After that perform Consensus debate + arbiter synthesis using same mcp server tools
with opus 4.5 compiling a final document for the final review.
First 2 tasks can be run in parallel.
This triggers parallel code_review calls to DeepSeek and Moonshot, then a consensus debate on findings, and finally Claude synthesizes the final review document.
Quick Second Opinion
Use second_opinion to review this database schema:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255),
password VARCHAR(255)
);
Critical Challenge
Use challenge to critique this proposal: "We should use a global singleton for
database connections because it's simpler"
Consensus Debate
Use consensus to debate: "GraphQL vs REST for our internal microservices API"
Code Review with Focus Areas
Use code_review on directory="./src" with focus_areas=["security", "error-handling"]
and save_to="./docs/reviews"
Configuration
Changing Providers
To reconfigure which providers are enabled, run the setup wizard again:
second-opinion-mcp setup
Or re-register the server with different providers:
# Only DeepSeek
claude mcp add -s user second-opinion -e SECOND_OPINION_PROVIDERS="deepseek" -- second-opinion-mcp
# Only Moonshot
claude mcp add -s user second-opinion -e SECOND_OPINION_PROVIDERS="moonshot" -- second-opinion-mcp
# All providers
claude mcp add -s user second-opinion -e SECOND_OPINION_PROVIDERS="deepseek,moonshot,openrouter" -- second-opinion-mcp
API Key Management
Credentials are stored using platform-appropriate storage:
| Platform | Storage Location |
|---|---|
| Windows | Windows Credential Manager |
| macOS (GUI) | macOS Keychain |
| macOS (headless/SSH) | ~/.second-opinion-config |
| Linux | ~/.second-opinion-config |
On Linux and headless macOS, credentials are stored in ~/.second-opinion-config with SSH-style permissions (600). This is the same security model used by SSH private keys.
To update keys:
second-opinion-mcp setup
Or manually edit ~/.second-opinion-config (Linux/macOS headless):
{
"credentials": {
"deepseek": "sk-YOUR_DEEPSEEK_KEY",
"moonshot": "YOUR_MOONSHOT_KEY",
"openrouter": "sk-or-YOUR_OPENROUTER_KEY"
}
}
Then set permissions: chmod 600 ~/.second-opinion-config
Troubleshooting
"No API key configured" Error
Run the setup wizard again:
second-opinion-mcp setup
Connection Timeout
Check firewall, VPN, or proxy settings. Both DeepSeek (api.deepseek.com) and Moonshot (api.moonshot.ai) must be accessible.
Rate Limit Exceeded
Moonshot has rate limits (3 concurrent, 20 RPM at Tier 0). Wait a minute and retry, or use fast mode for non-critical queries.
Tool Not Found in Claude
Verify registration:
claude mcp list
If not listed, re-register:
claude mcp add -s user second-opinion -e SECOND_OPINION_PROVIDERS="deepseek,moonshot" -- second-opinion-mcp
Advanced Usage
Fast Mode
Skip the thinking/reasoning phase for quicker responses:
Use second_opinion with fast=true to check: is this regex correct?
Note: Code reviews always use full thinking mode regardless of this setting.
Include Reasoning
See the model's chain-of-thought:
Use second_opinion with include_reasoning=true to analyze this algorithm
Focus Areas for Reviews
Use code_review with focus_areas=["security", "error-handling", "performance"]
Save Review Output
Use code_review on directory="./src" with save_to="./docs/reviews"
Updating
The server checks for updates on startup and notifies you if a new version is available.
To update manually:
pipx upgrade second-opinion-mcp
Or reinstall:
pipx uninstall second-opinion-mcp
pipx install second-opinion-mcp
Your API keys are preserved in the system keyring across updates.
Uninstalling
# Remove from Claude
claude mcp remove second-opinion
# Optional: remove stored API keys BEFORE uninstalling (requires pipx venv Python)
SOPYTHON=~/.local/share/pipx/venvs/second-opinion-mcp/bin/python3
$SOPYTHON -c "import keyring; keyring.delete_password('second-opinion', 'deepseek')"
$SOPYTHON -c "import keyring; keyring.delete_password('second-opinion', 'moonshot')"
$SOPYTHON -c "import keyring; keyring.delete_password('second-opinion', 'openrouter')"
# Uninstall package
pipx uninstall second-opinion-mcp
Security
API keys are stored in your OS keyring, not in environment variables or config files. The code review tool:
- Skips
.envfiles, credentials, SSH keys, and certificates - Validates directories against allowed roots
- Detects symlinks to prevent traversal attacks
- Limits content size to prevent memory exhaustion
Cost Estimates
Per operation (typical usage):
| Tool | Approximate Cost |
|---|---|
| second_opinion / challenge | ~$0.001 |
| code_review | ~$0.01-0.05 |
| consensus (2 rounds) | ~$0.004-0.010 |
| review_synthesis | ~$0.02-0.10 |
License
MIT License. See LICENSE file.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file second_opinion_mcp-0.4.1.tar.gz.
File metadata
- Download URL: second_opinion_mcp-0.4.1.tar.gz
- Upload date:
- Size: 37.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e50b8c3027997147565980390edfcdc63f7899c66d669435d16eebebab15588c
|
|
| MD5 |
5c0aadcf449a33aaac487d13cbcde50a
|
|
| BLAKE2b-256 |
f0abbb1c1edc7805384dab1e604324a6e485202621a84ffb8ee1697d44648c26
|
Provenance
The following attestation bundles were made for second_opinion_mcp-0.4.1.tar.gz:
Publisher:
publish.yml on MarvinFS/second-opinion-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
second_opinion_mcp-0.4.1.tar.gz -
Subject digest:
e50b8c3027997147565980390edfcdc63f7899c66d669435d16eebebab15588c - Sigstore transparency entry: 914219284
- Sigstore integration time:
-
Permalink:
MarvinFS/second-opinion-mcp@dc4f4dde4fdb62e03c8ce783f6f1fe61ca2e9f74 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/MarvinFS
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dc4f4dde4fdb62e03c8ce783f6f1fe61ca2e9f74 -
Trigger Event:
release
-
Statement type:
File details
Details for the file second_opinion_mcp-0.4.1-py3-none-any.whl.
File metadata
- Download URL: second_opinion_mcp-0.4.1-py3-none-any.whl
- Upload date:
- Size: 33.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e7961b1878d78c7d7bc682a6f25b44cd05784f05316f61a554f503914307edd
|
|
| MD5 |
f906dec8658a1ced2c30e64177d368fd
|
|
| BLAKE2b-256 |
36a633353180e1cb9762556f65f2f8ca34558f9f21c259fc10ef0da055658433
|
Provenance
The following attestation bundles were made for second_opinion_mcp-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on MarvinFS/second-opinion-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
second_opinion_mcp-0.4.1-py3-none-any.whl -
Subject digest:
8e7961b1878d78c7d7bc682a6f25b44cd05784f05316f61a554f503914307edd - Sigstore transparency entry: 914219410
- Sigstore integration time:
-
Permalink:
MarvinFS/second-opinion-mcp@dc4f4dde4fdb62e03c8ce783f6f1fe61ca2e9f74 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/MarvinFS
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dc4f4dde4fdb62e03c8ce783f6f1fe61ca2e9f74 -
Trigger Event:
release
-
Statement type: