About vibelens-mcp
vibelens-mcp is an MCP server for presenting code diffs with AI annotations in the VibeLens extension panel. It is intended for coding agents and developers using VS Code or Cursor to review and explain changes.
Key features
- 01Show unified git diffs with annotations
- 02Add change summaries and file-level explanations
- 03Include line-specific notes and action buttons
- 04Provide a code-change explanation prompt
Use cases
- 01Reviewing a code change inside the editor
- 02Explaining selected lines in a diff
- 03Offering follow-up actions such as adding tests
MCP support
The MCP server exposes the `show_diff_explanation` tool and a `vibelens` prompt. It writes review data for the companion VS Code/Cursor extension to display.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
1Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| diff | string | Yes | The raw git diff output as a string (unified diff format). IMPORTANT: Pass the actual diff content, not a file path or shell command. |
| title | string | Yes | Title for the explanation (e.g., 'Add user authentication') |
| editor | enum | No | Which editor you are usingcursor | vscode |
| summary | string | No | High-level summary of the changes |
| annotations | array | No | Annotations explaining specific parts of the diff |
| workspacePath | string | No | Absolute path to the workspace/project folder. Used to attribute the review to the correct project. |
Details
From the project READMEVibeLens MCP Server
MCP server that provides the show_diff_explanation tool for visualizing code changes with AI annotations.
Installation
npx -y vibelens-mcp
Or install globally:
npm install -g vibelens-mcp
MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"vibelens": {
"command": "npx",
"args": ["-y", "vibelens-mcp"]
}
}
}
Tool: show_diff_explanation
Displays a git diff with AI-generated annotations in the VibeLens extension panel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Title for the explanation |
diff | string | Yes | Raw git diff output (unified format) |
summary | string | No | High-level overview of changes |
annotations | array | No | Explanations for specific parts of the diff |
workspacePath | string | No | Absolute path to project folder (for workspace filtering) |
editor | string | No | "cursor" or "vscode" (default: "cursor") |
Annotation Object
| Field | Type | Required | Description |
|---|---|---|---|
file | string | Yes | File path the annotation refers to |
line | number | No | Line number in the new file |
explanation | string | Yes | Your explanation of this change |
actions | array | No | Action buttons with prompts |
Action Object
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Button label (e.g., "Add tests") |
prompt | string | Yes | Full prompt to send to chat |
Example
{
"title": "Add user authentication",
"summary": "Added JWT middleware and protected API routes.",
"diff": "diff --git a/src/auth.ts b/src/auth.ts\n...",
"workspacePath": "/Users/me/myproject",
"annotations": [
{
"file": "src/auth.ts",
"line": 15,
"explanation": "Extracts and validates JWT token from Authorization header",
"actions": [
{
"label": "Add refresh token",
"prompt": "Add refresh token support to this auth middleware"
}
]
}
]
}
Prompt: vibelens
The MCP server also provides a prompt with instructions for explaining code changes. Reference it with @vibelens in your chat.
The prompt guides the AI to:
- Get the diff from conversation context (or run
git diffif needed) - Analyze and prepare annotations
- Call
show_diff_explanationwith appropriate parameters - Generate specific, actionable suggestions for each annotation
How It Works
The MCP server writes to ~/.vibelens/pending.json and stores reviews in ~/.vibelens/vibelens.db. The companion VS Code/Cursor extension watches this data and displays the diff in a webview panel.
MCP Server Extension
│ │
│ writes to │ watches
│ ~/.vibelens/ │ ~/.vibelens/
│ pending.json │ pending.json
└────────────────────────────┘
Development
# Build
npm run build
# The server runs via stdio
node dist/index.js
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.