beyondcompare-mcp
Enables file comparison, folder diffing, 3-way merging, folder sync, and scripted automation through MCP.
README
Beyond Compare MCP Server
Model Context Protocol (MCP) server for Beyond Compare, the powerful file and folder comparison tool for Windows. Enables file comparison, folder diffing, 3-way merging, folder sync, and scripted automation through MCP.
Features
- File Comparison: Compare two files with binary, text, hex, or rules-based analysis
- Folder Comparison: Diff entire directory trees with optional file filters
- 3-Way Merge: Merge files with base/left/right and auto-merge support
- Folder Sync: Synchronize directory contents between locations
- Script Automation: Run Beyond Compare scripts for batch operations
- Rich Exit Codes: Structured results (same, different, similar, conflicts)
Prerequisites
Windows Only - Beyond Compare 5 must be installed:
- Install via winget:
winget install ScooterSoftware.BeyondCompare.5 - Or download: https://www.scootersoftware.com/download
- Verify BComp.com is available at the default path or set
BCOMP_PATH
Installation
From Source
git clone https://github.com/danielsimonjr/beyondcompare-mcp.git
cd beyondcompare-mcp
npm install
Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"beyondcompare-mcp": {
"command": "node",
"args": ["C:\\mcp-servers\\beyondcompare-mcp\\index.js"]
}
}
}
Claude Code
Add to your ~/.claude/.mcp.json:
{
"mcpServers": {
"beyondcompare-mcp": {
"command": "node",
"args": ["C:\\mcp-servers\\beyondcompare-mcp\\index.js"]
}
}
}
Custom BComp.com Path
If Beyond Compare is installed in a non-default location, set the BCOMP_PATH environment variable:
{
"mcpServers": {
"beyondcompare-mcp": {
"command": "node",
"args": ["C:\\mcp-servers\\beyondcompare-mcp\\index.js"],
"env": {
"BCOMP_PATH": "D:\\Programs\\Beyond Compare 5\\BComp.com"
}
}
}
}
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"beyondcompare-mcp": {
"command": "node",
"args": ["C:\\mcp-servers\\beyondcompare-mcp\\index.js"]
}
}
}
Available Tools
1. compare_files
Compare two files using Beyond Compare. Returns whether files are identical, similar, or different.
Parameters:
left(required): Path to the left (source) fileright(required): Path to the right (target) filefileViewType(optional): Comparison type —text,hex,table,mp3,picture,registry,versionsilent(optional): Quick comparison without GUI (default: true)readOnly(optional): Open files as read-only (default: false)
Example:
{
"left": "C:\\project\\old\\config.json",
"right": "C:\\project\\new\\config.json",
"silent": true
}
Returns: SAME, SIMILAR, DIFFERENT, or ERROR with Beyond Compare exit code details.
2. compare_folders
Compare two folders and report differences in contents.
Parameters:
left(required): Path to the left (source) folderright(required): Path to the right (target) folderfilters(optional): File filter pattern (e.g.,*.js;*.tsor-*.log)silent(optional): Quick comparison without GUI (default: true)
Example:
{
"left": "C:\\project\\v1\\src",
"right": "C:\\project\\v2\\src",
"filters": "*.ts;*.tsx",
"silent": true
}
3. merge_files
Perform a 3-way merge with base, left, and right files.
Parameters:
left(required): Path to the left fileright(required): Path to the right filecenter(required): Path to the center (base/ancestor) fileoutput(required): Path for the merged output fileautomerge(optional): Auto-merge non-conflicting changes (default: false)reviewConflicts(optional): Open GUI if automerge finds conflicts (default: false)favorLeft(optional): Favor left side for conflicts (default: false)favorRight(optional): Favor right side for conflicts (default: false)
Example:
{
"left": "C:\\merge\\mine.txt",
"right": "C:\\merge\\theirs.txt",
"center": "C:\\merge\\base.txt",
"output": "C:\\merge\\result.txt",
"automerge": true,
"reviewConflicts": true
}
Returns: SUCCESS, CONFLICTS, or ERROR.
4. sync_folders
Open a Folder Sync session to synchronize two directories.
Parameters:
left(required): Path to the left (source) folderright(required): Path to the right (target) folderfilters(optional): File filter pattern (e.g.,-node_modules;-.git)
Example:
{
"left": "C:\\source\\project",
"right": "D:\\backup\\project",
"filters": "-node_modules;-.git;-dist"
}
5. run_script
Run a Beyond Compare script file for automated batch operations.
Parameters:
scriptPath(required): Path to the Beyond Compare script filesilent(optional): Run without showing a window (default: true)closeWhenDone(optional): Close script window when finished (default: true)
Example:
{
"scriptPath": "C:\\scripts\\nightly-backup-compare.txt"
}
Sample script file (nightly-backup-compare.txt):
folder-report layout:side-by-side &
options:display-mismatches &
output-to:"C:\reports\diff-report.html" output-options:html-color &
"C:\source" "C:\backup"
Exit Codes
Beyond Compare returns meaningful exit codes that the MCP server translates:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Binary same |
| 2 | Rules-based same |
| 11 | Binary differences |
| 12 | Similar |
| 13 | Rules-based differences |
| 14 | Conflicts detected |
| 100 | Error |
| 101 | Conflicts detected, merge output not saved |
Usage Examples
Example 1: Check if Two Config Files Match
Tell Claude:
Compare my dev and prod config files to see if they're in sync
Example 2: Diff Two Project Versions
Tell Claude:
Compare the src folders between v1 and v2 of my project, only looking at TypeScript files
Example 3: Auto-Merge a Git Conflict
Tell Claude:
Merge these three versions of the file — base, mine, and theirs — and auto-resolve what you can
Example 4: Run a Backup Comparison Script
Tell Claude:
Run my nightly backup comparison script at C:\scripts\backup-check.txt
How It Works
- Beyond Compare CLI: BC exposes
BComp.com(console) andBComp.exe(GUI) for command-line operations - MCP Server: Wraps
BComp.comand translates arguments into CLI calls - Exit Code Parsing: Rich exit codes are mapped to human-readable verdicts (SAME, DIFFERENT, SIMILAR, CONFLICTS)
- Timeout Management: Operations have appropriate timeouts (60s files, 120s folders, 300s merge/sync, 600s scripts)
Troubleshooting
Beyond Compare Not Found
Error: Failed to execute BComp.com
Solutions:
- Verify Beyond Compare 5 is installed:
winget list ScooterSoftware.BeyondCompare.5 - Check the default path:
C:\Users\<username>\AppData\Local\Programs\Beyond Compare 5\BComp.com - Set
BCOMP_PATHenvironment variable in your MCP config
Timeout on Large Comparisons
Issue: Folder comparisons or syncs time out
Solution: For very large directory trees, use filters to narrow the scope, or use run_script with a Beyond Compare script that has more control over the operation.
License Required
Beyond Compare requires a license for full functionality. A 30-day trial is available. Without a license, some features may be limited.
Development
# Clone repository
git clone https://github.com/danielsimonjr/beyondcompare-mcp.git
cd beyondcompare-mcp
# Install dependencies
npm install
# Test locally
node index.js
Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
MIT License - see LICENSE file for details.
Acknowledgments
- Beyond Compare by Scooter Software
- Model Context Protocol by Anthropic
Links
- GitHub Repository: https://github.com/danielsimonjr/beyondcompare-mcp
- Beyond Compare: https://www.scootersoftware.com/
- MCP Documentation: https://modelcontextprotocol.io
Made with care for the MCP community
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。