MCP Server Diff TypeScript
mcp-server-diff-typescript MCP 服务器
提供统一差异生成功能的模型上下文协议服务器。
这个基于 TypeScript 的 MCP 服务器实现了一个 diff 生成系统。它提供了一个工具来生成两个文本字符串之间的统一 diff,这对于比较和分析文本差异非常有用。
特征
工具
get-unified-diff- 在两个文本字符串之间生成统一的差异将
oldString和newString作为必需参数以统一差异格式返回差异
使用
diff包进行精确的差异检测包含 3 行有关变更的背景信息
Related MCP server: Git Stuff Server
安装
作为一个全球包裹
npm install -g mcp-server-diff-typescript作为项目依赖项
npm install mcp-server-diff-typescript用法
与 Claude Desktop 一起使用
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"mcp-server-diff-typescript": {
"command": "npx",
"args": [
"-y",
"mcp-server-diff-typescript"
]
}
}或者添加以下配置:
git clone https://github.com/tatn/mcp-server-diff-typescript.git
cd mcp-server-diff-typescript
npm install
npm run build"mcpServers": {
"mcp-server-diff-typescript": {
"command": "node",
"args": [
"/path/to/mcp-server-diff-typescript/build/index.js"
]
}
}调试
要调试 MCP 服务器:
npx @modelcontextprotocol/inspector npx -y mcp-server-diff-typescriptnpx @modelcontextprotocol/inspector node /path/to/mcp-server-diff-typescript/build/index.jsAvailable Tools
1 toolget-unified-diffB
Get the difference between two text articles in Unified diff format.
Inputs: oldString (required), newString (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as generating unified diffs between text articles, making it impossible to confuse with other tools.
The single tool name 'get-unified-diff' follows a clear verb-noun pattern (get + unified_diff). With only one tool, consistency is inherently perfect as there are no other names to compare against.
A single tool is generally too few for most server purposes, as it limits functionality and scope. While this server focuses narrowly on diff generation, having only one tool feels thin and may not cover related operations like diff analysis or formatting options.
The tool provides a core diff generation function, but the surface is notably incomplete. There are obvious gaps, such as no tools for comparing files, handling different diff formats, or managing diff history, which limits the server's utility for broader text comparison tasks.
Related MCP Connectors
Diff two texts by line, word or char: unified diff, HTML redline, patch apply, similarity.
Semantic, structured or strict diffs of pages and documents, inline or from URLs.
Cloudflare Workers MCP server: diff-patch-tools
Exact text tools for AI agents: unified diff, patch apply, regex testing, grapheme counting.
Related MCP Servers
- AlicenseBqualityDmaintenanceThis MCP server provides unified diffs of two text inputs using Python's standard library difflib.19MIT
- AlicenseCqualityDmaintenanceMCP server providing Git-related functionalities, primarily a tool to generate diffs for Git merge commits against their first parent.4MIT
- FlicenseCqualityDmaintenanceAn efficient MCP server for performing accurate, deep comparisons between JSON objects or strings using the deepdiff engine. It provides AI agents with standardized difference reports, supporting nested structures and various input formats to ensure precise data analysis.1-
- AlicenseNot gradedqualityBmaintenanceA high-performance Model Context Protocol server that provides text diffing capabilities, enabling LLMs to compare two blocks of text and receive differences in unified diff format.6Apache 2.0