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

git-mcp

v1.0.0

Published

MCP server for interacting with Git using natural language

Downloads

221

Readme

git-mcp

MCP (Model Context Protocol) server for interacting with Git using natural language. This tool allows you to perform common Git operations through simple commands, and it will figure out the right Git commands to execute.

Installation

pnpm install
pnpm build

Usage

Add to Claude Code

pnpm run mcp:add

Available Tools

Undo Operations

| Tool | Description | Use Case | Git Command | |------|-------------|----------|-------------| | git_undo_commit | Undo the last commit while keeping changes | "How do I undo my last commit?" | git reset --soft HEAD~1 | | git_revert | Revert commits by creating new commits | "How do I revert the last 3 commits?" | git revert HEAD~3..HEAD | | git_discard_changes | Discard local changes | "How do I discard all my local changes?" | git clean -fd && git checkout -- . | | git_unstage | Unstage files from staging area | "How do I unstage a file I accidentally added?" | git reset HEAD <file> | | git_undo_merge | Abort an in-progress merge | "How do I undo a merge?" | git merge --abort | | git_reset | Reset to a specific commit | "How do I reset to a previous commit?" | git reset --<mode> <commit> |

Commit Editing

| Tool | Description | Use Case | Git Command | |------|-------------|----------|-------------| | git_squash | Squash multiple commits into one | "How do I squash my last N commits into one?" | git reset --soft HEAD~N && git commit | | git_amend | Amend the last commit | "How do I edit an old commit message?" | git commit --amend | | git_stage | Stage files for commit | "How do I add files to staging?" | git add <files> | | git_commit | Create a new commit | "How do I commit my changes?" | git commit -m "<message>" |

Branching & Merging

| Tool | Description | Use Case | Git Command | |------|-------------|----------|-------------| | git_create_branch | Create a new branch | "How do I create a branch from an old commit?" | git checkout -b <branch> <ref> | | git_list_branches | List all branches | "What branches exist?" | git branch -a -vv | | git_checkout | Switch to a branch | "How do I switch branches?" | git checkout <branch> | | git_delete_branch | Delete a branch | "How do I delete a branch?" | git branch -d <branch> | | git_move_changes | Move changes to new branch | "How do I move my changes to a different branch?" | git stash && git checkout -b <branch> && git stash pop | | git_cherry_pick | Apply commits from another branch | "How do I cherry-pick a commit?" | git cherry-pick <commit> | | git_merge | Merge a branch | "How do I merge without a merge commit?" | git merge [--no-ff/--squash] <branch> | | git_rebase | Rebase current branch | "How do I reorder my commits?" | git rebase <target> |

Syncing & Remote

| Tool | Description | Use Case | Git Command | |------|-------------|----------|-------------| | git_pull | Pull changes from remote | "How do I pull without creating a merge commit?" | git pull --rebase | | git_push | Push commits to remote | "How do I force push safely?" | git push --force-with-lease | | git_fetch | Fetch from all remotes | "How do I update remote refs?" | git fetch --all --prune | | git_update_branch | Update branch with main | "How do I update my branch with latest from main?" | git fetch && git rebase origin/main | | git_stash | Stash/restore changes | "How do I save my work temporarily?" | git stash [pop/list/drop] | | git_remote | Manage remotes | "How do I add a remote?" | git remote add/remove |

History Inspection

| Tool | Description | Use Case | Git Command | |------|-------------|----------|-------------| | git_log | Show commit history | "Show me recent commits" | git log | | git_show | Show commit details | "How do I see what changed in a commit?" | git show <commit> | | git_blame | Show who changed each line | "How do I find who changed a specific line?" | git blame <file> | | git_diff | Show differences | "Show me the changes" | git diff [--staged] | | git_search | Search commits | "How do I find a commit by its message?" | git log --grep/S/author | | git_file_history | Show file history | "How do I see the history of a specific file?" | git log --follow -- <file> | | git_status | Show working tree status | "What's my current status?" | git status |

Recovery

| Tool | Description | Use Case | Git Command | |------|-------------|----------|-------------| | git_reflog | Show reference log | "How do I find lost commits?" | git reflog | | git_recover_commit | Recover a lost commit | "How do I get back a commit I reset?" | git cherry-pick/checkout <commit> | | git_recover_branch | Recover deleted branch | "How do I recover a deleted branch?" | git checkout -b <branch> <reflog-commit> | | git_find_lost | Find dangling commits | "Find unreachable commits" | git fsck --unreachable | | git_reset_to_reflog | Reset to reflog entry | "Restore to previous state" | git reset HEAD@{n} |

Example Queries

Here are some natural language queries and the tools that handle them:

  • "Undo my last commit" → git_undo_commit
  • "Revert the last 3 commits" → git_revert with count=3
  • "Discard all my local changes" → git_discard_changes
  • "Unstage the file I just added" → git_unstage
  • "Squash my last 5 commits" → git_squash with count=5
  • "Create a branch from commit abc123" → git_create_branch with fromRef="abc123"
  • "Move my uncommitted changes to a new branch" → git_move_changes
  • "Cherry-pick commit xyz789" → git_cherry_pick
  • "Update my branch with the latest from main" → git_update_branch
  • "Who changed line 42 in app.js?" → git_blame with file and line range
  • "Find the commit that added 'TODO'" → git_search with type="content"
  • "Recover my deleted feature branch" → git_recover_branch

License

MIT