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

niuma-mcp

v1.3.2

Published

MCP server for niuma mode - forces the AI to ask follow-up questions before ending

Readme

niuma-mcp

让 AI 对话永不主动结束的 MCP 工具(俗称「牛马模式」)。AI 完成任务后会自动询问你是否还有其他需求,保持对话持续进行。

核心功能

  • 对话保持:AI 完成任务后不会直接结束,而是询问你下一步需求
  • 纯本地运行:无后端依赖、无激活码、无网络请求
  • 一键开关:通过命令或文件随时启停
  • 兼容 Cursor + Claude Code:标准 MCP stdio 协议
  • 跨窗口隔离:每个 Cursor 窗口的弹窗只在自己窗口出现
  • 图片落盘:弹窗里贴的图片落盘到 ~/.niuma/images/<project>/<session>/,AI 用 Read 工具按需读取

配置

Cursor(全局,npx 方式,推荐)

~/.cursor/mcp.json 中添加(无需本地安装,npx 会自动拉取):

{
  "mcpServers": {
    "niuma": {
      "command": "npx",
      "args": ["-y", "niuma-mcp"]
    }
  }
}

Claude Code(npx 方式)

claude mcp add niuma npx -y niuma-mcp

本地源码方式(开发调试用)

cd ~/projects/my/niuma-mcp
npm install
npm run build

~/.cursor/mcp.json

{
  "mcpServers": {
    "niuma": {
      "command": "node",
      "args": ["/Users/jasonhuang/projects/my/niuma-mcp/dist/index.js"]
    }
  }
}

使用

启用后,AI 每次完成任务都会调用 ask_continue 工具,然后继续询问你是否有更多需求。

关闭对话保持

对 AI 说"关闭牛马模式"或"关闭保持模式",AI 会调用 toggle_niuma 关闭。

或者手动:

echo "0" > ~/.niuma/enabled.txt

重新开启

echo "1" > ~/.niuma/enabled.txt

检查状态

node ~/projects/my/niuma-mcp/dist/index.js --status

工具列表

| 工具 | 作用 | |---|---| | ask_continue | 每次任务结束前调用,弹出窗口等待用户输入 | | toggle_niuma | 开关牛马模式 | | toggle_popup | 开关弹窗模式(关闭时退化为纯文本提示) |

工作原理

  1. MCP 工具 ask_continue 的描述告诉 AI:每次完成任务必须调用此工具
  2. MCP server 写 ~/.niuma/dialog_request_<id>.json,标记 extension_host_pid
  3. 对应窗口的 Cursor 扩展扫到请求 → 抢 lock → 弹出居中模态对话框
  4. 用户输入文字/贴图 → 扩展写 dialog_response_<id>.json
  5. MCP server 读到响应 → 把图片落盘到 ~/.niuma/images/<project-slug>/<requestId>/ → 返回给 AI 绝对路径
  6. AI 用 Read 工具按需读取图片,继续干活

配置目录

~/.niuma/:

enabled.txt              对话保持总开关  "1" 启用 / "0" 关闭
popup.txt                弹窗模式开关    "1" 弹窗 / "0" 纯文本
extension_heartbeat.txt  扩展心跳(自动写)
auto_inject_rule.txt     扩展自动注入项目级规则(默认 "1")
images/<project>/<session>/img_*.png   弹窗里贴的图片落盘位置(24h 自动清理)
dialog_request_*.json    待处理请求(运行时)
dialog_response_*.json   已处理响应(运行时)
dialog_lock_*.json       抢占 lock(运行时)