Provides tools for querying and managing multiple Garmin Connect accounts, allowing access to user profiles, health statistics, training readiness data, and detailed activity logs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Garmin Multi-Account MCPShow me Alice's training readiness and step count for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Garmin Multi-Account MCP
這是新的正式專案,目標是讓 ChatGPT Web 透過公開 HTTPS 連到一個遠端 MCP server,並查詢多個預先配置的 Garmin 帳號。
這個專案的設計來源:
../garmin_mcp1: 參考 Garmin Connect 工具與認證流程../garmin_mcp2: 參考遠端 HTTP 暴露與docker-compose思路
但正式程式碼只放在目前這個 project/ 目錄。
目前已完成
多帳號 YAML 設定檔
每個 Garmin 帳號獨立 token 路徑
遠端 MCP 啟動模式
第一批常用查詢工具
Dockerfile
docker-compose
目前提供的工具
list_accountsget_account_statusget_full_nameget_user_profileget_statsget_steps_dataget_training_readinessget_activities_by_dateget_activities_fordateget_activityget_activity_splits
每個查詢工具都需要傳入 account_id,避免查到錯的人。
專案結構
project/
├── config/
│ └── accounts.example.yaml
├── data/
│ └── tokens/
├── src/
│ └── garmin_multi_mcp/
├── Dockerfile
├── docker-compose.yml
└── pyproject.toml1. 建立帳號設定檔
先複製範例:
cp config/accounts.example.yaml config/accounts.yaml然後依你的帳號調整 account_id、label、token_path 和 secret 路徑。
範例:
token_root: /data/tokens
default_account_id: alice
accounts:
- account_id: alice
label: Alice Garmin
token_path: /data/tokens/alice
token_base64_path: /data/tokens/alice.b64
email_file: /run/secrets/garmin_alice_email
password_file: /run/secrets/garmin_alice_password
- account_id: bob
label: Bob Garmin
token_path: /data/tokens/bob
token_base64_path: /data/tokens/bob.b64
email_file: /run/secrets/garmin_bob_email
password_file: /run/secrets/garmin_bob_password2. 先做每個帳號的 Garmin 登入
你需要逐一為每個帳號建立 token。
本機執行方式:
pip install -e .
garmin-multi-mcp-auth --accounts-file config/accounts.yaml --account-id alice
garmin-multi-mcp-auth --accounts-file config/accounts.yaml --account-id bob驗證 token:
garmin-multi-mcp-auth --accounts-file config/accounts.yaml --account-id alice --verify
garmin-multi-mcp-auth --accounts-file config/accounts.yaml --account-id bob --verify如果帳號有 MFA,CLI 會在終端機要求你輸入驗證碼。
3. 啟動遠端 MCP server
本機直接啟動:
export GARMIN_ACCOUNTS_FILE=config/accounts.yaml
export MCP_TRANSPORT=http
export MCP_HOST=0.0.0.0
export PORT=38080
export MCP_ALLOWED_HOSTS="192.168.1.100:*,mcp.example.com,mcp.example.com:*"
export MCP_ALLOWED_ORIGINS="http://192.168.1.100:*,https://mcp.example.com,https://mcp.example.com:*,https://chatgpt.com,https://chat.openai.com"
garmin-multi-mcp預設會提供遠端 MCP 入口:
http://localhost:38080/mcp4. 使用 Docker Compose
先準備:
cp config/accounts.example.yaml config/accounts.yaml
mkdir -p data/tokens啟動:
docker compose up --build -dCompose 預設會把服務暴露在:
http://localhost:38080/mcp如果你要讓 LAN IP 或公開網域可直接連線,需要把它們加入允許清單:
MCP_ALLOWED_HOSTS
MCP_ALLOWED_ORIGINS目前 docker-compose.yml 已預設包含:
192.168.1.100(範例 LAN IP,請依實際環境修改)mcp.example.com(範例網域,請替換為你的網域)
5. 連到 ChatGPT Web
你已經可以自行提供 HTTPS,所以只要把 tunnel 對到本機的 38080 埠即可。
ChatGPT Web Apps/Connectors 內填入:
https://your-domain.example.com/mcp注意事項
這個版本目前先實作「多帳號遠端讀取骨架 + 常用工具」。
garmin_mcp1原本有大量工具,後續可以依相同模式繼續搬進來。目前不做每位使用者自己的 OAuth,而是由伺服器管理員預先配置多組 Garmin 帳號。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.