
BAND
io.github.ktgeek由 GitHub 账号 ktgeek 发布v1.0.0更新于 Oct 27, 2026
List bands and read, post, and comment on BAND posts through the BAND Open API.
概览
通过 BAND Open API 让助手列出 Band、读取与发布帖子并管理评论。
- 可以做什么
- 列出已加入的 Band,并查询用户在某个 Band 中的发帖、评论与删除权限
- 读取 Band 的近期帖子,按 key 获取单篇帖子,支持游标分页
- 向 Band 发布文字帖子,可选择是否推送通知成员
- 读取帖子评论,可按最早或最新排序,支持游标分页
- 为帖子添加评论,并永久删除帖子或评论
- 报告服务器状态以及访问令牌是否已配置
- 适用场景
- 适合需要让助手在 BAND 社群中工作的场景:查看自己加入了哪些 Band、起草并发布帖子、跟进评论讨论,或清理通过该应用发布的帖子和评论。
- 运行要求
- 以 Ruby gem(需 Ruby 4.0 或更高版本)或 Docker 镜像形式在本地通过 stdio 运行。需要 BAND 开发者网站注册应用后取得的访问令牌,通过 BAND_ACCESS_TOKEN 环境变量或配置文件提供。需要访问 BAND API 的网络。桌面客户端需使用绝对启动路径。
安装
在 SourceWeft 中
- 打开 控制台中的 BAND,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ruby-band-mcp-server
An MCP server for the BAND Open API,
written in Ruby on the official mcp gem and served over stdio.
Tools
A typical flow is list_bands to find the band, create_post to publish, then get_post with the returned
post_key to confirm. create_post is marked as not read-only, so MCP clients such as Claude Desktop can ask before
running it.
To browse what is already in a band, use list_posts. BAND picks the page size (20 posts); when the result's
next_after is not null, pass it back as after to get the next page.
To read the discussion on a post, use list_comments with the post's band_key and post_key. Comments come oldest
first; set newest_first to reverse that. BAND chose a page size of 20 when tested. Pass next_after back as after exactly as
returned: it remembers the order, so a page after the first needs no newest_first.
To join in, use create_comment. BAND confirms the comment without saying what its key is, so call list_comments
afterwards to confirm it landed and to get its comment_key.
To take a post down, use remove_post; it is marked destructive, so clients can ask before running it. Run
check_permissions with contents_deletion first. BAND's docs say that permission does not check authorship, so
removing someone else's post can still fail. remove_comment works the same way on a comment_key from
list_comments, and BAND's docs add that it can only remove comments made through this app.
Requirements
Ruby 4.0 or newer.
Install
This puts a band-mcp-server executable on your PATH. To run it without installing, RubyGems can fetch and run it
on demand (the gem and executable share a name, but gem exec needs the gem named explicitly):
Docker
If you would rather not manage a Ruby 4.0 install, a multi-architecture (amd64 and arm64) image of each release is
published to ghcr.io/ktgeek/band-mcp-server. The server speaks MCP over stdio, so run it with -i, and pass the
token through the environment (the image has no config file):
Tags are the release version (for example 1.0.0) and latest. Register it with Claude Code:
Getting a BAND access token
Register an app on the BAND developer site and get an access token for it; the
API guide covers the details. The server only consumes the token and
sends it to BAND as an Authorization: Bearer header. It does not run any OAuth flow itself.
Configuring the token
Put the token in ~/.config/band-mcp-server/config (or $XDG_CONFIG_HOME/band-mcp-server/config if you set that):
A value already set in the environment (for example through the MCP client's env setting) takes precedence over
the file.
Running
Register it with Claude Code:
The server speaks MCP over stdio, so it is normally launched by a client rather than run by hand.
Claude Desktop
Claude Desktop starts servers with a minimal environment, so a version manager such as chruby is not active and
the installed executable's #!/usr/bin/env ruby finds the wrong Ruby (the system Ruby, if any). With chruby, launch
the server through chruby-exec, which selects the Ruby and its
GEM_HOME for you.
chruby-exec does that by running the command in a login shell ($SHELL -l -c), so two things must hold. chruby has
to be loaded by a startup file that a non-interactive login shell reads (for zsh, ~/.zprofile or ~/.zshenv, not
only ~/.zshrc). And those startup files must not print anything to stdout: it would land in front of the protocol
stream and Desktop could not parse the handshake.
-
Find where
chruby-execis installed withwhich chruby-exec. That depends on how you installed chruby, and the path has to be absolute because Desktop'sPATHis minimal. -
Open Settings → Developer → Edit Config (on macOS this is
~/Library/Application Support/Claude/claude_desktop_config.json) and add abandentry tomcpServers:chruby matches
ruby-4against the installed Rubies by name, so it picks a 4.x Ruby; use a fuller name such asruby-4.0.5to pin one. Rungem install band-mcp-serverunder that same Ruby.Keep the token in the config file described above; it is loaded by absolute path, so the working directory does not matter. Setting
BAND_ACCESS_TOKENin anenvmap instead also works and takes precedence, but puts the secret in Desktop's config file.Without chruby, use the absolute path of the installed executable (
which band-mcp-server) ascommand. If that Ruby is not the firstrubyon Desktop's minimalPATH, use the absolute path of a Ruby 4.0 or newer ascommandinstead, put the executable inargs, and setGEM_HOMEto the directory holding the installed gems (gem env gemdirprints it):With Docker, none of the above applies: Desktop only needs the absolute path of
docker(which docker), and the token goes in anenvmap, which puts the secret in Desktop's config file:To keep the secret out of that file, write
BAND_ACCESS_TOKEN=your-tokento a file only you can read, remove theenvmap and the"-e", "BAND_ACCESS_TOKEN"pair, and add"--env-file", "/path/to/that/file"before the image name inargs. -
Quit Claude Desktop completely (Cmd-Q) and reopen it. The
bandtools appear in the tools menu of a new chat.
Then ask Claude to run ping, which reports whether the token is set without showing it, and try "Which bands am I
in?" to confirm the connection. Desktop asks before it runs a tool unless you have set that tool to always allow.
Keep the prompt on for create_post and create_comment: they publish to every member of the band. Read the band and
the wording in the request before approving. For create_post, members are push-notified only if the request sets
do_push. Keep the prompt on for remove_post and remove_comment too: what they delete is gone for every member and
cannot be restored, so check the keys before approving.
To check the launch command outside Desktop, run it with a bare environment. A JSON initialize response means the
server starts under that Ruby with its gems; it does not check the token, which ping does:
If the tools do not show up, read ~/Library/Logs/Claude/mcp-server-band.log:
Development
From a checkout, use Bundler instead of the installed gem. A .env in the checkout root takes priority over the
user config file, and bin/band-mcp-server (which sets up Bundler itself) replaces band-mcp-server:
lib/ is typed with rbs-inline annotations and checked by
Steep; regenerate sig/generated/ with bundle exec rake rbs:generate after
changing them. See AGENTS.md for conventions and architecture.
main is protected: changes land through a pull request with green CI.
License
GPL-3.0. See LICENSE.
来源:README.md,提交 cea155f
工具
0版本历史
1- v1.0.0最新Oct 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分