miband-mcp
miband-mcp
진희(晨熹) · AI가 당신의 손목을 읽게 하세요
타사 의존성 없는 Python MCP Server: Gadgetbridge에서 내보낸 SQLite 데이터베이스(미밴드 건강 데이터)를 읽어 MCP 프로토콜을 통해 MCP를 지원하는 모든 AI 클라이언트(Reasonix / Claude / Cursor / Kimi / GLM 등)에 노출하여, AI가 "오늘 몇 걸음 걸었어?" "어젯밤 잠은 잘 잤어?" 같은 질문에 답할 수 있게 합니다.
아키텍처
小米手环 9 / 9 Pro / 10 → Gadgetbridge(手机端采集)→ SQLite 导出 → miband-mcp(读库+聚合)→ MCP 协议 → AIRelated MCP server: garmin-givemydata
제공 도구
도구 | 매개변수 | 반환 |
|
| 최근 N개 심박수(시간 + bpm) |
|
| 취침/기상 시간, 수면 단계(light/deep/rem), 총 시간 |
|
| 걸음 수, 평균/최고/최저 심박수 |
빠른 시작
1. 데이터 소스 준비
휴대폰에 Gadgetbridge 설치(공식 저장소는 Codeberg이며, GitHub가 아님)
공식 페어링 가이드에 따라 밴드 연결(미밴드 9는 밴드가 먼저 연결을 시작해야 함: 밴드 설정 → 시스템 작업 → 새 휴대폰 연결)
미밴드 건강 로그에서 32비트
encryptKey를 추출하여 페어링 키로 사용(참고: 연결 후에는 연결 해제 불가, 그렇지 않으면 키가 무효화됨)Gadgetbridge 설정 → 자동화 → 데이터베이스 자동 내보내기 활성화
2. MCP 서버 실행
# 零依赖,纯标准库
python miband_mcp.py --db /path/to/gadgetbridge.db3. AI 연결(Reasonix 예시)
[[plugins]]
name = "miband"
type = "stdio"
command = "python"
args = ["<路径>/miband_mcp.py", "--db", "<路径>/gadgetbridge.db"]
auto_start = true그런 다음 /new 새 세션을 시작하면 적용됩니다.
⚠️ 현재 제한 사항
데이터 동기화는 수동 모드입니다: 이 프로젝트는 Gadgetbridge가 내보낸 SQLite 데이터베이스 스냅샷을 읽으며, 밴드에서 자동으로 데이터를 가져오지 않습니다.
현재 워크플로우:
밴드 데이터는 Gadgetbridge가 수집(먼저 동기화 필요)
내보낸 데이터베이스 파일(
.db)을 miband-mcp가 실행 중인 컴퓨터로 수동 전송AI가 MCP 도구를 통해 데이터베이스의 최신 데이터를 읽음
따라서: AI가 답하는 것은 "가장 최근에 동기화된 데이터"이며 실시간 데이터가 아닙니다. 실시간 읽기가 필요하다면 Termux 스크립트 + 정기 동기화를 결합하여 .db 파일을 PC로 자동 푸시할 수 있습니다(이 프로젝트에는 아직 구현되지 않았으며 PR 환영).
개발
python -m unittest discover -s tests -v # 34 个测试,零依赖라이선스
MIT © ChenxiDawn · 晨熹
This server cannot be deployed
Maintenance
Related MCP Connectors
- SomviaOAuthapp.somvia
Apple Health training load, recovery, HRV and workout detail for Claude, ChatGPT and any MCP client.
Ask your AI about your fitness: activities and data from Garmin, COROS, Strava, GPX and more
- freddyOAuthcoach.freddy
Connect your wearables, rings and training apps, then ask your AI about your own health data.
Connect your health, fitness, nutrition, sleep, and wearable data to your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying health data from the Health Auto Export app on iPhone/iPad via MCP, allowing LLMs like Claude to access and analyze personal health metrics.7 npm66MIT
- AlicenseBqualityAmaintenanceDownloads all your Garmin health and fitness data into a local SQLite database and exposes 45 MCP tools for AI analysis, enabling assistants to query sleep, training load, HRV, and more.4893 PyPI158AGPL 3.0
- AlicenseNot gradedqualityAmaintenanceRead-only MCP server that exposes Apple Health data (steps, workouts, sleep, etc.) from a local SQLite store, allowing AI agents to query health metrics without sending data to hosted services.8Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to retrieve and analyze Garmin Connect health data, including daily summaries, sleep, HRV, workouts, and raw FIT files, while also supporting SQL queries on the underlying database.8-