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

@shaohui_jin/git-insight-mcp-server

v0.2.3

Published

MCP server exposing git-insight branch graph, merge preview, batch survey, merge-order planning and MR creation

Readme

@shaohui_jin/git-insight-mcp-server

把 git-insight 的「不落地合并预演」开放成 MCP server,任何 MCP 宿主(Cursor、Claude Code、VS Code…)都能直接调用。

所有预演都基于 git merge-tree不改工作区、不建分支、不产生提交,在别人的仓库上跑也是安全的。

工具

| 工具 | 作用 | |------|------| | git_branch_graph | 分支 tip 与链路,可选给出两分支的 merge-base 和各自独有提交数 | | merge_preview | 单对预演。detail: true 时附冲突正文与逐块溯源(慢) | | merge_survey | 批量矩阵:froms × intos 每种组合各预演一次,整批只 fetch 一次 | | merge_order | 多分支合进同一目标时,推演最省事的合入顺序 | | mr_prepare | 识别平台 / CLI / 默认标题 / 可选审核人,只读 |

全部标了 readOnlyHint,宿主可以免确认直接调。

写操作默认不注册。需要时启动前设 GIT_INSIGHT_MCP_ALLOW_WRITE=1,此时多出 apply_resolvecreate_mr,且每次调用还必须显式传 confirm: true

接入(npm)

{
  "mcpServers": {
    "git-insight": {
      "command": "npx",
      "args": ["-y", "@shaohui_jin/git-insight-mcp-server@latest"],
      "env": {
        "GIT_INSIGHT_MCP_CWD": "D:/你的/仓库"
      }
    }
  }
}

GIT_INSIGHT_MCP_CWD 必须是本地路径(不能填 GitHub URL)。改完重启 MCP 宿主。

从源码构建

pnpm install
pnpm build:mcp   # core + 打包 dist/index.js

本地调试可改用绝对路径:

{ "command": "node", "args": ["…/packages/mcp/dist/index.js"] }
npx @modelcontextprotocol/inspector node packages/mcp/dist/index.js

需要 Node ≥ 20 和系统 Git ≥ 2.38。

发版

  • npm 包名:@shaohui_jin/git-insight-mcp-server
  • Git tag:mcp-server-v{version}(与扩展 v* tag 独立)
  • CI:.github/workflows/release-mcp-server.yml(Secret:NPM_TOKEN
pnpm publish:mcp

构建时用 esbuild 内联 @shaohui_jin/git-insight-core@modelcontextprotocol/serverzod 为外部依赖。

功能进度见仓库 docs/roadmap.md

注意

  • stdout 是协议流,日志走 stderr。
  • 默认每次调用会 fetch;批量扫描可传 noFetch: true
  • AI 选边与冲突预警状态栏为 Cursor 扩展专属能力。