Skip to content

jerzydziewierz/second_opinion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Second Opinion MCP

An MCP server that lets your AI coding assistant consult a different, strong coding assistant, when it needs a fresh perspective.

It delegates to locally installed CLI agent harnesses, enabling the subagents to use full power of their tooling: search, explore, inspect e.t.c.

When your agent is stuck or you want a sanity check, just say "ask gemini", "ask codex", "ask claude", or "ask kilo" and it queries the other model with the relevant files as context.

History

Originally vibed in node.js ; then rewriten into rust to save on memory (and tokens!)

Prerequisites

Install the CLI tools you want to use:

  1. Gemini CLI
  2. Codex CLI
  3. Claude Code
  4. Kilocode CLI

Configure each CLI with your preferred billing method. Subscription or API key is handled by the CLI itself — this server never touches API keys.

Quick start

Clone, then build:

cargo build --release

Register the MCP server:

# claude mcp add --scope user grey-so -- npx -y grey-so
claude mcp add --scope user grey-rso -- $(pwd)/rust/target/release/grey-rso
gemini mcp add --scope user grey-rso $(pwd)/rust/target/release/grey-rso
codex mcp add grey-rso -- $(pwd)/rust/target/release/grey-rso
kilo mcp add grey-rso -- $(pwd)/rust/target/release/grey-rso  
# The above often fails, await better documentation from kilo. For now, edit `nano ~/.config/kilo/opencode.json` instead.

Test it:

gemini -p -y "testing: use the consult tool and ask all models - what is the capital of Paris?"
codex exec "testing: use the consult tool and ask all models - what is the capital of Paris?"
kilo run "testing: use the consult tool and ask all models - what is the capital of Paris?"
ANTHROPIC_API_KEY=  claude --allowedTools mcp__grey-rso__consult -p "use the consult tool and ask all models, in parallel: what is the capital of Paris?"

How it works

The MCP tool exposes a single consult tool. The caller picks one of four short aliases — gemini, claude, codex, kilo — and the server maps that alias to an actual model name via a config file, then shells out to the corresponding CLI.

This keeps the MCP interface minimal and spends as little of your precious tokens as possible, when not used.

Example use

> Still getting this error after your fix. Ask gemini.

  Let me consult Gemini about the Neovim treesitter API changes:

  grey-so:consult (MCP)(prompt: "Neovim plugin broken due to treesitter
                                API changes...", files: ["lua/testonly.lua"],
                                model: "gemini")
   The issue is that (...)

Further reading

See DETAILS.md for slash command examples, skill setup, and development instructions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •