Capillus Hermes MCP
Enables tracking and monitoring of Capillus Bluetooth caps for treatment sessions, adherence, and device status using local BLE data, without requiring cloud APIs.
README
Capillus Hermes MCP
Local-first Bluetooth tracking and MCP tools for Bluetooth-enabled Capillus caps.
This repo has two pieces:
monitor/: a Python BLE monitor that detects a Capillus cap when it powers on for treatment, logs local observations, and infers completed treatment sessions.src/: a read-only Model Context Protocol server for Hermes, Claude Desktop, or any MCP client. It reads the monitor's local files and exposes status, sessions, adherence, observations, and device identity.
No Capillus account, cloud API, private endpoint, scraping, or app automation is required.
What It Tracks
Bluetooth-enabled Capillus caps appear only during the treatment power window. The monitor watches for a cap-like BLE advertisement, then records:
- cap present/offline state
- latest RSSI and BLE identity
- inferred treatment start/end
- completed sessions
- raw observed BLE duration, inference window, credited treatment duration, and completion basis
- daily adherence and streaks
The default matcher looks for names like Capillus_CAP, manufacturer data keys, and optional pinned addresses. You can use your own cap by turning it on once and letting the monitor auto-detect it, then pinning the discovered identity in monitor/config.json.
By default a session is marked complete after a full 360-second observed treatment window, a near-full observed cap power window within complete_grace_seconds, or a near-full stale-close window where the monitor saw the cap recently enough to infer that the treatment cycle kept running after the last advertisement. The raw BLE window is preserved as observed_duration_seconds; the stale-close span is preserved as inference_window_seconds and close_detected_at; the credited treatment duration is exposed as inferred_duration_seconds with a completion_basis such as observed_full_window, inferred_cap_power_cycle, or inferred_stale_power_window. Much shorter observations remain incomplete, because dropped BLE advertisements should not become false adherence credit.
Install The Monitor
mkdir -p ~/.capillus-home-monitor
cp monitor/capillus_monitor.py ~/.capillus-home-monitor/
cp monitor/config.example.json ~/.capillus-home-monitor/config.json
cd ~/.capillus-home-monitor
python3 -m venv .venv
.venv/bin/pip install -r /path/to/capillus-hermes-mcp/monitor/requirements.txt
Run once from a GUI terminal and turn the cap on:
~/.capillus-home-monitor/.venv/bin/python ~/.capillus-home-monitor/capillus_monitor.py --config ~/.capillus-home-monitor/config.json run
On macOS you must grant Bluetooth permission to the Python process in System Settings. For always-on tracking, edit monitor/deploy/launchd/com.example.capillus-monitor.plist, replace /Users/YOU, copy it to ~/Library/LaunchAgents/, and bootstrap it with launchctl.
Optional Open Brain Sync
If you run Open Brain locally, the included sync loop can capture durable adherence facts through Open Brain's normal capture_thought path. It captures each completed session once and, after the configured local evening hour, captures one missing-treatment alert if the daily goal has not been met.
In monitor/config.json, enable and point the sync at your local Open Brain checkout:
{
"openbrain": {
"enabled": true,
"repo_path": "/Users/YOU/open-brain",
"tenant": "default",
"time_zone": "America/New_York",
"person_name": "the wearer",
"daily_rule": "Daily Capillus treatment is required and non-negotiable."
}
}
Run once:
/Users/YOU/open-brain/.venv/bin/python ~/.capillus-home-monitor/capillus_openbrain_sync.py --config ~/.capillus-home-monitor/config.json once
For always-on sync, edit monitor/deploy/launchd/com.example.capillus-openbrain-sync.plist, replace /Users/YOU, copy it to ~/Library/LaunchAgents/, and bootstrap it with launchctl.
Install The MCP Server
npm install
npm run build
Point the MCP at your monitor data:
export CAPILLUS_MONITOR_DATA_DIR="$HOME/.capillus-home-monitor/data"
node dist/src/index.js
For Hermes, configure a stdio MCP server equivalent to:
mcp_servers:
capillus:
enabled: true
command: /usr/local/bin/node
args:
- /path/to/capillus-hermes-mcp/dist/src/index.js
env:
CAPILLUS_MONITOR_DATA_DIR: /Users/YOU/.capillus-home-monitor/data
CAPILLUS_TIME_ZONE: America/New_York
Hermes exposes the tools with its normal mcp_<server>_<tool> prefix, for example mcp_capillus_capillus_today.
Tools
capillus_status: current presence, latest seen time, active session, device identity.capillus_today: local-day treatment completion and active session.capillus_sessions: recent inferred treatment sessions, including observed duration, inference window, credited duration, and completion basis.capillus_adherence: daily adherence, missed days, and current streak.capillus_observations: recent matched BLE observations and optional nearby candidates.capillus_device: pinned identity and observed proprietary BLE service notes.
Observed BLE Shape
The cap observed during development advertised as Capillus_CAP. A read-only GATT probe showed a proprietary UART-style service:
- service:
49535343-fe7d-4ae5-8fa9-9fafd205e455 - characteristic:
49535343-1e4d-4bd9-ba61-23c647249616 - characteristic properties:
write,notify,indicate,write-without-response
The public monitor does not send control commands. It uses local Bluetooth presence and timing only.
Safety
This is adherence telemetry, not medical advice. It does not evaluate hair growth, alter treatment, or control the cap.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。