mirror of
https://github.com/This-weiyuqing/mi-fitness-health.git
synced 2026-10-18 03:03:49 +08:00
feat: REST API with API keys, QR login, and web dashboard (v0.2.0)
- REST API (FastAPI): all data endpoints, sync (foreground/background), coverage stats, interactive docs at /docs - API key system: exchange Xiaomi credentials for mif_sk_* keys (multi-account contexts, last-used tracking, prefix revocation); static key via MI_FITNESS_API_KEY, admin endpoints via MI_FITNESS_ADMIN_KEY - QR code login: reverse-engineered Xiaomi universal QR flow (sid=xiaomiio), auto-issues API key after scan confirmation - Built-in web dashboard (Flask): visual console for all endpoints, key management, QR login; reverse proxy with server-side key relay - Standalone testpage/ console (python app.py, no install needed) - Fix: pin mcp<2 (SDK 2.x removed Server.list_tools, broke startup) - CI: install [all,dev] extras; docs: full technical documentation and QR login implementation guide
This commit is contained in:
1 parent
7fcd06980f
commit
2dd32f1ee6
21 files changed
+8723
-165
No files matched your search
+14
-2
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "mi-fitness-mcp"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
description = "MCP server for Mi Fitness data access"
|
||||
readme = "README.md"
|
||||
license = {text = "MIT"}
|
||||
@@ -23,7 +23,7 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
dependencies = [
|
||||
"mcp>=1.0.0",
|
||||
"mcp>=1.0.0,<2",
|
||||
"pydantic>=2.0.0",
|
||||
"httpx>=0.27.0",
|
||||
"platformdirs>=4.0.0",
|
||||
@@ -33,6 +33,18 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
api = [
|
||||
"fastapi>=0.110.0",
|
||||
"uvicorn>=0.29.0",
|
||||
]
|
||||
web = [
|
||||
"flask>=3.0.0",
|
||||
]
|
||||
all = [
|
||||
"fastapi>=0.110.0",
|
||||
"uvicorn>=0.29.0",
|
||||
"flask>=3.0.0",
|
||||
]
|
||||
dev = [
|
||||
"build>=1.2.2",
|
||||
"pytest>=8.0.0",
|
||||
|
||||
Reference in new issue
Block a user