Bluetooth LE Health Sensors

io.github.K-Dense-AI由 GitHub 帳號 K-Dense-AI 發布v0.1.3更新於 Oct 24, 2026

MCP server for Bluetooth LE health sensors (standard GATT profiles).

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理掃描並讀取採用標準 GATT 設定檔的藍牙低功耗健康感測器,例如心率、血氧、血壓、體溫與體重。

可以做什麼
  • 掃描附近的藍牙低功耗裝置,回報位址、名稱、訊號強度與廣播的健康服務
  • 讀取裝置身分資訊、所暴露的健康服務以及電池電量
  • 記錄心率與 RR 間期,並計算時域 HRV(平均心率、SDNN、RMSSD、pNN50),可將原始資料存成新的 CSV 檔
  • 讀取血氧計的 SpO2 與脈率,支援數秒平均或單次點測
  • 等待並回傳血壓、體溫與體重測量值,含單位換算與裝置儲存讀值的處理
  • 檢視連線資訊與原始指令日誌,並在裝置斷電重啟後重新連線
適用情境
適用於生理學實驗室、運動科學與睡眠/HRV 研究及實驗室維運情境,讓助理擷取標準設定檔藍牙感測器的讀值。適合在會話中直接記錄或彙整量測結果而不需原廠 App。明確不供診斷、病人監測或任何臨床決策使用。
執行需求
以本機 Python 套件(labmcp-ble-health,通常透過 uvx 執行)在支援藍牙低功耗的 Linux、macOS 或 Windows 上執行,底層使用 bleak。裝置位址透過 LABMCP_ADDRESS 或 --address 選項提供;未提供位址時仍可掃描。macOS 需為啟動伺服器或客戶端 App 的終端機授予藍牙權限。提供免硬體的模擬器模式。
安裝前請注意
並非醫療器材:讀值僅供研究與實驗室維運使用,消費級感測器可能不準確,輸出不得用於健康決策。人體讀值屬個人資料,須遵守倫理審查與資料保護規範。此伺服器僅在模擬後端測試過,尚未在實體硬體驗證。指定儲存路徑時會寫入 CSV 檔;裝置通常只接受一個連線,需先關閉原廠 App。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Bluetooth LE Health Sensors,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Bluetooth LE Health Sensors — MCP Server

Let an AI agent read any Bluetooth Low Energy sensor that implements the standard Bluetooth SIG health profiles: record heart rate with RR intervals and HRV from a chest strap, read SpO2 and pulse rate from an oximeter, and capture blood pressure, body temperature and weight readings from monitors, thermometers and scales, in physiology labs, sports-science studies, sleep/HRV research and lab-operations settings.

[!WARNING] Research and lab-operations use only. This is not a medical device. It is not intended for diagnosis, monitoring of patients, triage, or any clinical decision-making, and has not been validated or cleared by any regulator. Consumer sensors can be inaccurate; values pass through an AI agent that can misread them. Never use this server's output to make health decisions. Readings of people are personal data: follow your ethics approval and data-protection rules.

Packagelabmcp-ble-health
InstrumentsAny device implementing the Bluetooth SIG profiles: heart-rate straps/armbands (Heart Rate Service 0x180D), pulse oximeters (Pulse Oximeter Service 0x1822), blood pressure monitors (0x1810), thermometers (Health Thermometer 0x1809), weight scales (Weight Scale 0x181D), plus Battery (0x180F) and Device Information (0x180A)
InterfacesBluetooth Low Energy, via bleak (Linux/BlueZ, macOS/CoreBluetooth, Windows/WinRT)
ProtocolBluetooth SIG GATT: GATT Specification Supplement, HRS 1.0, PLXS 1.0.1, BLS 1.1.1, HTS 1.0, WSS 1.0.1; IEEE 11073-20601 SFLOAT/FLOAT per the PHD Transcoding White Paper v16
Status🧪 simulated: tested against a simulated BLE backend that emits byte-exact GATT packets, not yet verified on hardware. Report a hardware test

Try it without hardware

bash
uvx labmcp-ble-health --simulate --check

The simulator provides six devices (addresses 00:00:5E:00:53:01–06, from the IANA documentation range): a combined "health kit" (default) exposing every service, and a separate HR strap, oximeter, BP monitor, thermometer and scale. Pick one with e.g. --simulate --address 00:00:5E:00:53:04.

Connect your device

  1. Check the device uses the standard profiles. Only devices that implement the Bluetooth SIG services above work. Many consumer wearables (most smartwatches, many fitness bands, several BP-monitor and scale brands) use proprietary protocols instead, and some only speak the standard profile in a "pairing"/"data transfer" mode. Chest straps that advertise the Heart Rate Service are the most reliable choice for HRV work.
  2. Free the device. A BLE sensor usually accepts one connection: close the vendor's phone app (or switch phone Bluetooth off) before connecting.
  3. Find the address: start the server without --address and ask the agent to run scan_devices, or run it with --check after putting the device in advertising mode (wear the strap; press the monitor's Bluetooth/start button). On Linux/Windows the address is the MAC (AA:BB:CC:DD:EE:FF); on macOS it is a CoreBluetooth UUID that is specific to your computer.
  4. Test the connection:
    bash
    uvx labmcp-ble-health --address AA:BB:CC:DD:EE:FF --check                       # Linux / Windowsuvx labmcp-ble-health --address 1A2B3C4D-1111-2222-3333-444455556666 --check    # macOS
    Devices that require bonding (common for BP monitors and scales): add --option pair=true on Linux/Windows; macOS shows a system pairing prompt automatically. On Linux choose a non-default adapter with --option adapter=hci1; lengthen device discovery with --option connect_timeout_s=40 (at most 60 s).

macOS: the terminal (or MCP client app) that launches the server needs Bluetooth permission (System Settings › Privacy & Security › Bluetooth). Without it macOS terminates the process as soon as Bluetooth is touched (exit code 134), before any error message can be printed.

Add to your MCP client

Claude Code

bash
claude mcp add hr-strap -- uvx labmcp-ble-health --address AA:BB:CC:DD:EE:FF

Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)

json
{  "mcpServers": {    "hr-strap": {      "command": "uvx",      "args": ["labmcp-ble-health", "--address", "AA:BB:CC:DD:EE:FF"]    }  }}

Every tool is read-only (nothing on the device is changed, no control points are written), so --read-only makes no difference. Run one server entry per device if you use several sensors at once. For other clients, generate the snippet with uvx labmcp config ble-health --address AA:BB:CC:DD:EE:FF --client vscode (also cursor, codex, claude-code).

Tools

ToolKindDescription
get_command_log👁 readReturn the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.
get_connection_info👁 readReport which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.
get_device_info👁 readRead the device's identity (manufacturer, model, serial, firmware), the standard health services it exposes and its features.
read_battery👁 readRead the device's battery level (Battery Service, 0-100 %).
read_pulse_oximetry👁 readRead SpO2 (%) and pulse rate from a pulse oximeter, averaged over a few seconds or as a single spot-check reading.
read_temperature👁 readWait for a thermometer to send a temperature measurement and return it in °C.
read_weight👁 readWait for a scale to send a weight measurement (kg), with BMI and height if the scale sends them.
reconnect🛑 safetyClose and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).
record_heart_rate👁 readRecord heart rate for duration_s: bpm series, RR intervals and time-domain HRV (mean HR, SDNN, RMSSD, pNN50).
scan_devices👁 readScan for nearby Bluetooth LE devices: address, name, signal strength and advertised health services. Works without a configured --address.
wait_for_blood_pressure👁 readWait for a blood pressure monitor to send a measurement: systolic, diastolic and mean arterial pressure (mmHg) and pulse rate.

get_connection_info, get_command_log and reconnect are built into every LabMCP server.

Safety limits

LimitDefaultMeaning
max_record_duration_s600 sLongest heart-rate recording or continuous-oximetry averaging window an agent may start
max_wait_s300 sLongest time a tool may wait for a blood pressure, temperature, weight or spot-check reading

Override at launch: --limit max_record_duration_s=1800. Note that many MCP clients also enforce their own per-tool-call timeout; long recordings may need that raised too (e.g. MCP_TOOL_TIMEOUT in Claude Code).

Example prompts

  • "Record 5 minutes of heart rate from the chest strap and give me mean HR, SDNN and RMSSD, and save the raw RR intervals to ~/hrv/p07_baseline.csv."
  • "Scan for heart-rate straps nearby and tell me which one has the strongest signal."
  • "Wait for the blood pressure monitor: I'll start the cuff now. Report systolic/diastolic and whether the device flagged movement or an irregular pulse."
  • "Average SpO2 and pulse rate over 30 seconds from the oximeter and tell me how many samples were unusable."
  • "Read the scale when the participant steps on it and log weight and BMI with the device timestamp."
  • "What's the battery level of the strap before we start the session?"

Notes

  • Measurement devices push, they are not polled. Blood pressure monitors, thermometers, scales and spot-check oximeters only indicate a value when a measurement completes (these characteristics cannot be read). Call the tool first, then take the measurement. The tool keeps scanning and reconnecting until its timeout because many monitors only advertise right after measuring (for oximeters this needs mode="spot_check"; auto must connect first to find out which mode the device supports).
  • One measurement at a time. Starting a measurement cancels one that is still running on the same server (for example a recording whose tool call already timed out in the MCP client), and reconnect cancels it too; the cancelled call returns an error.
  • Malformed packets are skipped and logged (get_command_log) rather than discarding the whole recording; record_heart_rate and read_pulse_oximetry report how many in malformed_packets.
  • save_path (record_heart_rate) must be a new .csv file: ~ is expanded, missing folders are created, and an existing file is never overwritten. It is checked before recording starts.
  • Stored measurements. Monitors send unsent stored readings back-to-back, oldest first, when they connect. Tools keep listening 1.5 s after the first one and return the newest as the result, listing older ones in other_measurements; the device clock time is in device_timestamp (device local time, often wrong if the clock was never set).
  • Special values (IEEE 11073 NaN, NRes, ±INF) are never turned into numbers: they are reported as null with an explanation (special_values, unavailable_samples). Oximeters typically send NaN for the first seconds while acquiring.
  • Units: blood pressure in kPa is converted to mmHg (1 kPa = 7.500617 mmHg), °F to °C, lb to kg; unit_reported says what the device sent. Weight resolution is 0.005 kg / 0.01 lb per the Weight Scale spec; 0xFFFF means "measurement unsuccessful" and is returned as weight_kg: null. Energy expended is in kJ (HRS 1.0).
  • HRV is computed from the RR intervals the sensor sends (unit 1/1024 s): SDNN (sample SD), RMSSD, pNN50. RR intervals outside 0.3–2.0 s are excluded as artefacts; no further artefact correction or ectopic-beat editing is done. If a notification is lost over the air, the successive difference across that gap is not a true beat-to-beat difference. Optical wrist sensors often send no RR intervals at all. Use a validated ECG system for anything beyond exploratory research.
  • The Enhanced Blood Pressure Measurement, Record Access Control Point (downloading a monitor's whole memory), Current Time and User Data services are not implemented; nothing is ever written to the device.
  • Bluetooth pairing, bonding keys and OS permissions are handled by the operating system; the server never sees PINs.

Hardware verification

ModelFirmwareInterfaceVerified byDate
none yet: be the first

來源:servers/health/ble-health-sensors/README.md,提交 46545ea

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.1.3最新Sep 27, 2026
  2. v0.1.1Sep 26, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分