SuperAPI AI Directory

unified-diff-mcp

unified-diff-mcp is an MCP (Model Context Protocol) server tool for Claude Desktop, mainly used to convert code diffs into beautiful visual comparisons. It generates HTML diff views based on diff2html and supports instant sharing via GitHub Gist or output to local files (PNG/HTML). The project uses the Bun runtime, offers cross-platform support (Windows, macOS, Linux), and provides multi-level security protection and automatic deletion of temporary diffs, making it suitable for intuitively viewing code changes in AI-assisted programming workflows.

Open website

About this tool

Purpose

unified-diff-mcp is an MCP server designed for Claude Desktop, used to turn code diffs into beautiful visual comparison pages. It helps developers view and understand code changes in a more intuitive way when collaborating with AI assistants.

Main Capabilities

  • Uses diff2html to generate beautiful HTML diff visualization pages.
  • Integrates GitHub Gist, allowing diffs to be shared instantly.
  • Supports local file output, including PNG and HTML formats.
  • Provides automatic deletion for temporary diffs.
  • Cross-platform support: Windows, macOS, Linux.
  • Based on the Bun runtime, with high-performance characteristics.
  • Provides multi-level security protection (low/medium/high), enhancing security for shared diff scenarios.
  • When a GitHub Token is unavailable, supports fallback to local file handling (saved as temporary HTML, automatically opens the browser, manages files based on security level).

Usage

Can be installed via Smithery, or manually:

  1. Install Claude Desktop and Bun.
  2. Clone and build the project: git clone https://github.com/gorosun/unified-diff-mcp.git cd unified-diff-mcp bun install
  3. Configure Claude Desktop (see the configuration section in the project for details).

During configuration, environment variables can be set, and a GitHub Token is required to enable the Gist sharing feature:

  • Go to GitHub Settings > Personal Access Tokens to generate a new token with gist permissions.
  • Add to the environment: export GITHUB_TOKEN="your_token_here"

Development mode supports hot reload, and production mode is used for formal operation. The project provides detailed setup and integration guides in English and Japanese (CLAUDE_CODE_INTEGRATION.md and CLAUDE_CODE_INTEGRATION_JP.md).

Suitable Scenarios

  • Collaborating with AI in Claude Desktop to view code diffs.
  • Needing to share code diffs visually with others.
  • Wanting to output diffs as local files for archiving or display.

Limitations

  • Official materials do not provide specific charging information, so it is not available for now.
  • Official materials do not provide pricing information, so it is not available for now.
  • Mainly aimed at Claude Desktop, while also supporting MCP clients such as Claude Code, VS Code + MCP extension, and Cline, but specific compatibility details are not available for now.
  • Uses the MIT license; see the LICENSE file for details.