git-insights-mcp
Provides tools for analyzing local git repositories, including listing commits, searching commit messages, viewing diffs, comparing branches, checking status, listing branches, file history, and blame.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@git-insights-mcpShow me the last 10 commits"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
git-insights-mcp
A local-only MCP (Model Context Protocol) server that exposes git repository history, diffs, and status as tools an LLM client (e.g. Claude Desktop) can call in natural language.
It works entirely against a local git repo on disk — it never talks to GitHub, GitLab, or any remote API. No auth, no tokens.
Tools exposed
Tool | Description |
| Recent commits (author, date, message) on a branch |
| Search commit messages by keyword |
| Full diff + stats for one commit |
| Diff/summary between two branches or refs |
| Current branch, ahead/behind, uncommitted changes |
| Local (or local + remote-tracking) branches |
| Commit history for a specific file |
| Line-by-line author/commit attribution (git blame) |
Safety notes:
The server is scoped to one repo path, given at startup. The model can never point it at an arbitrary path on your machine.
File-path parameters (
get_file_history,blame_file) are checked to make sure they resolve inside the repo — no../../traversal.Only read-only git operations are implemented — nothing here can commit, push, or modify your repo.
Related MCP server: MCP Git Server
Setup
npm install
npm run buildThis compiles TypeScript from src/ into dist/.
Running it standalone (sanity check)
node dist/index.js /path/to/some/git/repoYou should see:
git-insights-mcp running (stdio) against repo: /path/to/some/git/repoIt communicates over stdio using the MCP protocol, so it won't print anything else unless a client sends it requests. Press Ctrl+C to stop.
Inspecting it with MCP Inspector (recommended first step)
The MCP Inspector lets you call tools directly through a web UI, without needing Claude Desktop:
npx @modelcontextprotocol/inspector node dist/index.js /path/to/some/git/repoThis opens a browser UI where you can see all 8 tools, fill in their parameters, and inspect raw responses.
Connecting to Claude Desktop
Find your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add an entry under
mcpServers(use the absolute path to this project'sdist/index.js, and the absolute path to the repo you want to inspect):
{
"mcpServers": {
"git-insights": {
"command": "node",
"args": [
"/absolute/path/to/git-insights-mcp/dist/index.js",
"/absolute/path/to/your/target/repo"
]
}
}
}Restart Claude Desktop. You should see a 🔨 tools icon indicating the server connected, and the 8 tools available for Claude to call.
Try prompts like:
"Summarize the last 10 commits on this repo"
"Show me the diff for commit
<hash>""Who's touched
src/index.tsthe most recently?""What files changed between
mainandfeature/foo?""Is my working directory clean right now?"
Project structure
git-insights-mcp/
├── src/
│ ├── index.ts # server entrypoint, tool registration, transport setup
│ ├── git.ts # repo path resolution + safety helpers
│ └── tools/
│ ├── commits.ts # list_recent_commits, search_commits
│ ├── diff.ts # get_commit_diff, get_diff_between_branches
│ ├── status.ts # get_branch_status, list_branches
│ └── fileHistory.ts# get_file_history, blame_file
├── package.json
├── tsconfig.json
└── README.mdIdeas for extending this
Add a
promptsentry likeweekly_summarythat pre-packages "summarize commits from the last 7 days, grouped by author"Expose
repo://statusas an MCP resource so it's always available as context without an explicit tool callAdd a
get_pr_style_summarytool that formats a diff as a draft PR descriptionAdd a second set of tools wrapping the GitHub API (via
@octokit/rest) for PRs/issues — a natural "part 2" once this local version is working
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sanyam-jain-simform/git-insights-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server