MCP Server Diff Python

by tatn

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Leverages Python's difflib library to generate differences between two texts in Unified diff format.

mcp-server-diff-python

2つの文字列間のテキスト差分を取得するためのMCPサーバーです。このサーバーはPythonの標準ライブラリdifflibを活用し、2つのテキスト間の差分をUnified diff形式で効率的に生成・提供します。テキスト比較やバージョン管理に最適です。

特徴

ツール

サーバーは次の単一のツールを提供します:

  • get-unified-diff : 2つのテキストの差分をUnified diff形式で取得する
    • 引数:
      • string_a : 比較するソーステキスト(必須)
      • string_b : 比較する対象テキスト(必須)
    • 戻り値: 差分をUnified diff形式で格納した文字列

使用法

クロードデスクトップ

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 インスペクターを起動できます。

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

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

この MCP サーバーは、Python の標準ライブラリ difflib を使用して、2 つのテキスト入力の統合された diff を提供します。

  1. Features
    1. Tools
  2. Usage
    1. Claude Desktop
  3. Development
    1. Debugging
ID: qbwsx2g4vd