mcp -diff-python
MCP server from tatn/mcp-server-diff-python
claude mcp add --transport stdio tatn-mcp-server-diff-python uvx mcp-server-diff-python
How to use
This MCP server exposes a single tool named get-unified-diff. It compares two input strings and returns their differences in Unified diff format, using Python's standard library difflib under the hood. You pass string_a as the source text and string_b as the target text, and you receive a diff-like string showing additions, deletions, and context lines. This is useful for lightweight text comparison, versioning, or feeding into tooling that consumes diffs.
To use it with Claude Desktop, configure your MCP server by pointing Claude to the UV-based runner for this Python package. The server is designed to be run via uvx (or uv) from the repository and then referenced by its MCP name (mcp-server-diff-python). The tooling entry get-unified-diff accepts two required arguments: string_a and string_b. Use these to obtain the unified-diff between the two texts and display or process the result in your workflow.
How to install
Prerequisites:
- Python 3.8+ (for the Python-based server code and standard library difflib)
- Node.js (for the MCP inspector tooling, optional but used in examples)
- uv or uvx tooling installed (to run the MCP server via the UV ecosystem)
- Git (to clone the repository)
Install and run locally:
# Clone the repository
git clone https://github.com/tatn/mcp-server-diff-python.git
cd mcp-server-diff-python
# Install/run using uvx (preferred for Python-based MCP servers)
# Ensure uvx is installed and available in your PATH
uvx mcp-server-diff-python
Alternative (using uv with a project directory):
uv --directory path/to/mcp-server-diff-python run mcp-server-diff-python
If you prefer a more manual approach, you can install dependencies as needed and run the Python module directly, but this repository is designed to be used with the UV tooling described above.
Note: The README examples assume you have the UV tooling set up for Python MCP servers and that the package name matches the repository identifier (mcp-server-diff-python).
Additional notes
Tips and notes:
- The server returns a string in Unified diff format. If you need to parse it programmatically, consider post-processing the diff text or using a Python library to interpret diffs.
- Ensure your environment variables (if any) required by your specific setup are documented in the environment where you run uvx/uv (e.g., UV directories, workspace paths).
- When debugging with the MCP Inspector, you can use the commands shown in the README to start the inspector against the mcp-server-diff-python server to inspect requests and responses.
- If you switch from uvx to uv, remember to adjust the command and arguments to reflect the runner you’re using (package name vs. directory-based run).
- No external API keys are required for the core functionality; it relies on Python’s difflib in the standard library.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP