MCP.so
Sign In
Servers

Mcp Sage

@jalehman

MCP Server for getting second opinions/reviews on large amounts of code.

Overview

What is Mcp Sage?

Mcp Sage is an MCP server that provides tools for sending prompts to OpenAI's GPT-5, GPT-4.1, Google's Gemini 2.5 Pro, or Anthropic's Claude Opus 4.1 based on token count and configuration. The tools embed all referenced filepaths (recursively for folders) in the prompt, making it useful for getting second opinions or detailed code reviews from models that can handle large amounts of context accurately.

How to use Mcp Sage?

Install via Smithery (npx -y @smithery/cli install @jalehman/mcp-sage --client claude) or clone the repository, install dependencies, and build. Set OPENAI_API_KEY, GEMINI_API_KEY, and/or ANTHROPIC_API_KEY as environment variables. Run the server with node /path/to/dist/index.js and configure it in your MCP client. Two primary tools are available: sage-opinion for general prompts and sage-review for code change instructions, both with an optional debate mode.

Key features of Mcp Sage

  • Automatic model selection based on token count up to 1M tokens.
  • Supports OpenAI GPT-5, GPT-4.1, Google Gemini 2.5 Pro, and Claude Opus 4.1.
  • Recursively packs file paths into structured XML for context.
  • Provides sage-opinion and sage-review tools.
  • Optional debate mode with multi-model or self-debate flows.
  • Informative error when content exceeds 1M tokens.

Use cases of Mcp Sage

  • Getting second opinions from large-context models on complex problems.
  • Performing detailed code reviews with SEARCH/REPLACE edit suggestions.
  • Analyzing large codebases that require more than 200K tokens of context.
  • Running multi-model debates to generate higher-quality responses.

FAQ from Mcp Sage

What models are supported?

OpenAI's GPT-5 and GPT-4.1, Google's Gemini 2.5 Pro, and Anthropic's Claude Opus 4.1 (used as judge in debate mode). Model selection is automatic based on token count.

What API keys are required?

You need OPENAI_API_KEY for GPT-5 and GPT-4.1, GEMINI_API_KEY for Gemini 2.5 Pro, and ANTHROPIC_API_KEY for Claude Opus 4.1. The server can work with one key, but all three are recommended for optimal model selection and debate mode.

What are the prerequisites?

Node.js v18 or later and at least one API key for the models you intend to use.

How does debate mode work?

Debate mode orchestrates a structured debate between multiple models (or self-debate if only one is available). It involves generation, critique, synthesis, consensus check, and judgment phases, consuming 2–4x more tokens and taking 2–5 minutes to complete.

What happens if content exceeds the token limit?

If the total content exceeds 1M tokens, the server returns an informative

More from Other