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

@hmbt/hamibot-mcp-server

v1.0.2

Published

Hamibot MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器实现,用于与 Hamibot API 进行交互。它提供了一系列工具来管理和控制 Hamibot 设备及脚本。

Downloads

21

Readme

Hamibot MCP Server

Hamibot MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器实现,用于与 Hamibot API 进行交互。它提供了一系列工具来管理和控制 Hamibot 设备及脚本。

功能特性

  • 设备管理:列出所有连接的设备
  • 脚本管理:查看和运行自动化脚本
  • 代码执行:在指定设备上执行自定义 JavaScript 代码
  • 支持变量传递:可以向脚本传递自定义参数

安装

手动安装

npm install -g @hmbt/hamibot-mcp-server

配置

获取访问令牌

  1. 访问 https://hamibot.com/account/tokens
  2. 点击生成

在 Trae 中使用

详细步骤参考 Trae 文档:https://docs.trae.ai/ide/model-context-protocol?_lang=zh

  1. 按键 F1
  2. 输入 open mcp config json,点击进去
  3. mcp.json 中添加:
{
  "mcpServers": {
    "hamibot": {
      "command": "npx",
      "args": ["-y", "@hmbt/hamibot-mcp-server"],
      "env": {
        "HAMIBOT_PERSONAL_ACCESS_TOKEN": "你的访问令牌"
      }
    }
  }
}

其他客户端请参考相应的文档

可用工具

list-devices

列出所有已连接的设备。

list-scripts

列出所有可用的自动化脚本。

run-script

在指定设备上运行脚本。

参数:

  • scriptId: 24 位十六进制字符串,表示要运行的脚本 ID
  • devices: 设备列表,包含设备 ID 和可选的设备名称
  • vars: (可选) 传递给脚本的变量

execute

在指定设备上执行自定义 JavaScript 代码。

参数:

  • code: JavaScript Hamibot 代码
  • devices: 设备列表,包含设备 ID 和可选的设备名称
  • vars: (可选) 传递给代码的变量

示例

  • 在 "设备名" 上运行脚本 "脚本名",设备名和脚本名加引号,会更明确,例如 在 "初号机" 上运行脚本 "演示脚本"

开发

# 构建项目
npm run build

# 启动服务器
npm start

# 开发模式(监视文件变化)
npm run watch