# Diff Anything

> Diff Anything is a freemium MCP server for developer tools. Let an AI client compare local files, folders and API schemas with the Diff Anything CLI. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** macOS, Windows, CLI
- **Website:** https://martingruner.com/projects/diffanything
- **Repository:** https://github.com/martingryner/diff-anything-mcp
- **MCP Registry name:** io.github.MartinGryner/diff-anything
- **Categories:** developer tools, files and documents
- **Listing updated:** 2026-11-15

## About

This server does not do the comparing itself. It launches the installed Diff Anything command line as a child process, so you need the desktop app on macOS or Windows plus Node.js 22 or newer. On a Mac App Store install the sandbox blocks file access from the command line, so a free command-line helper is required; the Microsoft Store version provides the command through an app execution alias.

Safety comes from DIFF_ANYTHING_ROOTS, a required JSON array of absolute directories the server may compare; until it is set only discovery works, and the README suggests a dedicated folder. Folder and API schema comparisons need Diff Anything Pro, while the free CLI allows plain-text and JSON comparisons within daily and file-size limits. The check_api_compatibility tool needs a CLI that supports --fail-on breaking and otherwise returns update_required.

The desktop product itself compares code, spreadsheets, databases, PDFs, images and archives, which gives the assistant more than plain text diffs to work with.

## Features

- **Local-only comparison:** Compares files under directories you whitelist.
- **Folder comparison:** Compares folders, with Pro.
- **API schema checks:** check_api_compatibility can flag breaking schema changes.
- **Rooted access:** DIFF_ANYTHING_ROOTS limits which paths the server can touch.
- **Pinned npm package:** Runs via npx with a pinned version or a global install.
- **Windows and macOS:** Works with the Store or direct app installs.

## Good for

- Ask an assistant what changed between two config files
- Compare two project folders
- Check an API schema change for breaking edits
- Review JSON differences without sharing files online
- Run comparisons from a Claude Code session

## Install

### Claude Code (Terminal)

```sh
claude mcp add diff-anything --env DIFF_ANYTHING_ROOTS='<DIFF_ANYTHING_ROOTS>' -- npx -y @grunersoftware/diff-anything-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "diff-anything": {
      "command": "npx",
      "args": [
        "-y",
        "@grunersoftware/diff-anything-mcp"
      ],
      "env": {
        "DIFF_ANYTHING_ROOTS": "<DIFF_ANYTHING_ROOTS>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "diff-anything": {
      "command": "npx",
      "args": [
        "-y",
        "@grunersoftware/diff-anything-mcp"
      ],
      "env": {
        "DIFF_ANYTHING_ROOTS": "<DIFF_ANYTHING_ROOTS>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "diff-anything": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@grunersoftware/diff-anything-mcp"
      ],
      "env": {
        "DIFF_ANYTHING_ROOTS": "<DIFF_ANYTHING_ROOTS>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "diff-anything": {
      "command": "npx",
      "args": [
        "-y",
        "@grunersoftware/diff-anything-mcp"
      ],
      "env": {
        "DIFF_ANYTHING_ROOTS": "<DIFF_ANYTHING_ROOTS>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "diff-anything": {
      "command": "npx",
      "args": [
        "-y",
        "@grunersoftware/diff-anything-mcp"
      ],
      "env": {
        "DIFF_ANYTHING_ROOTS": "<DIFF_ANYTHING_ROOTS>"
      }
    }
  }
}
```

## Tools

- `check_api_compatibility`: Checks API schemas for breaking changes; needs a CLI supporting --fail-on breaking.

## FAQ

### Do I need the desktop app?

Yes. The server calls the installed Diff Anything command line.

### Which comparisons are free?

The free CLI allows plain-text and JSON comparisons within daily and size limits; folders and schemas need Pro.

### Which Node version?

Node.js 22 or newer.

### Why does the Mac App Store version not work?

Its sandbox cannot read files named on a command line, so install the free command-line helper.

### Is Diff Anything free?

Diff Anything has a free plan, with paid plans for more usage or features.

### How do I add Diff Anything to Claude Code?

Run this command in your terminal: claude mcp add diff-anything --env DIFF_ANYTHING_ROOTS='<DIFF_ANYTHING_ROOTS>' -- npx -y @grunersoftware/diff-anything-mcp

### What are the best alternatives to Diff Anything?

The closest alternatives to Diff Anything are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/diff-anything
