Home / MCP / mcp-server-diff-typescript MCP Server

mcp-server-diff-typescript MCP Server

Provides unified diff generation between two text strings with context using MCP.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "mcp_server_diff_typescript": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-server-diff-typescript"
            ]
        }
    }
}

You can use this MCP server to generate unified diffs between two text strings. It provides a fast, context-rich comparison tool that helps you analyze changes and review text differences within your workflows.

How to use

You connect to the server from an MCP-capable client. Choose the stdio configuration to run the server locally, then call the tool to generate a unified diff between an old text and a new text. The tool adds three lines of context around each change to help you see surrounding code or content. Use this to review edits, patch proposals, or document revisions in a precise, reproducible way.

How to install

Prerequisites you need installed on your system before you run the MCP server: Node.js and npm.

Install the MCP server globally so you can access it from any project.

npm install -g mcp-server-diff-typescript

Or install it as a project dependency inside a specific project.

npm install mcp-server-diff-typescript

If you prefer to run from source, clone the project, install dependencies, and build the package. Then configure your MCP client to point at the built index.

git clone https://github.com/tatn/mcp-server-diff-typescript.git
cd mcp-server-diff-typescript
npm install
npm run build

Additional setup notes

To use with Claude Desktop, you configure the MCP server in your client’s MCP server list. You can run it via npx to load the package on demand or point directly to a built index for a local server.

Examples of running configurations

If you want to run via npx for quick testing, you can use the following stdio configuration in your client:
{
  "type": "stdio",
  "name": "mcp_server_diff_typescript",
  "command": "npx",
  "args": ["-y", "mcp-server-diff-typescript"]
}

If you build locally and want to run the built index directly with node, use this stdio configuration. Replace the path with the actual location of your built file:

{
  "type": "stdio",
  "name": "mcp_server_diff_typescript_build",
  "command": "node",
  "args": ["/path/to/mcp-server-diff-typescript/build/index.js"]
}

Available tools

get-unified-diff

Generates a unified diff between two text strings, returning the difference with three lines of context around changes using the diff package.