npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hsx-git-tools

v1.1.0

Published

Complete Git operations MCP Server for Claude Code - Status, diff, log, commit, push, stash and more

Readme

hsx-git-tools

Complete Git operations MCP Server for Claude Code.

Features

This MCP server provides 20+ Git tools covering 90% of daily Git workflows. Claude can handle your Git operations without you switching to the terminal.

  • Read-only queries: status, diff, log, show, branch, remote, blame
  • Preview & Analysis: preview changes before commit, repository health check with sensitive info scanning
  • Stash management: stash, list, pop
  • Write operations: add, commit, checkout, fetch, pull, push, branch create, reset

Installation

Step 1: Add to Claude Code MCP

Windows (PowerShell):

claude mcp add-json hsx-git-tools -s user '{"command": "cmd", "args":["/c", "npx", "-y", "hsx-git-tools@latest"]}'

macOS / Linux:

claude mcp add hsx-git-tools -- npx -y hsx-git-tools@latest

Manual configuration (edit ~/.mcp.json):

Windows:

{
  "mcpServers": {
    "hsx-git-tools": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "hsx-git-tools@latest"
      ]
    }
  }
}

macOS / Linux:

{
  "mcpServers": {
    "hsx-git-tools": {
      "command": "npx",
      "args": [
        "-y",
        "hsx-git-tools@latest"
      ]
    }
  }
}

Usage in Claude Code

Just ask Claude naturally, Claude will use the appropriate tools. Here are some examples:

Example Workflows

Workflow 1: Create a new feature branch and push it

create a new branch called feature/git-cleanup and push it to remote

Claude will:

  1. Check current status
  2. Create and checkout the new branch
  3. Push it to remote with upstream set

Workflow 2: Preview changes before commit

add all changed files and preview what will be committed

Claude will:

  1. Add all files to staging
  2. Show you how many files/lines changed
  3. Automatically scan for sensitive information
  4. Warn you if any API keys or passwords detected!
  5. Help you write a good commit message based on the changes

Workflow 3: Quick save before switching branch

I need to switch to main to fix something, stash my current work

Claude will:

  1. Stash your uncommitted changes
  2. Switch to main and pull latest
  3. After you're done, you can say "pop my stash" to continue working

Workflow 4: Check repository health

run a health check on this repository

Claude will:

  1. Check repository size
  2. Find large files that shouldn't be committed
  3. Scan entire repo for accidentally committed sensitive info
  4. Check if .gitignore is complete
  5. Give you optimization suggestions

More natural prompts:

  • "show me git status"
  • "what changes do I have"
  • "show me the diff for file README.md"
  • "show me the last 10 commits"
  • "who changed this line in src/security-scan.js line 42"
  • "list all stashes"
  • "pop my latest stash"
  • "checkout main and pull the latest changes"
  • "commit all changes with message 'fix: sensitive info scan bug'"
  • "push my current branch"
  • "check the health of this repository"

Example MCP Call (if you need manual invocation)

{
  "name": "git_preview_changes",
  "arguments": {}
}
{
  "name": "git_status",
  "arguments": {}
}
{
  "name": "git_repository_health",
  "arguments": {}
}

Available Tools

| Tool | Description | |------|-------------| | git_status | Get current working tree status | | git_diff | Show diff of changes (all or specific file) | | git_log | Get commit history with filtering | | git_show | Show content of a specific commit | | git_branch | List all branches | | git_branch_create | Create new branch | | git_remote | Show remote repository info | | git_blame | Show line-by-line modification info | | git_preview_changes | Preview staged changes, count lines, scan for sensitive info | | git_repository_health | Check repository health (size, large files, sensitive info) | | git_stash | Stash current changes | | git_stash_list | List all stashes | | git_stash_pop | Pop latest stash | | git_add | Add file(s) to staging | | git_commit | Commit staged changes | | git_checkout | Switch branch | | git_fetch | Fetch from remote | | git_pull | Pull from remote | | git_push | Push to remote | | git_reset | Reset to specific commit (soft/mixed/hard) |

Key Features

1. Auto-detect Git repository

No configuration needed - automatically finds .git from current working directory upwards.

2. Pre-commit preview

Before you commit, Claude can preview:

  • How many files changed
  • How many lines added/removed
  • Breakdown by file type
  • Automatically scan for sensitive information (API keys, passwords, tokens) and warn you before commit!

3. Repository health check

  • Checks repository size
  • Finds large files (>1MB) that shouldn't be in Git
  • Scans entire repository for accidentally committed sensitive info
  • Checks .gitignore completeness
  • Gives optimization suggestions

Safety Notes

  • Dangerous operations like git reset --hard are clearly marked in tool description
  • Claude will ask for your confirmation before executing dangerous operations
  • All operations are logged via console.error which appears in Claude Code logs for debugging

How it works

Claude Code → hsx-git-tools (via MCP) → simple-git → your local Git repository

Uses the excellent simple-git library for all Git operations.

License

MIT