Get the FREE Ultimate OpenClaw Setup Guide →

mcp -diff-typescript

MCP server from tatn/mcp-server-diff-typescript

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tatn-mcp-server-diff-typescript npx -y mcp-server-diff-typescript

How to use

This MCP server provides a dedicated tool called get-unified-diff that generates a unified diff between two text strings. The tool accepts two required parameters: oldString and newString. It uses the diff package internally to compute differences and returns the result in standard unified diff format, including three lines of context around changes to help identify modifications in context. To access the server, configure it in your MCP client (or Claude/Inspector tooling) so requests are routed to the server name mcp-server-diff-typescript. You can also run the server locally via npx or by building from source and invoking the built entry point, then connect to it through the MCP protocol as described in the README configuration examples.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Basic familiarity with npm package installation

Installation options:

  1. Global installation (quick start):
npm install -g mcp-server-diff-typescript

This makes the server available for direct use via the mcp protocol as a global command when configured in your MCP client.

  1. Local/project installation (recommended for development):
mkdir my-mcp-project
cd my-mcp-project
npm install mcp-server-diff-typescript

Then run/build as needed (depending on your workflow) and point your MCP clients to the built server script (see build instructions below).

Build (if you clone from source and want a built index):

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

After building, you can reference the built index.js in your MCP configuration (see the provided examples).

Additional notes

Notes and tips:

  • The primary tool get-unified-diff expects two strings: oldString and newString. Ensure they are properly escaped if coming from JSON or CLI inputs.
  • The server uses the diff package to compute differences; if you need larger context or different diff algorithms, consider customization in your local build.
  • If using Claude Desktop or Inspector tooling, you can run the server by npx mcp-server-diff-typescript and connect via the inspector as shown in the debugging examples.
  • When using npx, the -y flag bypasses prompts during installation; ensure you have network access to fetch the package.
  • If you run into path issues after build, ensure the index.js path in your MCP config correctly points to the built file (e.g., /path/to/mcp-server-diff-typescript/build/index.js).
  • No environment variables are required by default; if you add custom environment configuration, document the VAR_NAME and purpose in env in the mcp_config.

Related MCP Servers

Sponsor this space

Reach thousands of developers