Skip to main content
Glama

mcp-second-opinion

Let your MCP-aware agent consult rival LLMs mid-conversation. One simple MCP server, four providers — OpenAI, Google Gemini, Anthropic, xAI/Grok — unified behind two tools.

Install

pip install mcp-second-opinion

or with uv:

uv add mcp-second-opinion

Related MCP server: AI Consultant MCP Server

Configure

Set at least one of these environment variables:

Variable

Provider

OPENAI_API_KEY

OpenAI

GEMINI_API_KEY

Google Gemini

ANTHROPIC_API_KEY

Anthropic

XAI_API_KEY

xAI/Grok

Providers without a key set are gracefully disabled — they appear in panel responses with a friendly error field rather than crashing the server.

Optional:

Variable

Default

Purpose

MCP_SECOND_OPINION_PROFILE

flagship

flagship | balanced | cheap — controls which model each provider uses in ask_the_panel.

MCP_SECOND_OPINION_SELF_SKIP

unset

Provider key to omit from panel (openai, gemini, anthropic, grok). Useful when the host is itself one of the panelists.

MCP_SECOND_OPINION_TIMEOUT

30

Per-provider timeout in seconds.

MCP_SECOND_OPINION_MAX_TOKENS

2048

Cap on rival output length.

Register with your MCP client

Claude Desktop / Claude Code (mcp_settings.json or equivalent):

{
  "mcpServers": {
    "second-opinion": {
      "command": "mcp-second-opinion",
      "env": {
        "OPENAI_API_KEY": "sk-...",
        "GEMINI_API_KEY": "...",
        "ANTHROPIC_API_KEY": "...",
        "XAI_API_KEY": "..."
      }
    }
  }
}

Tools

ask_other_model(question, model, context?, system_prompt?)

Ask one specific rival.

question:      "is this regex correct? /^[a-z]+$/"
model:         "gpt-5" | "gemini-2.5-pro" | "claude-opus-4-7" | "grok-4" | ...
context:       optional — code snippets, prior reasoning, files
system_prompt: optional — persona/framing

Returns:

{
  "answer": "...",
  "model": "gpt-5",
  "latency_ms": 842,
  "tokens": {"input": 47, "output": 92},
  "cost_usd": 0.0014
}

ask_the_panel(question, context?, system_prompt?)

Fan out to every enabled provider in parallel.

question:      "what's wrong with this approach?"
context:       optional
system_prompt: optional — applied uniformly to all panelists

Returns:

{
  "responses": {
    "openai":    {"answer": "...", "model": "gpt-5", "latency_ms": 800, "cost_usd": 0.001, "error": null},
    "gemini":    {"answer": "...", "model": "gemini-2.5-pro", "latency_ms": 750, "cost_usd": 0.0008, "error": null},
    "anthropic": {"answer": null, "model": "claude-opus-4-7", "error": "skipped (self)"},
    "grok":      {"answer": null, "model": "grok-4", "error": "XAI_API_KEY not set"}
  },
  "total_cost_usd": 0.0018,
  "total_latency_ms": 800
}

How it works

The server is a thin layer over LiteLLM, which provides a unified OpenAI-shaped interface to all four providers. Cost calculation comes from LiteLLM's pricing table.

License

MIT

Available Tools

2 tools
ask_other_modelAsk Other ModelB

Ask a single rival LLM for a second opinion.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYesModel name, e.g. "gpt-5", "gemini-2.5-pro", "claude-opus-4-7", "grok-4". Provider is inferred from the prefix.
contextNoOptional code snippets, prior reasoning, or files to include.
questionYesThe question to ask the rival model.
system_promptNoOptional persona/framing for the rival.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so the description must disclose behavioral traits. It only mentions 'ask' and 'second opinion' with no detail on side effects, authentication, response format, or any limitations. This is insufficient for an agent to predict the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that front-loads the core action and scope. It is extremely concise with zero redundancy, achieving maximum efficiency for its content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters and no annotations, the description is too sparse. It lacks usage guidance, behavioral context, and any indication of what the output looks like (even though an output schema exists, the description doesn't reference it). An agent is left without enough information to confidently invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear descriptions for all parameters (model, context, question, system_prompt). The tool description adds no extra meaning beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Ask) and resource (single rival LLM) with the purpose of obtaining a second opinion. The word 'single' explicitly distinguishes it from the sibling tool 'ask_the_panel', making the intent unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus the sibling 'ask_the_panel'. The description implies a single opinion but does not state conditions for choosing this over the panel, leaving the agent to infer from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ask_the_panelAsk The PanelA

Convene a panel of all enabled rival LLMs in parallel.

Returns labeled answers from each enabled provider, with per-slot error fields for any that failed or are not configured.

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoOptional code snippets, prior reasoning, or files to include.
questionYesThe question to ask all rivals.
system_promptNoOptional persona/framing applied uniformly.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral disclosure burden. It explicitly mentions parallel execution and per-slot error fields for failed or unconfigured providers, which is important operational context. It does not mention potential latency, cost, or rate limits, but for a straightforward aggregation tool these are not critical gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero fluff. The action and the return format are stated immediately, and the error-handling note is placed after the primary behavior. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters and an output schema, the description covers the essential behavior and error handling. It does not explain prerequisites like API configuration, but that is implied by 'enabled providers'. The return format is handled by the output schema, so the description is adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters are already well-documented in the schema. The description adds no new semantic value beyond what the schema provides, such as example formats or edge-case guidance. This meets the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Convene') and resource ('a panel of all enabled rival LLMs'), and clearly differentiates from the sibling 'ask_other_model' by emphasizing the parallel, multi-provider nature. It also describes the return value as labeled answers with per-slot error fields, leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for gathering multiple perspectives from all enabled providers in parallel, which contrasts with the single-model sibling 'ask_other_model'. However, it does not explicitly state when to choose this over the alternative or provide exclusions, leaving some room for inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.1
    • First observedask_other_model
    • First observedask_the_panel

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clear boundaries: ask_other_model queries a single rival LLM, while ask_the_panel convenes all enabled LLMs in parallel. There is no meaningful overlap between the two modes.

Naming Consistency5/5

Both tool names follow a consistent 'ask_<target>' pattern with distinct nouns. This makes the tool set predictable and easy to understand.

Tool Count4/5

Two tools is on the thin side, but it exactly matches the server's stated purpose: get a single second opinion or a panel opinion. Each tool earns its place with no redundancy.

Completeness4/5

The core use cases of requesting a single rival model or all enabled models are fully covered. A minor gap is the absence of a way to select a specific subset of models, but that may be configuration-level rather than tool-level.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    Enables AI assistants to intelligently select and switch between different AI models (OpenAI, Anthropic, etc.) within the same conversation based on task requirements. Provides a unified interface for accessing multiple AI providers through a single MCP tool.
    1
    22 npm
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to consult with multiple AI models (GPT, Gemini, Grok, etc.) through OpenRouter with intelligent auto-selection, conversation history, and caching. Allows your AI assistant to seek expert opinions from specialized models for different tasks like coding, analysis, or general questions.
    2
    4 npm
    1
    MIT