Metadata-Version: 2.4
Name: mcp-server-diff-python
Version: 0.1.2
Summary: This is an MCP server that gets the difference between two texts.
Project-URL: Homepage, https://github.com/tatn/mcp-server-diff-python
Project-URL: Repository, https://github.com/tatn/mcp-server-diff-python
Author: tatn
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11
Requires-Dist: mcp>=1.2.0
Description-Content-Type: text/markdown

# 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`

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

or Add the following configuration:

```json
git clone https://github.com/tatn/mcp-server-diff-python.git
cd mcp-server-diff-python
uv sync
uv build
```

```json
"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 [npx](https://docs.npmjs.com/cli/v11/commands/npx)with the following commands:

```bash
npx @modelcontextprotocol/inspector uvx mcp-server-diff-python
```

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

