visualize_diff_html_contentLABSCO SUMMARY
The expiring Gist is the feature.
Sharing a diff usually means pasting code somewhere permanent. Here the default is a secret Gist that deletes itself in half an hour, with tighter presets — access code, 15-minute window — when the code is sensitive. If you have no token at all it degrades to a local file rather than erroring, so the file path stays usable regardless.
What it is
An MCP server that renders diffs as readable visual comparisons instead of raw text. Two tools, split by where the output goes: one publishes to a GitHub Gist and hands back a preview URL, the other writes a file to disk. Rendering uses diff2html; PNG output goes through a headless browser.
What you get
- A diff published as a GitHub Gist with a browser-ready preview URL, auto-deleting after
expiryMinutes(default30, range 1–1440), secret by default —visualize_diff_html_content - The same diff written to local disk as HTML or PNG, optionally opening in your browser —
visualize_diff_output_file - Display controls shared by both:
formatasside-by-side(default) orline-by-line,showFileList,highlightfor syntax colouring, andoldPath/newPathfor the labels - Three sharing levels when the content is sensitive: secret Gist with a 60-minute expiry, secret Gist plus an access code at 30 minutes, or the same with a 15-minute window
- A fallback when no GitHub token is present: the HTML is written to a temporary file and opened locally instead of failing
Requirements
Bun as the runtime, and Claude Desktop or another MCP client. GITHUB_TOKEN is required only for the Gist path — a personal access token with gist scope; local file output needs no credential at all. DEFAULT_AUTO_OPEN (default false) and DEFAULT_OUTPUT_MODE (default html) set the behaviour you do not want to repeat per call. Auto-open works on Windows, macOS and Linux with the platform's own opener.
Setup effort
Build from source — git clone https://github.com/gorosun/unified-diff-mcp.git
USE CASES
Showing a colleague a change without a pull request
Render the diff to a secret Gist and send the preview URL; it deletes itself on the timer you set.
Putting a diff into a document or slide
Save it as a PNG for the slide, or as an HTML file for the doc, with the file list and syntax highlighting on.
Sharing something you would rather not leave lying around
Use the high-security preset — secret Gist, access code, short window — instead of the default half-hour link.
Reviewing a change side by side yourself
Render locally with no GitHub token at all and let it open in your browser automatically.
2 tools
Listed in project docs. Your client may show a different list.
visualize_diff_output_fileBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
Bun
Optional
GITHUB_TOKEN in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/gorosun/unified-diff-mcp.git
cd unified-diff-mcp
bun installMCP Clients
Claude Desktop
{
"mcpServers": {
"unified-diff-mcp": {
"command": "bun",
"args": [
"run",
"<YOUR_PATH_TO_UNIFIED_DIFF_MCP>/src/index.ts"
],
"env": {
"GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>",
"DEFAULT_AUTO_OPEN": "true",
"DEFAULT_OUTPUT_MODE": "html"
}
}
}
}