About Git Stuff Server
Git Stuff Server is a Node.js MCP server for retrieving the textual diff of a Git merge commit against its first parent. It is suited to clients that need to inspect merge changes through one focused tool.
Key features
- 01Generate a merge commit diff
- 02Compare against the first parent
- 03Return diff text to the client
Use cases
- 01Reviewing changes introduced by a merge
- 02Inspecting a merge commit from an MCP client
MCP support
Runs as an MCP server over stdio and provides the `get_git_merge_diff` tool. The tool accepts a merge commit hash and returns diff text.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEGit Stuff Server
This repository contains a Node.js application that acts as an MCP (Model Context Protocol) server to provide Git-related functionalities. Currently, it offers a tool to generate the diff for a Git merge commit against its first parent.
Features
- MCP Server: Runs as a standard MCP server using stdio for communication.
get_git_merge_diffTool:- Accepts a Git merge commit hash.
- Executes the
GenerateMergeDiff.ps1PowerShell script. - Returns the textual diff content generated by
git show -m --first-parent <commitHash>.
Prerequisites
- Node.js (Version supporting ES Modules, check
enginesin package.json if specified, otherwise checktsconfig.jsontarget - ES2022) - npm (usually comes with Node.js)
- Git installed and accessible in the system's PATH.
- PowerShell (Windows) or
pwsh(Linux/macOS) installed and accessible in the system's PATH.
Installation
- Clone the repository:
git clone <your-repo-url> cd GitStuffServer - Install dependencies:
npm install
Usage
-
Build the TypeScript code:
npm run buildThis compiles the TypeScript code from
src/to JavaScript inbuild/. -
Run the server:
- To run the compiled code:
npm start - To build and run in development mode:
npm run dev
- To run the compiled code:
The server will start and listen for MCP requests on standard input/output.
Using the get_git_merge_diff Tool
When connected via an MCP client, you can call the get_git_merge_diff tool with the following input:
commitHash(string): The Git commit hash (SHA) of the merge commit you want to diff.
The tool will return the diff content as text.
How it Works
- The MCP server (
src/index.ts) receives a request for theget_git_merge_difftool. - It validates the
commitHashinput. - It executes the
GenerateMergeDiff.ps1PowerShell script, passing thecommitHash. - The PowerShell script runs
git show -m --first-parent <commitHash>and saves the output (including any errors) to a temporary file namedmerge_changes.diffin the server's current working directory. - The Node.js server reads the content of
merge_changes.diff. - The server deletes the temporary
merge_changes.difffile. - The server returns the diff content (or an error message) to the MCP client.
Configuration
Key configuration points are defined as constants within src/index.ts:
SERVER_NAME: The name registered by the MCP server.SCRIPT_NAME: The filename of the PowerShell script to execute.OUTPUT_DIFF_FILE: The name of the temporary diff file created by the script.
License
This project is licensed under the MIT License - see the package.json file for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.