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

@hchuanz/pocket-tool-mcp

v0.2.3

Published

MCP Server:把 Pocket48 的业务能力(登录/成员/房间/翻牌)暴露给 AI 工具(Claude Desktop / Cursor / Codex 等)

Downloads

1,764

Readme

@hchuanz/pocket-tool-mcp

Pocket48 的业务能力(登录/成员/房间/翻牌)暴露给 AI 工具,支持 Claude Desktop、Cursor、Codex、VS Code 等所有 MCP 客户端。

基于 @hchuanz/pocket-core,通过 stdio 传输提供 19 个工具

安装

npm install -g @hchuanz/pocket-tool-mcp
# 或
pnpm add -g @hchuanz/pocket-tool-mcp

配置 MCP 客户端

推荐用 npx 写法:跨 Windows / macOS / Linux 通用,第一次运行自动下载依赖(稍等几秒),之后秒连。避免直接用裸命令(如 "pocket-tool-mcp"),Windows 下那是 .cmd shim,MCP 客户端 spawn 时会找不到可执行文件。

Claude Code(CLI)

# user scope:对所有项目生效
claude mcp add --scope user pocket-tool-mcp -- npx -y @hchuanz/pocket-tool-mcp

# local scope:仅当前项目生效(在项目根目录执行)
claude mcp add --scope local pocket-tool-mcp -- npx -y @hchuanz/pocket-tool-mcp

添加后重启 Claude Code 会话/mcp 里应看到 pocket-tool-mcp: ✔ Connected

Claude Desktop

编辑 claude_desktop_config.json(Windows 位于 %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "pocket-tool-mcp": {
      "command": "npx",
      "args": ["-y", "@hchuanz/pocket-tool-mcp"],
      "env": {
        "POCKET_TOKEN": "你的口袋48登录Token(可选)",
        "POCKET_DATA_DIR": "C:\\Users\\<你的用户名>\\.pocket-tool-mcp"
      }
    }
  }
}

Cursor / VS Code

.cursor/mcp.json 或 VS Code MCP 设置中添加:

{
  "mcpServers": {
    "pocket-tool-mcp": {
      "command": "npx",
      "args": ["-y", "@hchuanz/pocket-tool-mcp"],
      "env": {
        "POCKET_TOKEN": "你的口袋48登录Token(可选)"
      }
    }
  }
}

💡 若你的环境没有 Node.js / npx(如某些 Cursor 或服务端环境),退路是用全局安装后的绝对路径: command: "node", args: ["<npm全局路径>\\node_modules\\@hchuanz\\pocket-tool-mcp\\dist\\cli.js"],路径可用 npm root -g 查询。

环境变量

| 变量 | 必需 | 说明 | |------|------|------| | POCKET_TOKEN | 否 | Pocket48 登录 Token(设置后自动登录,不设可通过验证码登录) | | POCKET_DATA_DIR | 否 | 数据目录,默认 ~/.pocket-tool-mcp |

提供的工具

认证

| 工具 | 说明 | |------|------| | pocket.sendVerificationCode | 发送短信验证码 | | pocket.loginWithCode | 验证码登录 | | pocket.loginWithToken | Token 登录 |

用户 & 成员

| 工具 | 说明 | |------|------| | pocket.getUserInfo | 当前用户信息 | | pocket.getUnreadMessageNum | 未读消息数量 | | pocket.getConversationList | 会话列表(谁最近给我发过消息,不需成员 ID) | | pocket.fetchMemberList | 成员列表(按队伍过滤) | | pocket.searchMembers | 按名称搜索成员 | | pocket.getMemberFlipPriceInfo | 成员翻牌价格 |

房间 & 消息

| 工具 | 说明 | |------|------| | pocket.getRoomChannel | 获取成员的口袋房间频道 | | pocket.getRoomInfo | 房间基本信息 | | pocket.getRoomMessages | 分页获取房间消息 |

翻牌

| 工具 | 说明 | |------|------| | pocket.syncFlips | 从服务端同步翻牌数据到本地缓存(落盘,重启后仍在) | | pocket.searchFlips | 搜索翻牌记录 | | pocket.getRecentFlips | 最近收到的翻牌(不需成员 ID,直连接口不依赖缓存) | | pocket.sendFlip | 发送翻牌(付费,type=公开性 / answerType=回复类型,两个独立维度) | | pocket.recallFlip | 撤回进行中的翻牌(不可逆) | | pocket.getMemberFlipHistory | 查翻牌对话历史 | | pocket.getMemberFlipPriceInfo | 成员翻牌定价(公开/私密/匿名三档最低价) | | pocket.getDashboard | 翻牌数据仪表盘 |

平台工具

| 工具 | 说明 | |------|------| | 平台.searchFlipRecords | 搜索本地翻牌记录 | | 平台.getXoxList | 有翻牌记录的偶像列表 | | 平台.getDashboardInfo | 翻牌统计仪表盘 | | 平台.readFile | 读取本地文件 | | 平台.getCurrentTime | 获取当前时间 | | 平台.processText | 文本处理(统计/截断/提取) |

使用示例

配置好 MCP 客户端后,直接用自然语言操作:

"帮我查一下所有成员的翻牌价格"

"搜一下袁一琦的最近翻牌"

"给我看看段艺璇房间的最新30条消息"

License

MIT