Skip to main content
Glama
tatn

MCP Server Diff Python

by tatn

mcp-server-diff-python

一个用于获取两个字符串之间文本差异的 MCP 服务器。该服务器利用 Python 标准库difflib高效生成并以统一 diff 格式提供两个文本之间的差异,非常适合文本比较和版本控制。

特征

工具

服务器提供一个单一工具:

  • get-unified-diff :以统一差异格式获取两段文本之间的差异

    • 参数:

      • string_a :用于比较的源文本(必需)

      • string_b :要比较的目标文本(必需)

    • 返回值:包含统一差异格式的字符串

Related MCP server: Git Stuff Server

用法

克劳德桌面

与 Claude Desktop 一起使用 要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

"mcpServers": {
  "mcp-server-diff-python": {
    "command": "uvx",
    "args": [
      "mcp-server-diff-python"
    ]
  }
}

或者添加以下配置:

git clone https://github.com/tatn/mcp-server-diff-python.git
cd mcp-server-diff-python
uv sync
uv build
"mcpServers": {
  "mcp-server-diff-python": {
    "command": "uv",
    "args": [
      "--directory",
      "path\\to\\mcp-server-diff-python",
      "run",
      "mcp-server-diff-python"
    ]
  }
}

发展

调试

您可以使用npx通过以下命令启动 MCP Inspector:

npx @modelcontextprotocol/inspector uvx mcp-server-diff-python
npx @modelcontextprotocol/inspector uv --directory path\to\mcp-server-diff-python run mcp-server-diff-python

Available Tools

1 tool
get-unified-diffB

Get the difference between two text articles in Unified diff format. Use this when you want to extract the difference between texts.

ParametersJSON Schema
NameRequiredDescriptionDefault
string_aYes
string_bYes

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the output format ('Unified diff format') but fails to describe critical behaviors such as error handling, performance characteristics, or any side effects. For a tool with two inputs and no annotation coverage, this leaves significant gaps in understanding how it operates beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured, consisting of two sentences that efficiently state the tool's purpose and usage context without any redundant information. Every sentence earns its place, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (comparing two texts) and the lack of annotations, output schema, and parameter descriptions, the description is incomplete. It does not explain what the Unified diff format entails, how differences are computed, or what the return values look like. This leaves too many unknowns for effective tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the input schema provides no descriptions for 'string_a' and 'string_b'. The description does not add any semantic details about these parameters, such as what they represent (e.g., original vs. modified text) or any constraints. This lack of compensation for the schema gap results in a low score, as users must guess parameter meanings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the difference between two text articles in Unified diff format.' It specifies the verb ('Get'), resource ('difference'), and output format ('Unified diff format'), which is specific and actionable. However, since there are no sibling tools, the description cannot demonstrate differentiation from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some guidance with 'Use this when you want to extract the difference between texts,' which implies the context for usage. However, it lacks explicit when-not-to-use scenarios or comparisons to alternatives (though none exist here). This makes it adequate but not comprehensive, fitting a baseline score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedget-unified-diff

TDQS

B3.1/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap with other tools, making it perfectly clear and distinct in purpose.

Naming Consistency5/5

The single tool name 'get-unified-diff' follows a consistent verb_noun pattern, and with no other tools to compare, there is no inconsistency.

Tool Count2/5

One tool is too few for a server named 'MCP Server Diff Python', which suggests a broader scope for diff operations, such as handling multiple diff formats or additional text comparison features.

Completeness2/5

The server is severely incomplete; it only provides a single diff tool, lacking obvious operations like applying diffs, comparing multiple texts, or supporting other diff formats, which are typical for diff-related domains.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    An 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
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A 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.
    6
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tatn/mcp-server-diff-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server