
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
code-explainer-mcp
Advanced tools
MCP server that renders AI-generated code explanations as beautiful HTML pages
Give your AI agent a way to show its work.
An MCP tool that lets AI visualize the code changes it made — rendering git diffs as interactive HTML pages with inline annotations.
When an AI agent makes code changes, it usually just tells you what it did in text. This MCP gives the agent a better way to communicate: a visual diff with annotations.
AI makes changes to your code
↓
AI calls show_diff_explanation
↓
Browser opens with diff + AI's annotations inline
The AI can highlight the important lines and explain what each change does — right next to the code.
git clone <repo>
cd code-explainer-mcp
npm install
npm run build
claude mcp add code-explainer node /path/to/code-explainer-mcp/dist/index.js
Or add to ~/.claude/mcp_settings.json:
{
"mcpServers": {
"code-explainer": {
"command": "node",
"args": ["/path/to/code-explainer-mcp/dist/index.js"]
}
}
}
Add to Cursor MCP settings:
{
"mcpServers": {
"code-explainer": {
"command": "node",
"args": ["/path/to/code-explainer-mcp/dist/index.js"]
}
}
}
show_diff_explanationRenders a git diff with annotations in the browser.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Page title |
diff | string | Yes | Raw git diff output (unified format) |
summary | string | No | High-level overview |
annotations | array | No | Explanations for specific changes |
globalActions | array | No | Action buttons in the header |
editor | string | No | "vscode", "cursor", or "auto" |
| Field | Type | Required | Description |
|---|---|---|---|
file | string | Yes | File path |
line | number | No | Line number to attach annotation to |
explanation | string | Yes | Your explanation |
actions | array | No | Array of { label, prompt } for action buttons |
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Button label |
prompt | string | Yes | Prompt to pre-fill in Cursor chat |
explain-changesInstructions for explaining git diffs with visual output. The AI will get the diff, analyze the changes, and call the tool with appropriate annotations.
Ask your AI agent: "Explain the last commit"
The agent will:
git diff HEAD~1 HEADshow_diff_explanation:{
"title": "Add JWT Authentication",
"summary": "Added JWT auth middleware and applied to API routes.",
"diff": "diff --git a/src/auth.ts b/src/auth.ts\n...",
"annotations": [
{
"file": "src/auth.ts",
"line": 5,
"explanation": "Extracts Bearer token from Authorization header",
"actions": [
{ "label": "Add tests", "prompt": "Write unit tests for this auth middleware" }
]
}
],
"globalActions": [
{ "label": "Security Review", "prompt": "Review this code for security vulnerabilities" }
],
"editor": "cursor"
}
npm run dev
Opens http://localhost:3456 with hot reload. Edit src/html-generator.ts to change styling, dev/server.mjs to change mock data.
MIT
FAQs
MCP server that renders AI-generated code explanations as beautiful HTML pages
The npm package code-explainer-mcp receives a total of 5 weekly downloads. As such, code-explainer-mcp popularity was classified as not popular.
We found that code-explainer-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.