miband-mcp
miband-mcp
晨熹 · AI にあなたの手首を読ませる
サードパーティ依存ゼロの Python MCP Server:Gadgetbridge がエクスポートした SQLite データベース(Xiaomi スマートバンドの健康データ)を読み取り、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 ではありません)
公式の ペアリングガイド に従ってバンドを接続(Xiaomi スマートバンド 9 はバンド側から接続を開始する必要があります:バンド設定 → システム操作 → 新しいスマートフォンに接続)
Xiaomi ミライフ のログから 32 桁の
encryptKeyを抽出してペアリングキーとして使用します(注意:ペアリング後はバインド解除不可。解除するとキーが無効になります)Gadgetbridge 設定 → 自動化 → データベースの自動エクスポートを有効化
2. MCP Server の実行
# 零依赖,纯标准库
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 を実行している PC に送信しますAI は MCP ツールを通じてデータベース内の最新データを読み取ります
そのため:AI が答えるのは「直近の同期データ」であり、リアルタイムデータではありません。リアルタイム読み取りが必要な場合は、Termux スクリプト + 定期同期を組み合わせて、.db ファイルを PC に自動プッシュできます(本プロジェクトでは未実装です。PR 歓迎)。
開発
python -m unittest discover -s tests -v # 34 个测试,零依赖ライセンス
MIT © ChenxiDawn · 晨熹
This 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 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.760MIT
- AlicenseNot gradedqualityAmaintenanceDownloads 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.139AGPL 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.4Apache 2.0
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server that exposes Garmin Connect health data from a local SQLite database to AI assistants, enabling queries for recent days, sleep, weekly trends, and a guarded SQL query surface.MIT
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
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/ChenxiDawn/miband-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server