
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).
概览
本地 MCP 服务器,让助手扫描并读取采用标准 GATT 配置文件的蓝牙低功耗健康传感器,如心率、血氧、血压、体温和体重。
- 可以做什么
- 扫描附近的蓝牙低功耗设备,报告地址、名称、信号强度和广播的健康服务
- 读取设备身份信息、所暴露的健康服务以及电池电量
- 记录心率及 RR 间期,并计算时域 HRV(平均心率、SDNN、RMSSD、pNN50),可将原始数据保存为新的 CSV 文件
- 读取血氧仪的 SpO2 与脉率,支持数秒平均或单次点测
- 等待并返回血压、体温和体重测量值,含单位换算与设备存储读数的处理
- 查看连接信息与原始命令日志,并在设备断电重启后重新连接
- 适用场景
- 适用于生理学实验室、运动科学和睡眠/HRV 研究以及实验室运维场景,让助手采集标准配置文件蓝牙传感器的读数。适合在会话中直接记录或汇总测量结果而无需厂商 App。明确不用于诊断、患者监护或任何临床决策。
- 运行要求
- 以本地 Python 包(labmcp-ble-health,通常通过 uvx 运行)方式在支持蓝牙低功耗的 Linux、macOS 或 Windows 上运行,底层使用 bleak。设备地址通过 LABMCP_ADDRESS 或 --address 选项提供;不提供地址时仍可扫描。macOS 需为启动服务器或客户端应用的终端授予蓝牙权限。提供无需硬件的模拟器模式。
安装
在 SourceWeft 中
- 打开 控制台中的 Bluetooth LE Health Sensors,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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.
Try it without hardware
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
- 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.
- Free the device. A BLE sensor usually accepts one connection: close the vendor's phone app (or switch phone Bluetooth off) before connecting.
- Find the address: start the server without
--addressand ask the agent to runscan_devices, or run it with--checkafter 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. - Test the connection:
Devices that require bonding (common for BP monitors and scales): add
--option pair=trueon 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
Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)
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
get_connection_info, get_command_log and reconnect are built into every LabMCP server.
Safety limits
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";automust 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
reconnectcancels 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_rateandread_pulse_oximetryreport how many inmalformed_packets. save_path(record_heart_rate) must be a new.csvfile:~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 indevice_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
nullwith 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_reportedsays what the device sent. Weight resolution is 0.005 kg / 0.01 lb per the Weight Scale spec;0xFFFFmeans "measurement unsuccessful" and is returned asweight_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
来源:servers/health/ble-health-sensors/README.md,提交 46545ea
工具
0版本历史
2- v0.1.3最新Sep 27, 2026
- v0.1.1Sep 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分