Explain Changes

Explain Changes

Enables AI to perform peer review of its own code changes by displaying annotated diffs with inline comments in a VS Code/Cursor panel. The AI can analyze its modifications and provide explanations directly alongside the changed code, similar to human code review workflows.

Category
Visit Server

README

<div align="center">

Explain Changes

AI peer review for your code changes.

Just like humans review each other's PRs, your AI reviews its own changes — with inline annotations that appear directly in a VS Code/Cursor panel.

Screenshot

</div>


Why AI Peer Review?

When humans write code, we do peer review. When AI writes code, we... scroll through chat hoping we understood what it did?

The asymmetry is broken. AI generates multi-file changes in seconds, but understanding those changes still requires you to:

  • Read the chat explanation
  • Open the diff
  • Mentally map one to the other

This extension gives AI the same workflow humans use: review the diff, annotate the changes, explain the reasoning.


How It Works

AI makes changes → AI reviews its own diff → Panel opens with annotated diff

The AI calls show_diff_explanation after completing a task. You get a visual diff with inline annotations — exactly where a human reviewer would leave comments.

Action buttons let you send improvement suggestions directly to Cursor chat.


Features

  • Visual diff — Side-by-side or unified view powered by diff2html
  • Inline annotations — Review comments appear directly after relevant code lines
  • Action buttons — Click to send prompts to Cursor chat ("Refactor this", "Add tests")
  • Click to open — File names link directly to the source
  • Workspace-aware — Only shows in the window matching your project
  • Auto-install MCP — Extension configures the MCP server automatically

Installation

1. Install the Extension

Download the .vsix from releases and install:

VS Code / Cursor:

  • Extensions → ... → "Install from VSIX..."

The extension automatically configures the MCP server in Cursor and Windsurf on first activation.

2. Use with AI

In Cursor chat, use the slash command:

/explain-changes

This triggers the MCP prompt which guides the AI to analyze your changes and call the tool automatically.


Manual MCP Configuration

If auto-install doesn't work, configure manually:

<details> <summary><b>Cursor</b></summary>

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "explain-changes": {
      "command": "npx",
      "args": ["-y", "explain-changes-mcp"]
    }
  }
}

</details>

<details> <summary><b>Claude Desktop</b></summary>

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "explain-changes": {
      "command": "npx",
      "args": ["-y", "explain-changes-mcp"]
    }
  }
}

</details>

<details> <summary><b>Windsurf</b></summary>

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "explain-changes": {
      "command": "npx",
      "args": ["-y", "explain-changes-mcp"]
    }
  }
}

</details>


Packages

Package Description
packages/extension VS Code/Cursor extension that displays diff explanations
packages/mcp MCP server with the show_diff_explanation tool

Architecture

┌─────────────────┐     writes JSON      ┌─────────────────┐
│   MCP Server    │ ──────────────────▶  │ ~/.explain-     │
│                 │                      │ changes/        │
│ show_diff_      │                      │ pending.json    │
│ explanation     │                      └────────┬────────┘
└─────────────────┘                               │
                                                  │ watches
                                                  ▼
                                         ┌─────────────────┐
                                         │  VS Code/Cursor │
                                         │   Extension     │
                                         │                 │
                                         │  Webview Panel  │
                                         └─────────────────┘

Development

# Install dependencies
npm install

# Build all packages
npm run build

# Build extension only
npm run build:extension

# Build MCP only
npm run build:mcp

# Package extension as .vsix
cd packages/extension && npm run package

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured