U

Unified Diff Mcp

gorosun
๐Ÿ’ป Developer Tools
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  - Generate and visualize unified diff comparisons with beautiful HTML/PNG output, supporting side-by-side and line-by-line views for filesystem dry-run integration

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "gorosun-unified-diff-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gorosun-unified-diff-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Unified Diff MCP Server

smithery badge

Beautiful diff visualization for Claude Desktop. Transform code diffs into stunning visual comparisons with GitHub Gist integration and local file output.

Unified Diff Visualization Screenshot

โœจ Features

  • ๐ŸŽจ Beautiful HTML diff visualization using diff2html
  • ๐ŸŒ GitHub Gist integration for instant sharing
  • ๐Ÿ“ Local file output (PNG/HTML)
  • ๐Ÿ”„ Auto-delete functionality for temporary diffs
  • ๐Ÿ–ฅ๏ธ Cross-platform support (Windows, macOS, Linux)
  • โšก High-performance with Bun runtime
  • ๐Ÿ›ก๏ธ Enhanced Security with multi-level protection for shared diffs
  • ๐Ÿ”’ Multi-level security (Low/Medium/High) for different use cases

๐Ÿš€ Quick Start

Installing via Smithery

bunx @smithery/cli install @gorosun/unified-diff-mcp --client claude --config '{
  "defaultAutoOpen": true,
  "defaultOutputMode": "html",
  "githubUsername": "your_actual_github_username",
  "githubToken": "ghp_your_actual_token_here"
}'

Manual Installation

  1. Install Claude Desktop and Bun
  2. Clone and build:
    git clone https://github.com/gorosun/unified-diff-mcp.git
    cd unified-diff-mcp
    bun install
    
  3. Configure Claude Desktop - see Configuration below

๐Ÿ› ๏ธ Tools Overview

ToolPurposeOutputBest For
visualize_diff_html_contentBrowser display & sharingGitHub Gist + HTML preview URLQuick sharing, instant viewing
visualize_diff_output_fileLocal file storagePNG/HTML filesLocal storage, presentations

๐Ÿ“– Usage Examples

๐ŸŽฏ Optimal Prompts by Purpose

PurposeRecommended PromptTool UsedOutput
Quick PreviewPlease visualize and preview the following diff:
ไปฅไธ‹ใฎdiffใ‚’ๅฏ่ฆ–ๅŒ–ใ—ใฆใƒ—ใƒฌใƒ“ใƒฅใƒผใ—ใฆใใ ใ•ใ„
visualize_diff_html_contentGitHub Gist + HTML preview URL
Local StoragePlease visualize and save the following diff to a file:
ไปฅไธ‹ใฎdiffใ‚’ๅฏ่ฆ–ๅŒ–ใ—ใฆใƒ•ใ‚กใ‚คใƒซใซไฟๅญ˜ใ—ใฆใใ ใ•ใ„
visualize_diff_output_fileLocal HTML/PNG file
Share with OthersPlease visualize the following diff and create a shareable link:
ไปฅไธ‹ใฎdiffใ‚’ๅฏ่ฆ–ๅŒ–ใ—ใฆๅ…ฑๆœ‰ใƒชใƒณใ‚ฏใ‚’ไฝœๆˆใ—ใฆใใ ใ•ใ„
visualize_diff_html_contentGitHub Gist with shareable URL
Image ExportPlease visualize and save the following diff as a PNG image:
ไปฅไธ‹ใฎdiffใ‚’ๅฏ่ฆ–ๅŒ–ใ—ใฆPNG็”ปๅƒใงไฟๅญ˜ใ—ใฆใใ ใ•ใ„
visualize_diff_output_fileLocal PNG image
Code ReviewPlease visualize the following diff in side-by-side format:
ไปฅไธ‹ใฎdiffใ‚’side-by-sideๅฝขๅผใงๅฏ่ฆ–ๅŒ–ใ—ใฆใใ ใ•ใ„
Either toolSide-by-side comparison
DocumentationPlease visualize and save the following diff as an HTML file:
ไปฅไธ‹ใฎdiffใ‚’ๅฏ่ฆ–ๅŒ–ใ—ใฆHTMLใƒ•ใ‚กใ‚คใƒซใงไฟๅญ˜ใ—ใฆใใ ใ•ใ„
visualize_diff_output_fileLocal HTML file
๐Ÿ”’ Secure SharingPlease visualize this diff with high security:
ไปฅไธ‹ใฎdiffใ‚’้ซ˜ใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃใงๅฏ่ฆ–ๅŒ–ใ—ใฆใใ ใ•ใ„
visualize_diff_html_contentSecret Gist with auto-delete

Share diff instantly (GitHub Gist)

visualize_diff_html_content:
- Creates temporary GitHub Gist
- Auto-deletes after 30 minutes
- Instant browser-ready URLs
- Perfect for code reviews

Save diff locally

visualize_diff_output_file:
- Saves PNG or HTML to local disk
- Auto-opens in browser (optional)
- Perfect for documentation

๐ŸŽ›๏ธ Configuration

Environment Variables

VariableDescriptionDefault
GITHUB_TOKENGitHub Personal Access Token (for Gist integration)Required for visualize_diff_html_content
DEFAULT_AUTO_OPENAuto-open generated filesfalse
DEFAULT_OUTPUT_MODEDefault output format (html or image)html

GitHub Token Setup

  1. Go to GitHub Settings > Personal Access Tokens
  2. Generate new token with gist scope
  3. Add to your environment:
    export GITHUB_TOKEN="your_token_here"
    

Claude Desktop Configuration

macOS:

code ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows:

code %APPDATA%\Claude\claude_desktop_config.json

Configuration template:

{
  "mcpServers": {
    "unified-diff-mcp": {
      "command": "bun",
      "args": ["run", "/path/to/unified-diff-mcp/src/index.ts"],
      "env": {
        "GITHUB_TOKEN": "your_github_token_here",
        "DEFAULT_AUTO_OPEN": "true",
        "DEFAULT_OUTPUT_MODE": "html"
      }
    }
  }
}

๐Ÿ“‹ Parameters Reference

Common Parameters

ParameterTypeDefaultDescription
diffstring(required)Unified diff text
formatstringside-by-sideDisplay format (line-by-line or side-by-side)
showFileListbooleantrueShow file list summary
highlightbooleantrueEnable syntax highlighting
oldPathstringfile.txtOriginal file path
newPathstringfile.txtModified file path
autoOpenbooleanfalseAuto-open in browser

GitHub Gist Specific

ParameterTypeDefaultDescription
expiryMinutesnumber30Auto-delete time (1-1440 minutes)
publicbooleanfalsePublic vs secret gist

Local File Specific

ParameterTypeDefaultDescription
outputTypestringhtmlOutput format (html or image)

๐ŸŒ Platform Support

PlatformAuto-OpenCommands
Windowsโœ…start (primary), explorer (fallback)
macOSโœ…open (primary), AppleScript (fallback)
Linuxโœ…xdg-open

๐Ÿ”ง Development

Development mode (with hot reload):

{
  "command": "bun",
  "args": ["--watch", "/path/to/unified-diff-mcp/src/index.ts"]
}

Production mode:

{
  "command": "bun",
  "args": ["run", "/path/to/unified-diff-mcp/src/index.ts"]
}

๐Ÿ“š Advanced Usage

๐Ÿ”’ Enhanced Security Levels

When GitHub Token isn't available or for secure sharing, you can choose from multiple security levels:

Security LevelConfigurationFeaturesUse Cases
๐ŸŸข LowSecret Gist + 60min auto-deleteURL-only accessCode examples, learning
๐ŸŸก MediumSecret Gist + Password + 30min auto-deleteURL + Access code requiredTeam reviews
๐Ÿ”ด HighSecret Gist + Password + 15min auto-deleteURL + Access code + Short durationSensitive code

Usage Example

Please visualize this diff with high security:
--- a/config.js
+++ b/config.js
@@ -1,3 +1,4 @@
 const config = {
-  apiKey: 'old-key'
+  apiKey: 'new-secure-key',
+  timeout: 5000
 };

Response Example:

๐Ÿ”’ **Secure Diff Visualization**

๐Ÿ”ด **Security Level**: High Security - Secret Gist + Password (15min auto-delete)
๐Ÿ“‹ **Preview Link**: https://htmlpreview.github.io/?...
๐Ÿ”‘ **Access Code**: `a7x9k2`
โฐ **Auto-delete**: 15 minutes

๐Ÿ”„ Fallback Functionality

When GitHub Token is unavailable, the system falls back to local files:

  • HTML saved as temporary file
  • Automatic browser opening
  • Security-based file management

For detailed setup and integration guides:

๐Ÿค Supported Clients

  • Claude Desktop (Primary)
  • Claude Code (CLI)
  • VS Code + MCP Extension
  • Cline and other MCP clients

๐Ÿ“„ License

MIT License - see LICENSE file for details.

Dependencies

LibraryLicensePurpose
diff2htmlMITHTML diff generation
playwright-coreApache 2.0Browser automation
@modelcontextprotocol/sdkMITMCP integration

Made with โค๏ธ for the Claude Desktop community

Related MCP Servers

Moxie Docs MCP
โ˜… Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

๐Ÿ’ป Developer Tools2 views
C
Codebeamer Mcp

๐Ÿ“‡ โ˜๏ธ ๐ŸŽ ๐ŸชŸ ๐Ÿง - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

๐Ÿ’ป Developer Tools1 views
M
Magic MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

๐Ÿ’ป Developer Tools0 views
I
Ios Mcp Code Quality Server

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

๐Ÿ’ป Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.