MCP Directory

Selvage

AI-powered code review automation: analyzes Git diffs to find bugs, security issues, and quality improvements.

Unverified
stdio (local)
API key
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
uv tool install selvage

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "selvage": {
      "command": "uvx",
      "args": [
        "selvage",
        "mcp"
      ],
      "env": {
        "OPENROUTER_API_KEY": "your_openrouter_api_key_here"
      }
    }
  }
}

Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • uv (or pipx/pip) to install and run Selvage
  • Git repository to review
  • An LLM provider API key (OPENROUTER_API_KEY recommended, or OPENAI/ANTHROPIC/GEMINI keys) — not required when using get_review_context / the Claude Code plugin

About Selvage

Selvage is a CLI and MCP server for automated AI code review. In MCP mode it integrates with Cursor and Claude Code, letting you trigger reviews of staged, unstaged, or branch/commit diffs via natural language. Smart Context (Tree-sitter AST) extracts only relevant code blocks to keep reviews accurate and cheap, with automatic multi-turn handling for large changes. It can either run the review itself (using OpenAI/Anthropic/Google/OpenRouter models) or return structured review context via get_review_context for the host agent to review with its own LLM, requiring no API key.

Tools & capabilities (2)

review

Runs an AI code review of the current changes (staged, unstaged, or against a target branch/commit) using a selected model, returning quality improvements, bug findings, and security issues. Triggered via natural language such as 'Review current changes using selvage mcp'.

get_review_context

Returns structured review context (Git diff + AST-based Smart Context + system prompt) so the host agent (Claude Code, Cursor, Antigravity, etc.) can perform the code review with its own LLM — no Selvage/external API key required.

When to use it

  • Review current working-directory or staged changes before committing
  • Review changes between the current branch and a base branch (e.g. main/develop) before opening a PR
  • Multi-model comparison reviews (e.g. compare GPT-5 vs Claude Sonnet output)
  • Agent-delegated review with no API key via get_review_context
  • CI/CD-style quality verification before deployment

Security notes

Selvage runs the code review itself using an LLM provider API key (OPENROUTER_API_KEY, or individual OPENAI_API_KEY / ANTHROPIC_API_KEY / GEMINI_API_KEY). Keys are read from environment variables or the MCP `env` block — keep them out of shared/committed config. Alternatively, use the `get_review_context` tool (or the Claude Code plugin) so the host agent reviews with its own LLM and no external API key is needed. Diffs of your code are sent to the chosen LLM provider for analysis.

Selvage FAQ

Do I need an API key to use Selvage?

Not always. If you use the `get_review_context` tool (or the Claude Code plugin's /review skill), the host agent performs the review with its own LLM and no external API key is needed. For Selvage to run the review itself, set OPENROUTER_API_KEY (recommended) or an individual provider key.

How does it keep reviews cost-effective?

Selvage uses Tree-sitter based AST analysis (Smart Context) to send only the minimal function/class blocks containing changed lines plus their dependencies, instead of whole files. It also auto-switches to a multi-turn Large Context Mode once total tokens exceed ~200k.

Which AI models are supported?

OpenAI (e.g. gpt-5.2-codex), Anthropic (claude-opus-4.6, claude-sonnet-4.5), Google (gemini-3-pro/flash), and OpenRouter-provided models like minimax-m2.5, glm-5, qwen3-coder, kimi-k2.5, and DeepSeek — all manageable with a single OpenRouter API key.

How do I register it with Cursor or Claude Code?

For Cursor, add an `mcpServers` entry running `uvx selvage mcp` in ~/.cursor/mcp.json. For Claude Code, run `claude mcp add selvage -- uvx selvage mcp`, or install the marketplace plugin (`/plugin install selvage@selvage-lab-selvage`) for a dedicated /review skill.

Alternatives to Selvage

Compare all alternatives →

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 21 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 25 days agoRepo

Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.

Unverified
stdio (local)
No auth
C
14 tools
Updated 11 hours agoRepo