Leverages Python's difflib library to generate differences between two texts in Unified diff format.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server Diff Pythoncompare these two code snippets and show me the differences"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: MCP Server Diff TypeScript
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
or Add the following configuration:
Development
Debugging
You can start the MCP Inspector using npxwith the following commands: