mcpField
V
vibelens-mcp

vibelens-mcp

Local
github.com/klewicki7Developer Tools0Updated 20w ago

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

  1. 01Show unified git diffs with annotations
  2. 02Add change summaries and file-level explanations
  3. 03Include line-specific notes and action buttons
  4. 04Provide a code-change explanation prompt

Use cases

  1. 01Reviewing a code change inside the editor
  2. 02Explaining selected lines in a diff
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"klewicki7-vibelens": {
"command": "npx",
"args": [
"-y",
"vibelens-mcp"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
Run commandnpx -y vibelens-mcp
Environment variables to set
YOUR_API_KEYSecretYour API key for the service

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmvibelens-mcp0.1.0

Tools

1

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
diffstringYesThe raw git diff output as a string (unified diff format). IMPORTANT: Pass the actual diff content, not a file path or shell command.
titlestringYesTitle for the explanation (e.g., 'Add user authentication')
editorenumNoWhich editor you are usingcursor | vscode
summarystringNoHigh-level summary of the changes
annotationsarrayNoAnnotations explaining specific parts of the diff
workspacePathstringNoAbsolute path to the workspace/project folder. Used to attribute the review to the correct project.

Details

From the project README

VibeLens 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
ParameterTypeRequiredDescription
titlestringYesTitle for the explanation
diffstringYesRaw git diff output (unified format)
summarystringNoHigh-level overview of changes
annotationsarrayNoExplanations for specific parts of the diff
workspacePathstringNoAbsolute path to project folder (for workspace filtering)
editorstringNo"cursor" or "vscode" (default: "cursor")
Annotation Object
FieldTypeRequiredDescription
filestringYesFile path the annotation refers to
linenumberNoLine number in the new file
explanationstringYesYour explanation of this change
actionsarrayNoAction buttons with prompts
Action Object
FieldTypeRequiredDescription
labelstringYesButton label (e.g., "Add tests")
promptstringYesFull 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:

  1. Get the diff from conversation context (or run git diff if needed)
  2. Analyze and prepare annotations
  3. Call show_diff_explanation with appropriate parameters
  4. 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

Markdown supported

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.