gwb-mcp
Integrates with the GoWorkBro Android app, enabling agents and CLI users to read and write the phone's todos, habits, countdowns, water logs, sleep records, and focus data. The Android phone remains the single source of truth, with each call performing a real write that refreshes the app immediately.
Uses Bluetooth LE as the direct local transport between the computer and the Android phone, with the phone acting as a BLE peripheral and the computer as central. It supports link checks, reconnection, and read/write operations without any network connection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gwb-mcp add a todo called "write thesis" with a 25-minute countdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
goworkbro-mcp
GoWorkBro(本地单机的 Android 生活自律 app)的 电脑协同客户端:一个 MCP 服务器 + 一个 命令行工具,让电脑(以及 agent)通过 蓝牙 LE 读写手机上的待办 / 习惯 / 倒计时。
手机是唯一数据源:每次调用就是一条真实写入,手机界面立刻刷新。没有双向同步、没有冲突合并。
不联网:手机做 BLE 外设(只广播、不扫描、不申请定位权限),电脑做 central,直连。
手机端要求:GoWorkBro ≥ 3.7.0,并在
设置 → 电脑协同打开开关(默认关闭)。
安装
# 从 git 装(已发布的 wheel / sdist 在 Releases 里)
uv tool install git+https://github.com/AzarAI-TOP/goworkbro-mcp
# 或者离线装 release 里的 wheel
uv tool install https://github.com/AzarAI-TOP/goworkbro-mcp/releases/download/v0.1.0/goworkbro_mcp-0.1.0-py3-none-any.whl
# 或者用 pipx
pipx install goworkbro-mcp装完得到两个命令:gwb(CLI)与 gwb-mcp(MCP 服务器,stdio 传输)。
Related MCP server: iOS BLE-MCP Bridge
配 token
手机打开 设置 → 电脑协同,复制那串 token,在本机存一次(只需一次):
gwb token 3f9c0a7d4b6e… # 写到 ~/.config/gwb/config.json,权限 0600也可以用 GWB_TOKEN 环境变量覆盖,适合临时/多机场景。
命令行
gwb ping # 连通性 + 各表条数(首次约 3–6 秒,含蓝牙扫描)
gwb todos | habits | countdowns # 列表(--json 给脚本吃)
gwb todo add "写毕设" --icon book --color 2 --timing countdown --minutes 25
gwb todo done 5c32b591 # id 支持唯一前缀;--undone 改回未完成
gwb todo edit 5c32b591 --title "写毕设(改)" # 只改传了的字段
gwb todo rm 5c32b591 -y # 不给 -y 就拒绝
gwb habit add "读书" --target 2 --unit 章
gwb habit check 6f9ccd4d # 默认 +1(已达标时 -1,与手机上点一下一致)
gwb habit check 6f9ccd4d --delta -1
gwb cd add "二课·香文化" 2026-11-05T14:00
gwb cd rm 938ab965 -y--icon 可选值:scroll book cup dumbbell dog cat star apple music flame moon sun pencil flower sprout file heart bolt basketball coffee cloud cherry fish gamepad bulb gift clock。
接进 agent(MCP)
gwb-mcp 是标准 stdio MCP 服务器,22 个工具:
工具 | 作用 |
| 链路自检 + 各表条数 |
| 列表(待办与手机待办页同序) |
| 待办增/改字段/改完成/删 |
| 习惯增/改/打卡/删 |
| 倒计时增/改/删 |
| 今天全景:待办/习惯/喝水/睡眠/专注/下一个倒计时(一帧) |
| 记一杯水 / 今日喝水明细 |
| 最近睡眠记录(默认 14 天窗口)/ 补一条 |
| 今日专注轮次、分钟、按待办分组 |
| 主动断开,省手机电(下次调用自动重连) |
list_todos 可以传 only=open(只看未完成)或 only=today(未完成 + 今天完成的),
完成历史会一直长,只找活的时候别拉全量。add_* 都接受可选 id:传了就是 upsert,
同一个 id 重试不会变两条。
today_summary / log_water / water_today / list_sleep / log_sleep / focus_today
需要手机端 GoWorkBro 3.8+(协议 v2)。旧版 app 上调用会得到一条
too_old: … 先升级 app,其余工具照常工作。
注册示例:
# pi
pi mcp add goworkbro -- ~/.local/bin/gwb-mcp
# Claude Code
claude mcp add goworkbro -- ~/.local/bin/gwb-mcp// Cursor / 其他 ~/.config/*/mcp.json
{ "mcpServers": { "goworkbro": { "command": "~/.local/bin/gwb-mcp" } } }# Codex ~/.codex/config.toml
[mcp_servers.goworkbro]
command = "~/.local/bin/gwb-mcp"行为特性:
连接在调用之间复用:一次扫描约 3 秒,若每条命令都重扫就没法用了;实测首次约 3–6 秒, 之后单次约 0.1–0.2 秒(2026-11-03 实测:协商 MTU 前
ping0.34 s /todos.list0.5 s)。空闲 5 分钟自动断开(BLE 连接态耗手机电)。链路掉了重连一次,但不重发已经发出的写入 —— 宁可报错,也不在你的库里留重复条目。
删除类工具必须
confirm=true,否则以工具错误返回(模型能看见原因),不会静默删。并发调用安全:所有走蓝牙的操作(含 id 解析)在同一把锁里串行,回复按回显的
op校验,失步就丢弃连接重连。写操作的重放:
add_*由客户端生成 id,重试不会建出第二条;其余写在链路中断时只报link_lost,不自动重发(丢响应与写已生效无法区分),先 list 核对。
安全
手机端默认关闭;打开时生成 token,每一条请求都校验。BLE 配对是 Just Works(不做认证), 所以真正管权限的是 token。
token 存在 app 的私有设置表里,因此会随它的 JSON 备份一起导出 —— 备份文件等于凭据。
换手机 / 怀疑泄漏时,在设置里关掉再打开「电脑协同」即可作废旧 token。
已知环境问题
Linux 需要 BlueZ 跑着(
bluetoothctl show能看到控制器、Powered: yes)。手机的 BLE 地址会轮换,所以不缓存 MAC,每次扫描服务 UUID —— 不要「优化」掉这一步。
手机侧的 BLE 广播靠前台服务维持;MIUI/澎湃建议给 app 设「无限制」电池策略。
协议
线上协议见 docs/protocol.md(与 app 仓库的 docs/remote-protocol.md 同源)。
License
MIT
Available Tools
22 toolsadd_countdownC
新建倒计时。when 是本地时间、无时区,形如 2026-11-20T09:00 或 2026-11-20T09:00:00。
Inputs: when (required), title (required), id, color.
add_habitB
新建一个习惯,返回它的 id。target_count 为每日目标次数(1..99,默认 1)。
Inputs: title (required), id, icon, unit, +2 more.
add_todoB
新建一条待办,返回它的 id。
icon 取 CartoonIcons 的 key(scroll book cup dumbbell dog cat star apple music flame moon sun pencil flower sprout file heart bolt basketball coffee cloud cherry fish gamepad bulb gift clock),默认 scroll。 color 是图标底色下标 0..7。timing 为 none / forward / countdown,countdown 时用 minutes 给时长(分钟)。
Inputs: title (required), id, icon, color, +2 more.
check_habitB
打卡一次:默认 +1(已达标时 −1,与手机上点一下的行为一致),delta 可显式指定增减。
Inputs: id (required), delta.
delete_countdownA
删除一个倒计时。必须传 confirm=true —— 不可恢复,删除前先和用户确认。
Inputs: id (required), confirm.
delete_habitA
删除一个习惯。必须传 confirm=true —— 不可恢复,删除前先和用户确认。
Inputs: id (required), confirm.
delete_todoA
删除一条待办。必须传 confirm=true —— 不可恢复,删除前先和用户确认。
Inputs: id (required), confirm.
disconnectA
主动断开蓝牙连接(省手机电)。下次工具调用会自动重连。
Inputs: no named parameters.
focus_todayA
今天的专注统计(需要 app 3.8+):轮次、总分钟,以及按待办分组的分钟数。
Inputs: no named parameters.
list_countdownsA
列出全部倒计时,按到期时间升序;target_at 是本地时间字符串。
Inputs: no named parameters.
list_habitsA
列出全部习惯,含当前计数 current_count / 目标 target_count 与今日是否达标。
Inputs: no named parameters.
list_sleepA
最近的睡眠记录(需要 app 3.8+),按醒来时间倒序,默认 14 天窗口。
minutes 是单次时长;day 是这条被归到的日历日(醒来的那天),今天的总量看 today_minutes。
Inputs: days.
list_todosA
列出待办,顺序与手机待办页一致:未完成在前、新的在上。
only: all(默认,含全部完成历史)/ open(只看未完成)/ today(未完成 + 今天完成的, 就是手机待办页上肉眼可见的那些)。历史会一直长,只想找活的时候用 open。
Inputs: only.
log_sleepB
补一条睡眠记录(需要 app 3.8+):两个端点都是本地时间、无时区, 形如 2026-11-04T23:00。wake_at 必须晚于 sleep_at 且不能是未来。
Inputs: wake_at (required), sleep_at (required), id.
log_waterA
记一杯水(需要 app 3.8+)。ml 省略时用手机上第一个快捷杯量(默认 150)。 返回今日累计 today_ml 与目标 goal_ml。
Inputs: id, ml.
pingA
检查链路是否活着,并返回各表条数与手机端协议版本。第一次调用会扫蓝牙(约 3 秒)。
Inputs: no named parameters.
set_todo_doneA
把待办标记完成(done=true)或改回未完成(done=false)。完成日按手机当前日历日记。
Inputs: id (required), done.
today_summaryA
今天的一帧全景(需要 app 3.8+):待办未完成/今日完成、习惯达标数、喝水 ml/目标、 昨夜睡眠分钟 + 连续达标天数 + 最近一次记录、今日专注轮次/分钟、最近的倒计时。
回答「今天怎么样」只需这一次调用,不要拿四张表拼。
Inputs: no named parameters.
update_countdownA
改一个倒计时的标题/到期时间/颜色;没传的字段保持原样。
Inputs: id (required), when, color, title.
update_habitB
改一个习惯的标题/目标次数/单位/图标/颜色;没传的字段保持原样,今日计数不受影响。
Inputs: id (required), icon, unit, color, +2 more.
update_todoA
改一条待办的标题/图标/颜色/计时模式;没传的字段保持原样,完成状态不受影响。
只想改标题就别用 add_todo —— 那会带上一个新 id 造出第二条。
Inputs: id (required), icon, color, title, +2 more.
water_todayA
今天的喝水明细(需要 app 3.8+):总量、目标、快捷杯量、每一条记录。
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Tools are cleanly separated by resource (todo/habit/countdown/water/sleep/focus) and action, and the read-vs-write pairs (water_today vs log_water, list_sleep vs log_sleep) are clearly distinguishable. The only real overlap is today_summary versus the per-domain readers, but its description explicitly tells the agent to use it alone instead of stitching four tables together.
All names are lowercase snake_case with a predictable verb_noun shape for the CRUD set (list/add/update/delete_todo, set_todo_done, check_habit, log_water), plus a repeated *_today read pattern. Minor deviations (ping, disconnect, and the word-order split between water_today/focus_today and today_summary) keep it from a perfect score.
22 tools is on the heavy side, but the surface spans six distinct domains (todos, habits, countdowns, water, sleep, focus) plus connection handling, so most tools pull their weight. Still, several domains carry full four-tool CRUD blocks where a leaner aggregate could have reduced the set.
Todos, habits and countdowns have full create/update/delete lifecycles, but the logging domains are one-way: water and sleep can be logged and read but never corrected or deleted, and focus is read-only with no per-item get for any resource. An agent that mis-logs a water cup or sleep entry has no recovery path.
Maintenance
Related MCP Connectors
Read pet activity and weight history, and log events with your permission.
Reach your own phone from an AI agent: notifications, approval questions, reminders, ring, files.
Read, start and move the routines on your iPhone; suggest changes you approve on the phone.
Access COROS activity, training and health data, and manage training plans and workouts.
Related MCP Servers
- AlicenseAqualityDmaintenanceA stateful Bluetooth Low Energy (BLE) MCP server that enables AI agents to scan, connect, read/write characteristics, and subscribe to notifications on BLE devices.3569 PyPI19MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to control iOS BLE devices through a WebSocket bridge and Safari extension, allowing scanning, connecting, reading, and writing BLE characteristics from an iPhone.-
- AlicenseNot gradedqualityCmaintenanceProvides MCP tools to read and update a local-first personal OS for goals, tasks, habits, food, workouts, and check-ins. Enables assistants to manage daily life data and interact with an evidence-grounded AI coach.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI frontends to read Xiaomi Smart Band 10 Pro health data (heart rate, sleep, steps, battery) and send haptic notifications to the wrist via the knock tool.1AGPL 3.0