mcp-gitreview

Namita-Singroha/mcp-gitreview

3.1

If you are the rightful owner of mcp-gitreview and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

An MCP server in Go that exposes Git commit history, diffs, and file content as tools for AI-powered code review.

Tools
3
Resources
0
Prompts
0

MCP GitReview Server

🚀 A lightweight Model Context Protocol (MCP) server for exploring GitHub repositories over stdio.

This project enables AI agents (e.g., Claude Desktop) to interact with GitHub repos in a structured way — listing commits, branches, PRs, and repo metadata — without exposing raw git or GitHub API complexity.


✨ Features

  • Repository selection → Set or switch repositories at runtime
  • Authentication → Add your GitHub Personal Access Token (PAT) for private repos
  • GitHub data tools:
    • View last 10 commits
    • List all branches
    • Get the latest commit message
    • Fetch repo metadata (stars ⭐, forks 🍴, open issues 🐞)
    • List open pull requests

All these tools are exposed as MCP endpoints that an LLM can call directly.


📂 Project Structure

internal/
  github/   → GitHub API client
  server/   → Context handling (repo + token)
  tools/    → MCP tool definitions
main.go     → Entry point (starts the MCP server)

🔧 Usage

1. Build the server

go build -o mcp-gitreview .

2. Run via MCP

Example config (Claude Desktop / MCP client):

{
  "mcpServers": {
    "gitreview": {
      "command": "/path/to/mcp-gitreview"
    }
  }
}

👉 No default repo is required. If a tool is called without a repo set, the server will politely ask the LLM to set one using set_repo.

📸 Demo: Claude Desktop interacting with the MCP server by invoking MCP Tools. The user asks in natural language, and the server communicates back in simple English, describing repository features clearly.

Screenshot 2025-09-13 at 7 34 59 PM Screenshot 2025-09-13 at 7 35 57 PM Screenshot 2025-09-13 at 7 36 35 PM Screenshot 2025-09-13 at 7 36 50 PM

🤖 Example Flow

  1. Ask: “List the branches in modelcontextprotocol/go-sdk
  2. LLM realizes no repo is set → calls set_repo
  3. Server stores it → responds: “Repo set to modelcontextprotocol/go-sdk”
  4. LLM calls list_branches → gets actual branch names.