Capillus Hermes MCP

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.

Category
Visit Server

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured