second-opinion-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
second-opinion-mcp
An MCP server that asks another model for a second opinion: have a different model review a diff, check a design, or double-check a fact, from any MCP client (Claude Code, Cursor, AWS Quick, Claude Desktop, ...).
One Python file, standard library only, no SDKs.
Tools
Tool | What it sends |
| Only the prompt you give it |
|
|
review compares against HEAD by default: the uncommitted changes to tracked files. Pass a commit or range
(HEAD~1, main...my-branch) to review committed work. Untracked files are never sent; a new file shows up once it
is staged or committed. focus points the reviewer at an area ("error handling") without telling it your verdict.
Every reply comes back wrapped and marked as unverified:
<second_opinion model="sol" input_tokens="1840" output_tokens="212">
app.py:2 | bug | add() subtracts instead of adding
</second_opinion>
Unverified second opinion: check each point against the code before acting on it.Related MCP server: yuntu-mcp-server
What leaves your machine
asksends only the prompt and system prompt.reviewsends the diff, not whole files.reviewleaves out key files (.env*,*.pem,*.key,*.p12,*.pfx,id_rsaand the other SSH key names), even when you name them inpaths.Before sending, both tools redact your configured API keys and common secret shapes: AWS access keys, private key blocks,
sk-andghp_style tokens, and.env-styleNAME_KEY=valuelines. The reply says how many were redacted. This catches common patterns only; it is not a secret scanner. A private key in a file with another name is only caught when the diff shows its wholeBEGIN…ENDblock.A prompt over
max_chars(default 200,000) is refused instead of sent.Redirects are not followed, so the key is only ever sent to
base_url.reviewrunsgit diffin the repo you name, so only point it at repos you trust: a repo's own git config can run filters, as it can for any git command there.
Endpoints
Two wire formats cover most providers:
| Request | Works with |
|
| OpenAI, Azure Foundry (v1 API), DeepSeek, OpenRouter, Ollama, LM Studio, ... |
|
| Anthropic, Claude on Azure Foundry |
base_url is the same value you would give that vendor's SDK:
Provider |
|
|
OpenAI |
|
|
DeepSeek |
|
|
Azure Foundry (GPT and other non-Claude models) |
|
|
Anthropic |
|
|
Azure Foundry (Claude) |
|
|
Setup
git clone https://github.com/takattowo/second-opinion-mcp
cd second-opinion-mcp
cp config.example.json ~/.second-opinion.json # macOS / Linux
Copy-Item config.example.json $HOME\.second-opinion.json # Windows PowerShellThen edit the config. Python 3.10+, and git for review. To run the tests: pip install pytest, then
python -m pytest.
Config
The server reads SECOND_OPINION_CONFIG, or ~/.second-opinion.json when that is unset.
{
"max_chars": 200000,
"providers": {
"azure": {"type": "openai", "base_url": "https://<resource>.openai.azure.com/openai/v1", "api_key_env": "AZURE_FOUNDRY_API_KEY"}
},
"models": {
"luna": {"provider": "azure", "model": "<deployment name>", "params": {"reasoning_effort": "low"}}
}
}max_chars: optional, the largest prompt (plus system prompt) that is sent. Default 200,000.
log: optional,
tokens(default),fulloroff. See Usage log.log_file: optional, where the log goes. Default
~/.second-opinion-log.jsonl; a relative path is next to the config file.providers:
type,base_url,api_key_env(the name of the environment variable that holds the key), and optionallytimeoutin seconds (default 300).models: the alias the client picks, mapped to a
providerand themodelid. On Azure the model id is your deployment name.paramsis merged into the request body as is, so any provider option works there (temperature,reasoning_effort, ...). Use the option names the provider expects:anthropicmodels takemax_tokens(default 4096), while OpenAI reasoning models reject it and takemax_completion_tokens.
Keys never go in the config file, only the name of the variable that holds them.
See config.example.json for all five providers.
Add it to your MCP client
Claude Code:
claude mcp add --transport stdio --env AZURE_FOUNDRY_API_KEY=<key> second-opinion -- python /path/to/second_opinion.pyOther clients:
"second-opinion": {
"command": "python",
"args": ["/path/to/second_opinion.py"],
"env": {"AZURE_FOUNDRY_API_KEY": "<key>"}
}Use the full path to python if the client's PATH doesn't include it. If you install the package
(pip install .), the command is second-opinion-mcp with no arguments. Restart the client after changing the
config: the model list is read at startup.
Errors (missing key, HTTP errors with the provider's message, unknown model, nothing to review) come back as tool errors, so the calling model can read them and fix the call.
Usage log
Each tool call appends one JSON line to log_file, failed calls included:
{"time": "2026-01-05T14:03:11+07:00", "tool": "review", "model": "sol", "repo": "/path/to/repo", "ref": "HEAD",
"paths": null, "model_id": "gpt-6.2-sol", "input_tokens": 1840, "output_tokens": 212, "redacted": 0, "ok": true,
"seconds": 17.7}
| What is saved |
| Time, tool, model, tokens, duration, ok or the error, how many secrets were redacted, and for |
| All of that, plus the prompt and system prompt as sent (after redaction) and the reply |
| Nothing |
full stores the code you sent, so keep the log out of git and anywhere shared.
Limits
Text in, text out: no images, tools or streaming.
openaitype uses Chat Completions. A model that only supports the Responses API won't work.Rate limits and server errors (429, 5xx) are retried once, after the
Retry-Afterthe server asks for (at most 30 seconds).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Scan prompts for injection attacks, redact PII, and audit LLM SDK usage from any MCP client
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Generate contextual prompts and reusable agent skills, evaluate prompts with the 16-dimension Prompt Score, and manage saved work in PromptDrive. Twelve MCP tools also provide authorized access to private Memory for source-grounded answers. Connect over Streamable HTTP using OAuth 2.1 and PKCE. Generation consumes account quota and automatically saves successful results; Memory access follows account permissions and plan limits.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables developers to explain error messages, validate and format JSON, generate regex patterns from descriptions, and summarize text via an LLM, all through MCP-connected clients.-
- FlicenseAqualityDmaintenanceEnables LLM chat with routing and failover, balance checking, and model listing via MCP.3-
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to ask plain-language questions and receive answers grounded only in documents the configured role is cleared to read, with the same access-controlled tools available across any client.MIT
- AlicenseNot gradedqualityBmaintenanceEnables chat, document search (RAG), and a declarative SQL tool builder over MCP so any client can use these capabilities.AGPL 3.0