Skip to main content

mcp-server-diff-python

An MCP server for obtaining text differences between two strings. This server leverages Python's standard library difflib to efficiently generate and provide differences between two texts in Unified diff format, making it ideal for text comparison and version control purposes.

Features

Tools

The server provides a single tool:

  • get-unified-diff: Get differences between two texts in Unified diff format
    • Arguments:
      • string_a: Source text for comparison (required)
      • string_b: Target text to compare against (required)
    • Return value: A string containing the differences in Unified diff format

Usage

Claude Desktop

Using with Claude Desktop To use with Claude Desktop, add the server config:

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

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

or Add the following configuration:

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"
    ]
  }
}

Development

Debugging

You can start the MCP Inspector using npxwith the following commands:

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

Metadata

Release files for mcp-server-diff-python 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-diff-python 0.1.2
File Size Uploaded
mcp_server_diff_python-0.1.2.tar.gz 52.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-diff-python 0.1.2
File Interpreter ABI Platform
mcp_server_diff_python-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 55.6 kB

Release files / mcp_server_diff_python-0.1.2.tar.gz

Download URL mcp_server_diff_python-0.1.2.tar.gz
Size 52.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b05d2ec4183938e190f55800d99e1b13933c412eaddb6fcc3e6be392fc49f63d
BLAKE2b-256 checksum
How to use checksums
728b892d250c83206ae583e3f738cbab6c32a76026542355059e2cf40c86961f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.18

Release files / mcp_server_diff_python-0.1.2-py3-none-any.whl

Download URL mcp_server_diff_python-0.1.2-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fab2bcf1e57a5f0aa6de810b9159e0752894af183811e55ec90827165231ede7
BLAKE2b-256 checksum
How to use checksums
8a846556a976ad106dc431a79cefeeb27cddd4c56654a1e7b4c38d6634fe4e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.18

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page