Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

git-context-mcp MCP server](https://glama.ai/mcp/servers/muhannad-hash/git-context-mcp/badges/score.svg)](https://glama.ai/mcp/servers/muhannad-hash/git-context-mcp) πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Answers "why does this code exist?" by tracing any line back through the...

README.md

git-context-mcp

An MCP server that answers the one question every developer has: "why does this code exist?"

git blame tells you who wrote a line. This tells you why.

Given a file and line range, git-context-mcp traces back through the commit, finds the pull request that landed it, reads the PR description, and surfaces every linked GitHub issue β€” all in one shot, directly inside Claude.

---

Demo

You: Why does line 87 of src/auth/session.ts exist?

Claude (using blame_context):
  Commit `a3f9c12` by Sarah Chen on 2024-08-14
  Message: "fix: rotate session tokens on privilege escalation"

  PR #441 β€” "Security: fix session fixation vulnerability"
  Merged: 2024-08-15  |  Labels: security, critical

  PR Description:
  > After the pen test in sprint 22, we found that session tokens
  > weren't being rotated when a user's role changed. This allows
  > a stolen low-priv token to be used after the account is promoted.

  Linked Issue #389 β€” "Session token not rotated on role change" (closed)
  > Reported by @contractor-red: "I was able to reuse a captured
  > token after my account was upgraded to admin..."

No more digging through git log, searching GitHub, and cross-referencing issue trackers. Claude does it in one step.

---

Tools

| Tool | What it does | |------|-------------| | blame_context | File + line range β†’ commit + PR description + linked issues | | commit_story | Commit hash β†’ full narrative (message, diff stat, PR, issues) | | file_history | File β†’ last N commits, each annotated with PR and issues | | search_commits | Keyword β†’ matching commits with PR/issue context | | file_contributors | File β†’ ranked author table (commits, lines owned, active dates) |

---

Installation

Option 1 β€” npx (no install)

claude mcp add git-context -- npx git-context-mcp

Option 2 β€” global install

npm install -g git-context-mcp
claude mcp add git-context -- git-context-mcp

Option 3 β€” manual config

Add to ~/.claude/claude_mcp_config.json:

{
  "mcpServers": {
    "git-context": {
      "command": "npx",
      "args": ["git-context-mcp"]
    }
  }
}

Then restart Claude Code.

---

Requirements

  • Claude Code (or any MCP-compatible client)
  • git in PATH
  • gh CLI (install) + gh auth login for GitHub PR/issue lookups
  • Works without gh β€” just skips PR/issue context

---

Usage examples

Once installed, talk to Claude naturally in any git repo:

"Why does line 42 of src/db/connection.ts exist?"
"What's the story behind commit d4a8f91?"
"Who owns the most of src/payments/stripe.ts?"
"When was the rate limiting added? Search commits for 'rate limit'"
"Show me the last 5 changes to src/api/auth.ts and why each was made"

---

How it works

  1. blame_context runs git blame -p on your lines to find the commit hash(es)
  2. For each commit it calls git show for the full message and diff stat
  3. It hits the GitHub API (gh api /repos/:owner/:repo/commits/:hash/pulls) to find the PR
  4. It parses #NNN and /issues/NNN refs from the PR body and fetches each issue
  5. Everything is returned as structured markdown for Claude to reason over

No tokens stored. No data sent anywhere except GitHub's own API (same as gh CLI).

---

Contributing

PRs welcome. The entire server lives in src/index.ts.

git clone https://github.com/muhannad-hash/git-context-mcp
cd git-context-mcp
npm install
npm run dev   # watch mode

---

License

MIT

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Search servers.