
Diff Anything
io.github.MartinGrynerPublished by GitHub account MartinGrynerv0.1.0Updated Oct 29, 2026
Compare local files, folders and API schemas through the installed Diff Anything CLI.
Overview
Wraps the installed Diff Anything CLI so an assistant can compare local files, folders and API schemas and read the resulting diff reports.
- What you can do
- Discover the installed CLI version, supported flags, configured roots and wrapper limits
- Compare two files by absolute path and return the CLI's auto-detected diff report
- Compare two folders and return the default folder comparison report
- Check API schema compatibility between two schema files, flagging breaking changes
- When to use it
- Useful when you want an assistant to inspect differences between local documents, JSON files, directory trees or API schemas without copying content into the chat, and you already use the Diff Anything desktop app.
- Requirements
- Node.js 22 or newer on macOS or Windows, plus an installed Diff Anything app with its command line (on macOS the separate command-line helper; on Windows the Store app execution alias). DIFF_ANYTHING_ROOTS is required: a JSON array of absolute existing directories the server may compare. Folder and API schema comparisons need Diff Anything Pro. DIFF_ANYTHING_CLI optionally points at the executable. Registry access is needed to install the npm package.
Installation
In SourceWeft
- Open Diff Anything in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Diff Anything MCP
Use the installed Diff Anything command line from an MCP client to compare local files, folders, and API schemas. The optional npm package runs over stdio as a child process of your client.
Requirements and setup
- Node.js 22 or newer on macOS or Windows.
- An installed Diff Anything app with its command line. Install the app from the product page. On Windows, the Microsoft Store version provides the command line through its
diff-anything.exeapp execution alias. On a Mac, the Mac App Store version is sandboxed and cannot read files named on a command line, so install the free Diff Anything command-line helper, which installs/usr/local/bin/diff-anything. - Folder and API schema comparisons require Diff Anything Pro. The CLI checks the app's locally cached entitlement; open the desktop app to purchase or restore Pro. The Free CLI permits plain-text and JSON comparisons, subject to its daily and file-size limits.
check_api_compatibilityrequires a CLI whose help includes--fail-on breaking. Discovery checks the installed binary; an older app returnsupdate_requiredfor this tool.
Your MCP client starts the server with npx, which downloads the pinned version on first use; nothing else needs installing. In Claude Code:
In clients configured with JSON, the server entry is:
To run without fetching from npm at startup, install a pinned version globally and use the diff-anything-mcp command instead:
Set DIFF_ANYTHING_ROOTS in your client's server configuration to a JSON array of existing absolute directories that the server may compare. Until this is configured, only discovery works. Start with a dedicated directory containing files you intend to share with your client.
macOS discovery checks the command-line helper at /usr/local/bin/diff-anything, then /Applications/Diff Anything.app/Contents/MacOS/diff-anything, the same bundle in ~/Applications, and absolute entries on PATH. A Mac App Store copy of the app is skipped, because its own executable cannot read the files; without the helper, tools return helper_required with the helper's download page. Windows discovery checks %LOCALAPPDATA%\Microsoft\WindowsApps\diff-anything.exe and PATH. The Microsoft Store package declares that app execution alias; enable it in Windows settings if it is disabled. For a direct install or another location, set DIFF_ANYTHING_CLI to the absolute executable path. Never use a shell command or arguments in that variable.
VS Code
For a workspace configuration, create .vscode/mcp.json:
If your client cannot find the global command, use the absolute path to Node as command and the absolute path to the installed package's src/index.mjs as the single entry in args. This also avoids Windows clients that cannot directly launch npm's .cmd shim. npm root --global identifies the global package directory.
Clients using mcpServers
For a client such as Claude Code that accepts a project .mcp.json, use the same server entry under mcpServers. This Windows example launches Node directly:
Replace example paths with your actual installation and comparison directories. Restart or reload the server in your client, then call discover_capabilities first. Setup references: VS Code MCP configuration and MCP SDK host setup.
Tools
Example input:
Exit 1 is a completed comparison result, not a server failure. For file and folder comparisons it sets countedDifferences; for API checks it makes compatibilityCheckPassed false. Review the CLI report and its warnings: a failed compatibility check can mean a breaking or unclassified change. A comparison is not proof that a backup is complete or an API is compatible in every respect.
The wrapper returns the CLI report without rewriting its values or removing its masking. There are no tool arguments for raw CLI flags, disabling masking, overriding Pro, merging, batch manifests or writing report files. Errors use isError with a code such as missing_app, helper_required, pro_required, update_required, outside_roots, timeout or output_limit and the CLI's explanation where available.
Local processing and permissions
Diff Anything performs its comparisons locally and sends none of your data to an AI model. The npm wrapper has no hosted runtime, account, API key, HTTP listener or required network connection at runtime. Installing packages requires registry access; launching the installed package directly avoids an npm fetch at startup.
Your MCP client controls what happens to returned tool output. Comparison results can include filenames, paths, document content and changed values. A client may send that output to its model provider or store it. Configure that client's data handling and tool approvals before comparing sensitive files. Existing CLI masking is not a universal secret scanner.
Tools leave compared files unchanged. The CLI can update its local free-comparison usage ledger and read its cached Pro entitlement. The server inherits your process permissions and environment. Allowed roots validate resolved input paths, including symlinks. Folder inputs are scanned before comparison and reject nested symbolic links, junctions and special files, because the CLI can follow links. This validation is capped at 100,000 entries and 60 seconds per tree. These are application-level guards, not an OS sandbox or protection against another process changing files during a comparison. Use local, stable directories; network mounts or cloud placeholders may perform I/O through the operating system.
Each CLI invocation has a 60-second timeout and a combined stdout/stderr limit of 1 MiB. Output beyond the limit is discarded and the process is stopped; a partial report is never presented as complete. One tool request runs at a time; overlapping requests return busy. Client cancellation stops the active CLI child. Large comparisons should be narrowed into smaller pairs.
Development
Tests exercise the actual MCP stdio transport with a fixture CLI, argument validation, platform discovery paths, allowed roots, symlink escape rejection, Pro errors, cancellation and output limits. A real installed app is needed to verify platform packaging and entitlement behavior end to end.
Source: README.md at commit 8d1a4e8
Tools
0Version history
1- v0.1.0LatestOct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts