Skip to main content
MCP server CX Codex

selvage — Claude Code MCP server: what it does, how to install

selvage gives coding agents focused Git-change context for code review, bug detection, and security checks.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add selvage -- uvx selvage
Open on GitHub

What selvage does

selvage is an MCP server for reviewing Git changes. It handles staged and unstaged diffs, plus comparisons between branches or commits. Its Tree-sitter AST pass selects code around changed lines and includes related dependency statements, so the host agent can review a focused context.

The server can use OpenAI, Claude, or Gemini through OpenRouter. When the context grows beyond the model limit, it splits the work across multiple turns. With get_review_context, the host receives structured diff data, extracted context, and review instructions, then uses its own model to produce the review.

OpenRouter mode requires OPENROUTER_API_KEY; without it, that route will not start. Add the server to Claude Code with claude mcp add selvage -- uvx selvage.

What it helps with

  • review staged and unstaged Git changes
  • compare the current branch with another branch
  • spot bugs in changed code
  • check modified code for security risks
  • give an agent focused review context

Example prompts for the agent

  • Review the current changes with selvage mcp and list the bugs you find.
  • Compare the current branch with main using selvage mcp.
  • Review the staged changes with selvage mcp and flag security risks.

How to install selvage

Platform CLI

claude mcp add selvage -- uvx selvage

uvx runs the command named after the package; if the README names another one, use uvx --from selvage <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about selvage

How do I install selvage in Claude Code?

Run claude mcp add selvage -- uvx selvage.

What does selvage do?

It analyzes Git changes, extracts AST-based context around affected code, and gives that context to an agent for bug and security review.

Does selvage need an API key?

The OpenRouter route requires OPENROUTER_API_KEY. With get_review_context, the host agent can perform the review with its own LLM and no external API key.

Similar MCP servers

All MCP servers for Code review and refactoring →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor