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-cockpit-mcp-server

v0.1.15

Published

Git Cockpit - 基于 MCP 的 Git 可视化操作工具(MCP Server + Web 服务 + CLI)

Downloads

2,184

Readme

@shaohui_jin/git-cockpit-mcp-server

Git Cockpit —— 基于 MCP(Model Context Protocol) 的 Git 可视化操作工具。一个包同时提供三种形态:MCP Server(供 AI 客户端调用 Git 操作)、Web 管理界面(浏览器可视化操作)、CLI(命令行启动)。支持多仓库管理、权限审批与 dry-run 预览等安全机制。

环境要求

  • Node.js >= 22.5.0(底层 core 包使用 node:sqlite

安装

# 全局安装(提供 git-cockpit 命令)
pnpm add -g @shaohui_jin/git-cockpit-mcp-server
# 或
npm install -g @shaohui_jin/git-cockpit-mcp-server

包为纯 ESM,内置 Web 前端(dist/web),无需额外安装静态资源。

快速开始

git-cockpit start   # 启动常驻服务:Web UI + MCP Server(Streamable HTTP),默认 http://localhost:3000
git-cockpit mcp     # 以 stdio 模式运行 MCP Server(供 Claude Desktop / Cursor 等客户端连接)
git-cockpit version # 输出版本号

启动后浏览器访问 http://localhost:3000 即可使用 Web 界面;/mcp 端点提供 MCP Streamable HTTP 接入。

接入 MCP 客户端(stdio)

以 Claude Desktop / Cursor 为例,在 MCP 配置中加入:

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

环境变量

| 变量 | 说明 | 默认 | | --- | --- | --- | | GIT_COCKPIT_DATA_DIR | 数据目录(仓库列表、审计日志、备份) | ~/.git-cockpit | | GIT_COCKPIT_PORT | Web 服务端口 | 3000 | | GIT_COCKPIT_HOST | 监听地址 | localhost |

主要特性

  • 多仓库管理:统一打开/移除仓库,跨仓库操作
  • 安全机制:工具按风险分级(readonly / write / dangerous),写操作 dry-run 预览 → 确认 → 执行;高危操作可配置人工审批
  • MCP 默认摘要git_diff / git_show / git_merge_rehearse 默认不回完整正文;要正文请加 pathdetail=true(网页 GET 仍是全文)
  • 内置 Web UI:工作台 / 状态 / 历史 / 日志 / 设置视图,支持提交、分支、stash、pull/push、硬重置等操作
  • 审计日志:所有工具调用记录落库,可回溯
  • 备份:高危操作前自动备份分支引用与 stash 快照

发布说明(维护者)

版本号维护在 packages/mcp-server/package.json,发布由仓库根目录 .github/workflows/release-mcp-server.yml 负责:

  • 判据:远程不存在 mcp-server-v{version} tag 才发布
  • 流程:构建 web → 构建 mcp-server(prepublishOnly 自动把 web/dist 内嵌进 dist/web)→ pnpm publish → 成功后才推送 tag mcp-server-v{version}
  • 依赖:mcp-server 依赖 @shaohui_jin/git-cockpit-coreworkspace:^,发布时转为 ^0.1.0),workflow 会先确保 core 已发布(缺失则顺带发布)
  • 触发:push 到 master/main,或 GitHub Actions 手动 workflow_dispatch
  • 需要仓库 SecretNPM_TOKEN(npm Automation token)

完整发布手册(含 tag 协议、版本管理、本地发布注意事项)见仓库内 docs/release.md

License

MIT