Fitbit MCP Server
用于 AI 的 Fitbit MCP 连接器
将 AI 助手连接到您的 Fitbit 健康数据
让您的 AI 助手访问您的 Fitbit 数据,从而获得个性化健康洞察、趋势分析和自动追踪。可与 Claude Desktop 和其他兼容 MCP 的 AI 工具配合使用。
它的作用
🏃锻炼与活动- 获取详细的锻炼日志和活动数据
😴睡眠分析- 检索睡眠模式和质量指标
⚖️体重追踪- 了解一段时间内的体重趋势
❤️心率数据- 监测心率模式和区域
🍎营养日志- 回顾食物摄入量、卡路里和宏量营养素
👤个人资料信息- 访问基本的 Fitbit 个人资料详细信息
向你的人工智能询问这样的问题:“告诉我我这周的睡眠模式”或“我锻炼期间的平均心率是多少?”
Related MCP server: coros-mcp
快速入门
🚀 想要立即测试这些工具吗?
选项 1:从 npm 安装(推荐)
使用 OAuth 2.0 创建应用程序应用程序类型:
Personal设置回调URL:
http://localhost:3000/callback记下您的客户端 ID和客户端密钥
全局安装包:
npm install -g mcp-fitbit添加到您的 Claude Desktop 配置文件:
{
"mcpServers": {
"fitbit": {
"command": "mcp-fitbit",
"args": [],
"env": {
"FITBIT_CLIENT_ID": "your_client_id_here",
"FITBIT_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}配置文件位置:
Windows:%AppData%\Claude\claude_desktop_config.json
macOS:〜/资源库/应用程序支持/Claude/claude_desktop_config.json
Linux:~/.config/Claude/claude_desktop_config.json
重新启动 Claude Desktop 并询问您的 Fitbit 数据!
选项 2:开发设置
获取 Fitbit API 凭证(请参阅下面的安装)
然后运行:
git clone https://github.com/TheDigitalNinja/mcp-fitbit
cd mcp-fitbit
npm install
# Create .env with your Fitbit credentials
npm run dev这两个选项都会在http://localhost:5173打开MCP 检查器,您可以在其中以交互方式测试所有工具并处理 OAuth 流程。
安装
对于最终用户(npm 包)
在dev.fitbit.com获取 Fitbit API 凭证
将OAuth 2.0 应用程序类型设置为
Personal将回调 URL设置为
http://localhost:3000/callback
安装软件包:
npm install -g mcp-fitbit在包目录中创建
.env文件:首次运行
mcp-fitbit时,它会告诉你创建.env文件的确切位置。它看起来像这样:C:\Users\YourName\AppData\Roaming\npm\node_modules\mcp-fitbit\.env将您的凭据添加到
.env文件:FITBIT_CLIENT_ID=your_client_id_here FITBIT_CLIENT_SECRET=your_client_secret_here运行服务器:
mcp-fitbit
对于开发人员(来自源代码)
在dev.fitbit.com获取 Fitbit API 凭证
将OAuth 2.0 应用程序类型设置为
Personal将回调 URL设置为
http://localhost:3000/callback
克隆和设置:
git clone https://github.com/TheDigitalNinja/mcp-fitbit cd mcp-fitbit npm install创建
.env文件:FITBIT_CLIENT_ID=your_client_id_here FITBIT_CLIENT_SECRET=your_client_secret_here构建服务器:
npm run build
可用工具
工具 | 描述 | 参数 |
| 一段时间内的加权数据 |
|
| 特定日期范围内的睡眠日志(最多 100 天) |
|
| 日期之后的活动/锻炼日志 |
|
| 每日活动总结及目标 |
|
| 用户的活动目标(每日/每周) |
|
| 活动时间序列数据(最多 30 天) |
|
| 活跃区间分钟数时间序列(最多 1095 天) |
|
| 某时间段的心率 |
|
| 日期范围内的心率(最多 1 年) |
|
| 一天的完整营养数据 |
|
| 随时间推移的个体营养素 |
|
| 日期范围内的个别营养素 |
|
| 用户个人资料信息 | 没有任何 |
营养资源: caloriesIn 、 water 、 protein 、 carbs 、 fat 、 fiber 、 sodium
活动时间序列资源: steps 、 distance 、 calories 、 activityCalories 、 caloriesBMR 、 tracker/activityCalories 、 tracker/calories 、 tracker/distance
克劳德桌面
使用 npm 包(推荐):
添加到claude_desktop_config.json :
{
"mcpServers": {
"fitbit": {
"command": "mcp-fitbit",
"args": []
}
}
}使用本地开发版本:
添加到claude_desktop_config.json :
{
"mcpServers": {
"fitbit": {
"command": "node",
"args": ["C:\\path\\to\\mcp-fitbit\\build\\index.js"]
}
}
}配置文件位置:
Windows:
%AppData%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
首次运行授权
当您第一次要求您的 AI 助手使用 Fitbit 数据时:
服务器打开浏览器访问
http://localhost:3000/auth登录 Fitbit 并授予权限
您将被重定向到成功页面
您的 AI 现在可以访问您的 Fitbit 数据!
发展
npm run lint # Check code quality
npm run format # Fix formatting
npm run build # Compile TypeScript
npm run dev # Run with MCP inspector**架构:**请参阅TASKS.md了解改进机会和技术细节。
Available Tools
13 toolsget_activity_goalsA
Get the raw JSON response for user's activity goals from Fitbit. Supports 'daily' and 'weekly' periods. Returns goal values for steps, distance, calories, floors, active minutes, and active zone minutes.
Inputs: period (required).
get_activity_timeseriesA
Get the raw JSON response for activity time series data from Fitbit over a date range (max 30 days). Supports various resource paths like 'steps', 'distance', 'calories', 'activityCalories', 'caloriesBMR'.
Inputs: resourcePath (required), startDate (required), endDate (required).
get_azm_timeseriesA
Get the raw JSON response for Active Zone Minutes (AZM) time series data from Fitbit over a date range (max 1095 days). Returns total AZM plus breakdown by fat burn, cardio, and peak zones.
Inputs: startDate (required), endDate (required).
get_daily_activity_summaryA
Get the raw JSON response for daily activity summary from Fitbit for a specific date. Includes goals, steps, calories, distances, and heart rate zones. Requires a 'date' parameter in YYYY-MM-DD format.
Inputs: date (required).
get_exercisesB
Get the raw JSON response for exercise and activity logs from Fitbit after a specific date. Requires 'afterDate' parameter in 'YYYY-MM-DD' format. Retrieves a detailed list of logged exercises and activities.
Inputs: afterDate (required), limit.
get_food_logA
Get comprehensive nutrition data (calories, protein, carbs, fat, fiber, sodium) from Fitbit food log for a specific date. Returns daily summary totals and individual food entries with nutritional values.
Inputs: date.
get_heart_rateA
Get the raw JSON response for heart rate data from Fitbit for a specified period ending today or on a specific date. Requires a 'period' parameter such as '1d', '7d', '30d', '1w', '1m' and optionally accepts 'date' parameter.
Inputs: period (required), date.
get_heart_rate_by_date_rangeA
Get the raw JSON response for heart rate data from Fitbit for a specific date range. Requires 'startDate' and 'endDate' parameters in 'YYYY-MM-DD' format. Note: The API enforces a maximum range of 1 year.
Inputs: startDate (required), endDate (required).
get_nutritionC
Get the raw JSON response for nutrition data from Fitbit for a specified resource and period ending today or on a specific date. Requires 'resource' parameter (caloriesIn, water) and 'period' parameter such as '1d', '7d', '30d', '1w', '1m', '3m', '6m', '1y' and optionally accepts 'date' parameter.
Inputs: resource (required), period (required), date.
get_nutrition_by_date_rangeA
Get the raw JSON response for nutrition data from Fitbit for a specific resource and date range. Requires 'resource' parameter (caloriesIn, water), 'startDate' and 'endDate' parameters in 'YYYY-MM-DD' format. Note: The API enforces a maximum range of 1,095 days.
Inputs: resource (required), startDate (required), endDate (required).
get_profileA
Get the raw JSON response for the user's Fitbit profile.
Inputs: no named parameters.
get_sleep_by_date_rangeA
Get the raw JSON response for sleep logs from Fitbit for a specific date range. Requires 'startDate' and 'endDate' parameters in 'YYYY-MM-DD' format. Note: The API enforces a maximum range of 100 days.
Inputs: startDate (required), endDate (required).
get_weightA
Get the raw JSON response for weight entries from Fitbit for a specified period ending today. Requires a 'period' parameter such as '1d', '7d', '30d', '3m', '6m', '1y'
Inputs: period (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools are clearly separated by data type (weight, sleep, heart rate, nutrition, activity), but get_food_log and get_nutrition overlap in nutrition data, and get_daily_activity_summary vs get_activity_timeseries could be confused for similar activity data.
All tools follow a consistent get_<resource> pattern, with suffixes like _by_date_range and _timeseries for variants. Minor inconsistency: get_food_log vs get_nutrition use different resource names for overlapping data, and get_azm_timeseries uses an abbreviation.
13 tools is well-scoped for a Fitbit data retrieval server, covering the major health data categories without excessive fragmentation.
The server covers read-only retrieval across major Fitbit domains (weight, sleep, heart rate, nutrition, activity, profile), but lacks write operations (logging food, activity, sleep) and some common resources like SpO2 or temperature. For a read-only data access server, the coverage is reasonable but not exhaustive.
Maintenance
Related MCP Connectors
Pace is a remote MCP server that exposes wearable and fitness data to Claude via the Model Context Protocol. It connects to Garmin, Oura, Whoop, Polar, Fitbit and 20+ devices and provides 15 tools for querying sleep, activity, recovery, and training data. Hosted on Google Cloud Run, OAuth 2.1 authentication, Streamable HTTP transport. Instructions: First you need to create an account at: https://pacetraining.co and connect your wearables. After that you can connect the remote Server via Custom Connector in Claude and OAuth 2.1 Flow startet.
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol (MCP) implementation for Fitbit, enabling AI assistants to access and analyze your Fitbit health and fitness data. Disclaimer: This is an unofficial integration built using Fitbit's public API and is not affiliated with or endorsed by Fitbit Inc.1610MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol (MCP) server that fetches sleep, HRV, and training data from the unofficial Coros API and exposes them to AI assistants like Claude, enabling natural language queries about fitness metrics and workout management.26126MIT
- AlicenseBqualityBmaintenanceLocal-first MCP server that connects AI agents to your Fitbit activity, sleep, heart-rate, HRV, SpO2 and weight data.33132 npm5MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that gives Claude access to your WHOOP biometric data — recovery, sleep, strain, and workouts.32 npmMIT