A deep JSON comparison tool that lets Claude spot differences between two JSON strings regardless of property order or nesting level. Uses a recursive algorithm to detect missing keys, extra keys, value mismatches, and type mismatches at any depth, returning detailed reports with exact paths like "root.user.settings.theme" for each difference. Handles arrays order-independently and provides summary counts. You'd reach for this when debugging API responses, validating configuration changes, or checking data transformations where standard diff tools choke on reordered properties. The compare_json tool takes two JSON strings directly rather than file paths, making it straightforward to use in conversation without filesystem access.
Derinlemesine ve sıra-bağımsız JSON karşılaştırma MCP tool'u
İki JSON dosyasını akıllıca karşılaştırın, farklılıkları tespit edin!
root.user.settings.theme)git clone https://github.com/yourusername/json-compare-mcp.git
cd json-compare-mcp
pip install -r requirements.txt
python server.py
python test_compare.py
json-compare-mcp/
├── 🐍 app.py # JSON karşılaştırma implementasyonu
├── 🚀 server.py # MCP server yapılandırması
├── 🧪 test_compare.py # Test suite
├── 📋 requirements.txt # Python bağımlılıkları
├── 🐳 Dockerfile # Container yapılandırması
├── ⚙️ smithery.yaml # Smithery deployment config
└── 📁 test_samples/ # Örnek JSON dosyaları
├── file1.json
├── file2.json
└── file3_different.json
compare_json# İki JSON string'ini karşılaştır
compare_json(
json1='{"name": "Ahmet", "age": 30, "city": "Istanbul"}',
json2='{"age": 30, "city": "Istanbul", "name": "Ahmet"}'
)
Not: Artık dosya yolu değil, direkt JSON string kullanın!
{
"status": "different",
"total_differences": 11,
"differences": [
{
"type": "missing_key",
"path": "root.user.settings.language",
"key": "language",
"file1_value": "tr",
"message": "Key 'language' exists in file1 but missing in file2"
},
{
"type": "value_mismatch",
"path": "root.user.name",
"file1_value": "Ahmet Yılmaz",
"file2_value": "Mehmet Demir",
"message": "Value mismatch at 'root.user.name'"
}
],
"summary": {
"missing_keys": 1,
"extra_keys": 2,
"value_mismatches": 8,
"type_mismatches": 0
}
}
| Tip | Açıklama |
|---|---|
missing_key | Anahtar file1'de var, file2'de yok |
extra_key | Anahtar file2'de var, file1'de yok |
value_mismatch | Değerler farklı |
type_mismatch | Veri tipleri farklı |
python test_compare.py
identicalidentical✅ Test 1 - Sıra-bağımsız: BAŞARILI
✅ Test 2 - Farklılık tespiti: BAŞARILI
✅ Test 3 - Aynı dosya: BAŞARILI
🔍 Test 2 Detayları:
- Eksik anahtarlar: 1
- Fazla anahtarlar: 2
- Değer uyuşmazlıkları: 8
- Tip uyuşmazlıkları: 0
- Toplam fark: 11
app.py dosyasına yeni fonksiyon ekle:
def myNewTool(param: str) -> str:
# Your logic
return result
server.py dosyasına MCP tool olarak kaydet:
@mcp.tool()
async def my_new_tool(param: str) -> str:
"""Tool açıklaması"""
return myNewTool(param)
docker build -t json-compare-mcp .
docker run -p 8000:8000 json-compare-mcp
pip install -r requirements.txt
python server.py
MIT License - Detaylar için LICENSE dosyasına bakın.
Made with ❤️ for better JSON comparison
Sıra-bağımsız, derinlemesine, güvenilir 🚀
com.mcparmory/google-sheets
domdomegg/google-sheets-mcp
henilcalagiya/google-sheets-mcp
cct15/war-dashboard-data
moooonad/mcp-google-sheets-full
io.github.br0ski777/csv-to-json