@mukundakatta/diff-mcp
v0.1.1
Published
MCP server: structured text diff (line/word/char) between two strings.
Maintainers
Readme
diff-mcp
MCP server: structured line-by-line diff between two strings. Returns each
line tagged eq, add, or del, plus an optional unified-diff style
rendered string. Pure JS — no git required.
Tool
diff
{ "a": "a\nb\nc", "b": "a\nB\nc", "unified": true }→
{
"entries": [
{ "op": "eq", "text": "a" },
{ "op": "del", "text": "b" },
{ "op": "add", "text": "B" },
{ "op": "eq", "text": "c" }
],
"unified": " a\n-b\n+B\n c"
}Built on Myers' LCS — O(n*m) — fine for typical inputs (a few thousand lines each side). For very large blobs, chunk first.
Configure
{ "mcpServers": { "diff": { "command": "npx", "args": ["-y", "@mukundakatta/diff-mcp"] } } }License
MIT.
