MCP Setup
Add 2ndOpinion as an MCP server to get all 10 tools natively inside your AI assistant.
Claude Code
Run this command in your terminal:
claude mcp add 2ndopinion -- npx -y 2ndopinion-cli mcp
Restart Claude Code after adding. Tools will appear automatically.
Claude Desktop
Open Settings → Developer → Edit Config, then add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"2ndopinion": {
"command": "npx",
"args": ["-y", "2ndopinion-cli", "mcp"],
"env": {
"SECONDOPINION_API_KEY": "sk_2op_YOUR_KEY"
}
}
}
}Fully quit and restart Claude Desktop after saving.
Codex (OpenAI)
The Codex desktop app, CLI, and VS Code extension all share the same config. Set up once and it works everywhere.
Option A: CLI command
codex mcp add 2ndopinion -- npx -y 2ndopinion-cli mcp
Option B: Edit config file
Add to ~/.codex/config.toml (TOML format, not JSON):
[mcp_servers.2ndopinion] command = "npx" args = ["-y", "2ndopinion-cli", "mcp"] [mcp_servers.2ndopinion.env] SECONDOPINION_API_KEY = "sk_2op_YOUR_KEY"
Option C: Desktop app UI
Open the Codex app → Settings (⌘,) → Integrations & MCP → add a custom server.
Note: The section header must be mcp_servers (with underscore). Using mcp-servers will silently fail. The Codex desktop app is currently macOS only (Apple Silicon). On Windows, use the CLI or VS Code extension.
VS Code + GitHub Copilot
Requires VS Code 1.99+ and GitHub Copilot. Add to .vscode/mcp.json in your project:
{
"servers": {
"2ndopinion": {
"type": "stdio",
"command": "npx",
"args": ["-y", "2ndopinion-cli", "mcp"],
"env": {
"SECONDOPINION_API_KEY": "sk_2op_YOUR_KEY"
}
}
}
}Switch to Agent mode in Copilot Chat to use MCP tools. The key is servers (not mcpServers).
Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"2ndopinion": {
"command": "npx",
"args": ["-y", "2ndopinion-cli", "mcp"],
"env": {
"SECONDOPINION_API_KEY": "sk_2op_YOUR_KEY"
}
}
}
}Paste your API key for instant setup, or omit the env block and run 2ndopinion login for JWT auth.
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"2ndopinion": {
"command": "npx",
"args": ["-y", "2ndopinion-cli", "mcp"],
"env": {
"SECONDOPINION_API_KEY": "sk_2op_YOUR_KEY"
}
}
}
}Paste your API key for instant setup, or omit the env block and run 2ndopinion login for JWT auth.
Generic (stdio)
For any other MCP-compatible client, use this JSON config:
{
"mcpServers": {
"2ndopinion": {
"command": "npx",
"args": ["-y", "2ndopinion-cli", "mcp"],
"env": {
"SECONDOPINION_API_KEY": "sk_2op_YOUR_KEY"
}
}
}
}Windows users
Use npx.cmd instead of npx on Windows for Claude Desktop, Cursor, Windsurf, and VS Code configs. Node.js 18+ is required.
"command": "npx.cmd"
Authentication
Set your API key as an environment variable so the MCP server can authenticate:
export SECONDOPINION_API_KEY="sk_2op_YOUR_KEY"
Or pass it in the MCP config env block (shown in each example above). Create API keys in the dashboard.
How to Use
Once the MCP server is connected, your AI assistant discovers all 10 tools automatically. No special syntax needed — just ask in plain language. Here are example prompts you can try:
“Get a second opinion on my staged changes”
Your AI reads the current git diff and sends it to a different model for review.
“Review this diff and tell me if it's safe to merge”
Returns an accept/review/reject verdict with specific risks flagged.
“Ask Gemini if this SQL query is vulnerable to injection”
Route a question to any model — Claude, Codex, or Gemini.
“Explain my recent changes to a non-technical manager”
Plain-language summary for any audience: technical, non-technical, or manager.
“Check how many credits I have left this month”
Shows your usage, limits, tier, and which tools you have access to.
“Generate Jest tests for the changes I just made”
Creates a test suite targeting your diff with framework auto-detection.
“Run a consensus review — have all three models review my changes”
Claude, Codex, and Gemini independently analyze the diff. Agreements and disagreements are surfaced.
“Hunt for bugs in my latest changes using all three models”
All 3 models search for bugs independently, results are deduplicated with confidence scores.
“Run a security audit on my changes”
OWASP-based security scan with CWE references and remediation advice.
“Have Claude and Codex debate whether this approach is correct”
Two models argue back and forth for multiple rounds, then reach a consensus.
Tip: You don't need to mention “2ndOpinion” or tool names. Your AI assistant will automatically pick the right tool based on what you ask. Just describe what you want in natural language.
Available Tools
For reference, here are the exact tool names your AI assistant discovers:
secondopinion_opinionGet a second opinion on a diffsecondopinion_reviewCode review with accept/review/rejectsecondopinion_askAsk any model a questionsecondopinion_explainExplain changes in plain languagesecondopinion_statusCheck usage and limitssecondopinion_consensus3-model consensus analysissecondopinion_bug_hunt3-model bug huntsecondopinion_security_auditOWASP security scansecondopinion_generate_testsGenerate test suitessecondopinion_debateMulti-round AI debate