Fitbit MCP Server
用于 AI 的 Fitbit MCP 连接器
将 AI 助手连接到您的 Fitbit 健康数据
让您的 AI 助手访问您的 Fitbit 数据,从而获得个性化健康洞察、趋势分析和自动追踪。可与 Claude Desktop 和其他兼容 MCP 的 AI 工具配合使用。
它的作用
🏃锻炼与活动- 获取详细的锻炼日志和活动数据
😴睡眠分析- 检索睡眠模式和质量指标
⚖️体重追踪- 了解一段时间内的体重趋势
❤️心率数据- 监测心率模式和区域
🍎营养日志- 回顾食物摄入量、卡路里和宏量营养素
👤个人资料信息- 访问基本的 Fitbit 个人资料详细信息
向你的人工智能询问这样的问题:“告诉我我这周的睡眠模式”或“我锻炼期间的平均心率是多少?”
Related MCP server: Linear MCP Server
快速入门
🚀 想要立即测试这些工具吗?
选项 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了解改进机会和技术细节。
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
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/TheDigitalNinja/mcp-fitbit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server