Bluetooth LE Health Sensors

v0.1.3
io.github.K-Dense-AI/labmcp-ble-health Checked 1 day ago Published 2 months ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_connection_info Get Connection Info

Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.

get_command_log Get Command Log

Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.

ParameterTypeDescription
limitinteger

reconnect Reconnect

Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).

scan_devices Scan Devices

Scan for nearby Bluetooth LE devices: address, name, signal strength and advertised health services. Works without a configured --address. Devices only show up while advertising (monitors often advertise only right after a measurement), and some do not list every service in their advertisement, so `service` filtering can miss them.

ParameterTypeDescription
name_containsCase-insensitive name filter
servicestringOnly list devices advertising this service
timeout_snumberHow long to listen for advertisements

get_device_info Get Device Info

Read the device's identity (manufacturer, model, serial, firmware), the standard health services it exposes and its features. Features include the body sensor location, supported oximeter / blood-pressure status flags, scale resolution and thermometer site.

read_battery Read Battery

Read the device's battery level (Battery Service, 0-100 %).

record_heart_rate Record Heart Rate

Record heart rate for `duration_s`: bpm series, RR intervals and time-domain HRV (mean HR, SDNN, RMSSD, pNN50). The sensor must be worn with good skin contact. HRV statistics are for research, not clinical ECG analysis. Use `save_path` to keep every packet as CSV.

ParameterTypeDescription
duration_snumberRecording length in seconds
max_pointsintegerMax points returned per series
save_pathOptional new .csv file for the full recording (never overwrites a file)

read_pulse_oximetry Read Pulse Oximetry

Read SpO2 (%) and pulse rate from a pulse oximeter, averaged over a few seconds or as a single spot-check reading. Continuous mode listens for `duration_s` and returns the latest valid values plus mean/min; spot-check mode waits for the oximeter's single stable reading. Early packets are often NaN while the sensor acquires; these are counted in `unavailable_samples`, never reported as values.

ParameterTypeDescription
duration_snumberContinuous mode: seconds to average over
modestringauto: connect, then continuous if the oximeter supports it, else wait for a spot-check. spot_check: wait for a reading even if the oximeter is not advertising yet
timeout_snumberSpot-check mode: seconds to wait

wait_for_blood_pressure Wait For Blood Pressure

Wait for a blood pressure monitor to send a measurement: systolic, diastolic and mean arterial pressure (mmHg) and pulse rate. Call this, then ask the participant to start a measurement on the monitor. kPa readings are converted to mmHg; the unit sent is reported. Older stored readings are listed separately.

ParameterTypeDescription
timeout_snumberSeconds to wait for a measurement

read_temperature Read Temperature

Wait for a thermometer to send a temperature measurement and return it in °C. °F readings are converted; the measurement site is included if the device reports one.

ParameterTypeDescription
accept_intermediatebooleanIf no final measurement arrives before the timeout, return the latest Intermediate Temperature value (probe still settling) instead of an error
timeout_snumberSeconds to wait for a measurement

read_weight Read Weight

Wait for a scale to send a weight measurement (kg), with BMI and height if the scale sends them. Ask the person to step on the scale after calling this. lb readings are converted to kg.

ParameterTypeDescription
timeout_snumberSeconds to wait for a measurement