Unified Diff MCP Server logo

Unified Diff MCP Server

Community
gorosun

Beautiful HTML and PNG diff visualization using diff2html, designed for filesystem edit_file dry-run output with high-performance Bun runtime.

Publishergorosun
Repositoryunified-diff-mcp
LanguageTypeScript
Forks
7
Stars
12
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    Unified Diff MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    12 stars and 7 forks from the linked repository.

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.

✨ 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

bash
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:
    bash
    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:
    bash
    export GITHUB_TOKEN="your_token_here"

Claude Desktop Configuration

macOS:

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

Windows:

bash
code %APPDATA%\Claude\claude_desktop_config.json

Configuration template:

json
{
  "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):

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

Production mode:

json
{
  "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

Use Unified Diff MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Unified Diff MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Unified Diff MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Unified Diff MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "unified-diff-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Unified Diff MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Unified Diff MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Unified Diff MCP Server to help me with this task?
Unified Diff MCP Server
Sure. I read it.
Here is what I found using Unified Diff MCP Server.

Frequently asked questions

What is the Unified Diff MCP Server MCP server used for?

Unified Diff MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Unified Diff MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Unified Diff MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Unified Diff MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Unified Diff MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Unified Diff MCP Server MCP to TypingMind?

Unified Diff MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Unified Diff MCP Server MCP provide in TypingMind?

Unified Diff MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Unified Diff MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Unified Diff MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇