Skip to main content

ble-hrm-server

A Python MCP server for Bluetooth Low Energy (BLE) Heart Rate Monitoring. Connects to BLE HRM devices, monitors heart rate, and provides tools for heart rate data analysis and visualization.

Features

  • Discover and connect to BLE Heart Rate Monitor (HRM) devices
  • Monitor heart rate in real time
  • Retrieve current, average, and maximum heart rate
  • Generate heart rate charts and time-bucketed data
  • Store and manage heart rate data

Installation

We recommend using a virtual environment and uv for dependency management:

python3 -m venv .venv
source .venv/bin/activate
pip install uv
uv sync

Or install directly from PyPI:

pip install ble-hrm-server

Usage

Run the server

If installed from source:

uv run src/hrm/server.py

If installed from PyPI:

uvx ble-hrm-server

Run tests

uv run pytest

Configuration

The server can be configured via a .env file. Use .env.sample as a template. Required environment variables:

  • QINIU_ACCESS_KEY: Your Qiniu access key
  • QINIU_SECRET_KEY: Your Qiniu secret key
  • QINIU_BUCKET_NAME: Qiniu bucket name
  • QINIU_BUCKET_DOMAIN: Qiniu bucket domain

Tools

  • monitoring_heart_rate: Start monitoring heart rate for a specified duration
  • get_heart_rate: Get the average heart rate over the last 10 seconds
  • evaluate_active_heart_rate: Get the maximum heart rate in the last 60 seconds
  • get_heart_rate_bucket: Get heart rate data in 1-second buckets for the last 10 seconds
  • build_heart_rate_chart: Generate a PNG chart of heart rate data for the last 600 seconds

License

MIT

Sponsor

Special thanks to Qiniu Cloud for providing storage and LLM inference services.

Metadata

Release files for ble-hrm-server 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ble-hrm-server 0.2.3
File Size Uploaded Provenance Actions
ble_hrm_server-0.2.3.tar.gz 9.0 kB Without provenance Details for ble_hrm_server-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ble-hrm-server 0.2.3
File Interpreter ABI Platform Actions
ble_hrm_server-0.2.3-py3-none-any.whl Python 3 none any Details for ble_hrm_server-0.2.3-py3-none-any.whl

Total release size: 18.0 kB

Release files / ble_hrm_server-0.2.3.tar.gz

Download URL ble_hrm_server-0.2.3.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2c444e372ef77a3795fd39c26be4d7587d6e5fdbf03f471878441995ee7d1f39
BLAKE2b-256 checksum
How to use checksums
b8b34b699cdd7d58634da954d02d2c75391169faead487ad22cbb8f4546461eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / ble_hrm_server-0.2.3-py3-none-any.whl

Download URL ble_hrm_server-0.2.3-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c298bb8d935ae69b5ddf2e977ce99f25cfac38ef43457394b5f1a0d89130936
BLAKE2b-256 checksum
How to use checksums
639bf8bfda6f7300de0e107fd061e91b8f67fad6b11cc68048fd27c62ab49caa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for ble-hrm-server 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page