Skip to content
MCP server
Registry

git-history MCP Server

Give AI agents Git history tools: commit search, file history, blame, contributors, ref diffs.

git-history scores 44 (Fair), licensed MIT and written in JavaScript. It installs as a local process. It does not declare tools yet. Filed under Version control. GitHub shows 0 stars. Package registries report about 52 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by tonyweckstrom1987MITJavaScript0 stars
Trust score
44Fair
Trust score 44 of 100, Fair

Fair trust

44 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 44 comes from

0 + 20 + 3 + 10 + 4 + 7 = 44. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity3 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 3 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "tonyweckstrom1987-mcp-server-git-history": {      "command": "npx",      "args": [        "-y",        "mcp-server-git-history@1.1.1"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

mcp-server-git-history

npm version CI License: MIT

Uusin julkaistu versio: 1.1.2 — https://www.npmjs.com/package/mcp-server-git-history

MCP-palvelin (Model Context Protocol) joka antaa tekoälyagenteille (Claude Desktop, Cursor, Windsurf) työkalut Git-repositorion historian lukemiseen ja hakemiseen.

Ratkaisee ongelman jossa tekoäly näkee koodin nykytilan, mutta ei tiedä miksi jokin muuttui tai kuka teki muutoksen viimeksi.

Teknologiat: Node.js 18/20/22/24, Model Context Protocol (stdio), simple-git, zod. Lisenssi: LICENSE.

Sisältö: Quick start · Työkalut · Esimerkkivastaus · Asennus Claude Desktopiin · Asennus Cursoriin · Kehitys ja testaus · Rakenne

Quick start

An MCP server that gives AI agents (Claude Desktop, Cursor, Windsurf) tools to read and search Git history — commit search, file history, blame, contributors, and diffs between refs.

Run it directly with npx (no install needed):

npx -y mcp-server-git-history /path/to/your/repo

Add it to Claude Desktop's config (claude_desktop_config.json):

{
  "mcpServers": {
    "git-history": {
      "command": "npx",
      "args": ["-y", "mcp-server-git-history", "/path/to/your/repo"]
    }
  }
}

Restart Claude Desktop, then ask something like "When was src/index.js last changed, and why?"

Työkalut

  • search_commits(query, limit?) — etsii commiteja hakusanalla commit-viestistä
  • get_recent_commits(limit?) — hakee uusimmat commitit (yleiskuva viimeaikaisista muutoksista)
  • get_commit_diff(commitHash) — hakee yhden commitin koko diffin
  • get_file_history(filePath, limit?) — hakee tiedoston muutoshistorian (kuka, milloin, miksi)
  • blame_file(filePath, startLine?, endLine?) — rivikohtainen git blame: kuka ja missä commitissa kirjoitti kunkin rivin
  • get_contributors(limit?) — yhteenveto committaajista ja heidän commit-määristään (git shortlog -sn)
  • get_diff_between_refs(fromRef, toRef, filePath?) — diffi kahden commitin/branchin/tagin välillä, valinnaisesti yhteen tiedostoon rajattuna

Esimerkkikutsut

{ "name": "search_commits", "arguments": { "query": "login-bugi", "limit": 10 } }
{ "name": "get_recent_commits", "arguments": { "limit": 5 } }
{ "name": "get_commit_diff", "arguments": { "commitHash": "a1b2c3d" } }
{ "name": "get_file_history", "arguments": { "filePath": "src/index.js", "limit": 10 } }
{ "name": "blame_file", "arguments": { "filePath": "src/index.js", "startLine": 10, "endLine": 25 } }
{ "name": "get_contributors", "arguments": { "limit": 10 } }
{ "name": "get_diff_between_refs", "arguments": { "fromRef": "main", "toRef": "HEAD", "filePath": "src/index.js" } }

Vain luku: kaikki työkalut käyttävät ainoastaan lukevia Git-komentoja (log, show, blame, shortlog, diff). Palvelin ei koskaan muuta repositoriota.

Esimerkkivastaus

get_recent_commits palauttaa JSON-listan (todellinen tulos npm test:stä):

[
  {
    "hash": "bc3338e",
    "date": "2026-10-05T14:29:43+03:00",
    "author": "tonyweckstrom1987",
    "message": "Upgrade GitHub Actions to latest versions"
  }
]

Asennus Claude Desktopiin

Lisää claude_desktop_config.json-tiedostoon:

{
  "mcpServers": {
    "git-history": {
      "command": "npx",
      "args": ["-y", "mcp-server-git-history", "/polku/repositorioosi"]
    }
  }
}

Repositorion polku voidaan antaa myös GIT_REPO_PATH-ympäristömuuttujalla, tai jättää pois jolloin käytetään palvelimen käynnistyshakemistoa.

Käynnistä Claude Desktop uudelleen, ja kysy esimerkiksi: "Milloin tiedostoa src/index.js on viimeksi muokattu ja miksi?"

Asennus Cursoriin

Lisää projektin .cursor/mcp.json-tiedostoon (tai globaaliin ~/.cursor/mcp.json-tiedostoon):

{
  "mcpServers": {
    "git-history": {
      "command": "npx",
      "args": ["-y", "mcp-server-git-history", "/polku/repositorioosi"]
    }
  }
}

Avaa Cursorin asetuksista MCP-välilehti ja varmista, että git-history-palvelin on käynnissä (vihreä piste). Sama GIT_REPO_PATH-ympäristömuuttuja ja komentoriviargumentti toimivat kuin Claude Desktopissa.

Kehitys ja testaus paikallisesti

git clone <repo>
cd mcp-server-git-history
npm install
npm test                                        # testaa tätä samaa repoa
node test/manual-test.js /polku/johonkin/git-repoon   # tai jotain muuta repoa

Testiskripti käynnistää palvelimen alaprosessina ja kutsuu kaikkia työkaluja oikeaa MCP-protokollaa käyttäen (@modelcontextprotocol/sdk:n Client + StdioClientTransport), ei vain suoraan funktioita — samalla tavalla kuin Claude Desktop oikeasti kutsuisi palvelinta.

Miksi tämä on ilmainen ylläpitää

Palvelin itse ei tee tekoälykutsuja — se vain lukee Git-dataa ja palauttaa sen. Tekoäly (esim. Claude Desktop) kutsuu palvelinta, ei toisinpäin. Ei API-avaimia, ei kustannuksia.

Rakenne

  • bin/server.js — MCP-palvelin, työkalujen rekisteröinti (McpServer + StdioServerTransport)
  • lib/git-tools.js — Git-logiikka (simple-git)
  • test/manual-test.js — päästä-päähän-testi oikealla MCP-clientillä

Frequently asked questions

What is git-history MCP Server?

Give AI agents Git history tools: commit search, file history, blame, contributors, ref diffs.

How do I install git-history MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. git-history MCP Server runs locally from the npm package mcp-server-git-history with the command npx -y mcp-server-git-history@1.1.1.

Is git-history MCP Server free and open source?

Yes. git-history MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does git-history MCP Server support remote (HTTP) connections?

No remote endpoint is listed for git-history MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is git-history MCP Server's trust score calculated?

git-history MCP Server scores 44 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server