- Home
- MCP servers
- Selvage
Selvage
- other
31
GitHub Stars
other
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"selvage-lab-selvage": {
"command": "uvx",
"args": [
"selvage",
"mcp"
],
"env": {
"OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE"
}
}
}
}You can run Selvage as an MCP server to enable AI-powered code review within your coding workflow. By connecting via MCP, you can request code reviews through your assistant tools and receive structured feedback that helps you improve quality, catch bugs, and uncover security issues during your development process.
How to use
You will interact with Selvage through an MCP client by registering Selvage as an MCP server and issuing natural language review requests from your coding assistants. Once registered, you can request reviews of current changes, staged changes, or comparisons between branches or commits. The server will return structured review context and results that your assistant can present or act on within your workflow.
How to install
Prerequisites: you need Node.js available or a way to run MCP commands via the provided tooling. You will also be using an MCP client compatible with standard MCP workflows.
Step 1: Install the required MCP tooling (example shown uses uv as the package tool). If you do not have uv, install it first.
# Install uv (run once)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install Selvage via uv
uv tool install selvage
Step 2: Install Selvage using pipx or pip if you prefer Python-based installation. Choose one method.
# Install pipx (macOS)
brew install pipx
# Install Selvage
pipx install selvage
# Traditional Python installation (may require virtual environments)
pip install selvage
Step 3: If you run into external environment management issues, prefer uv or pipx methods. macOS/Linux users may see advantages using uv or pipx for isolation.
Step 4: Set up your API key for OpenRouter if you plan to use it with MCP.
export OPENROUTER_API_KEY="your_openrouter_api_key_here"
MCP Mode Usage (recommended)
Register Selvage as an MCP server in your MCP client to enable natural language review requests. The following configuration shows how to register Selvage via an MCP command, with an optional API key.
{
"mcpServers": {
"selvage": {
"command": "uvx",
"args": ["selvage", "mcp"]
}
}
}
Cursor Integration
Register Selvage in Cursor by placing the MCP configuration in your MCP file. You can also pass the API key as an environment variable if you need to authorize with OpenRouter.
// Method 1: Using environment variables (if already set)
{
"mcpServers": {
"selvage": {
"command": "uvx",
"args": ["selvage", "mcp"]
}
}
}
// Method 2: Direct specification with API key
{
"mcpServers": {
"selvage": {
"command": "uvx",
"args": ["selvage", "mcp"],
"env": {
"OPENROUTER_API_KEY": "your_openrouter_api_key_here"
}
}
}
}
Claude Code Integration
You can integrate Selvage through Claude Code either via a marketplace plugin or by registering an MCP server. The marketplace approach enables a dedicated /review skill and a reviewer agent for seamless interaction.
# Step 1: Add Selvage marketplace
/plugin marketplace add selvage-lab/selvage
# Step 2: Install the plugin
/plugin install selvage@selvage-lab-selvage
After installation, you can issue review commands directly from Claude Code, such as reviewing unstaged changes or reviewing against a specific branch.
/review # Review unstaged changes
/review staged # Review staged changes
/review branch main # Review against main branch
/review commit abc1234 # Review from a specific commit
Optionally, you can register Selvage as an MCP server in Claude Code using the CLI, which allows you to add the server and then perform reviews through your assistant.
# Method B: MCP Server Registration
claude mcp add selvage -- uvx selvage mcp
CLI Usage
You can run Selvage directly from the terminal using the CLI. Configure your default model and language, then issue reviews.
selvage config list
selvage config model <model_name>
selvage config language <language_name>
selvage review [OPTIONS]
Viewing results and UI
Review results are printed to the terminal and saved to files. You can also manage results through the web UI for longer-term review management.
selvage view
selvage view --port 8502
Available tools
get_review_context
Returns structured review context (diff + Smart Context + system prompt) so host agents can perform code reviews with their own LLM without needing an external API key.
selvage_review
Performs code review using the selected AI model and reports recommendations, improvements, and potential issues.
selvage_config
Manage Selvage configuration, including default model and language settings.
selvage_view
Open and manage the review results web UI for browsing and re-reading past reviews.
mcp_registration
Register Selvage as an MCP server in supported clients (Cursor, Claude Code, etc.) to enable natural language review requests.