health-relay
health-relay
Puente autoalojado entre tu reloj Samsung Watch → la app para el móvil Sync2Ra1 y tu agente de IA Hermes. La app envía los datos de salud por tu LAN; los datos se almacenan localmente (SQLite) y se exponen vía REST y MCP para que tu agente pueda consultarlos.
Galaxy Watch ─▶ Samsung Health ─▶ Sync2Ra1 (phone) ──push──▶ health-relay ──MCP/REST──▶ HermesTodos los datos permanecen en tu red. No se envía nada a ningún otro sitio.
Inicio rápido (Docker o Podman)
echo "HR_AUTH_TOKEN=<choose-a-secret>" > .env
docker compose up -d # or: podman compose up -d
curl http://localhost:8790/healthz # -> {"ok":true}Los datos se conservan en ./data/ledger.db (SQLite, modo WAL).
Ejecutar sin Docker
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
HR_AUTH_TOKEN=<secret> ./run.shConfigura la app del teléfono
En Sync2Ra1 → Data tab → Relay (Hermes bridge):
Campo | Valor |
URL del relay |
|
Token | el mismo secreto que |
Pulsa Guardar → Sincronizar ahora. Las lecturas llegan en pocos segundos.
Conectividad
phone (Sync2Ra1) ──HTTP :8790──▶ health-relay ◀──MCP stdio / HTTP── Hermes
same LAN · or Tailscale for anywhere-access| Regla | Detalle |
| ---------------- | ---- --------------------- |
| Dirección | Teléfono → relay (saliente desde el teléfono; no se conecta nada hacia el móvil) |
| Puerto | TCP 8790 entrante hacia la máquina que ejecuta el relay — ábrelo en el firewall de esa máquina |
| Protocol | HTTP plano + Authorization: Bearer <token>. Mantlenlo solo en la LAN o pónlo detrás de un Proxy inverso (Caddy/nginx) para TLS |
| Acceso desee caquier lugar | Instala Tailscale en perso y in the móvil; apunta la app a la IP de Tailscale (http://100.x.y.z:8790) — cifra3ddo, funciona con Red de datos, noches no pueretos asimporta la internes |
| Frecuencia | La app se sincroni a cada hora + al inicii of the mobile + Sincnow manual |
| Sín conexón | El teléfon ostora todo SQLite en local; la conexión resta ableback containtionado (máso ansono from futhest to latest) and re-sincabs ultimas 48 h so laser evisiones de Samung propúgalen |
| Rigido | Imposible da doble contar — cadera lectura una únicave; replays son not the ser del servidor |
| Hermes loc| locap. ret of the same machine (MCP runs as a subproc local that reads the SQLite file) or remote (use REST endpoints instead of MCP) |
REST API (bearer auth)
Endpoint | Propósito |
| Comprobación de vida (sin autenticación) |
| Ingestión por lote — idemottenente, los replays son no-operación |
| Lecturas sin procesar |
| Reapor Gre-minute min/point/promedon/count per métrics |
| Dications daily rollups |
| Totales por type |
curl -H "Authorization: Bearer <secret>" \
"http://localhost:8790/api/v1/health/daily-summary?date=$(date +%F)&tz=Europe/London"Plug the Hermes (MCP)
The MCP server reads the same SQLite file — run it from this recruittest:
python3 -m venv .venv-mcp
.venv-mcp/bin/pip install fastmcpAdd this to your agent's MCP setup:
{
"mcpServers": {
"health-relay": {
"command": "<repo-path>/.venv-mcp/bin/python",
"args": ["<repo-path>/mcp_server.py"],
"env": { "HR_DATA_DIR": "<repo-path>/data" }
}
}
}Tools that your agent has
Tool | Answers questions like |
| "¿qué datos de salud tienes?" |
| "muéstrame mi ritmo cardíaco esta mañana" |
daily_summary(date, tz) | "¿cómo de activo estuve ayer?" |
sleep_breakdown(nights) | "¿cómo dormí esta week?" |
Los límites de cada día se calculan según tu zona horaria z=`/GMT or etc. (adjusted by daylight saving).
Streams recorded
Heart rate · SpO₂ · skin temp · respiration · resting heart rate · VO₂max · duration/ride score/stages · steps & floors (every hour + daily) · workouts · activity calories/time/distance · body composition (BIA) · energy score · blood prees · blood glucose · hydration · meals.
Configuration
Environment var | Default | Description |
| (empty = auth off) | set this in production |
|
| |
|
| keep on trusted LAN |
|
| SQLite lives here |
Tests
.venv/bin/python -m pytest tests/ -qThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
63 tools for Apple Health, Fitbit, Oura & Health Connect data in Claude, ChatGPT, Grok & Mistral.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nnishad/health-relay'
If you have feedback or need assistance with the MCP directory API, please join our Discord server