The MCP Fitbit Connector provides AI assistants with access to your Fitbit health data, enabling personalized insights, trend analysis, and automated tracking. It works with Claude Desktop and other MCP-compatible AI tools to analyze your exercise, sleep, weight, heart rate, and nutrition data.
Get Fitbit API credentials:
Personal
http://localhost:3000/callback
Install the package globally:
npm install -g mcp-fitbit
Add to your Claude Desktop config file:
{
"mcpServers": {
"fitbit": {
"command": "mcp-fitbit",
"args": [],
"env": {
"FITBIT_CLIENT_ID": "your_client_id_here",
"FITBIT_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
Config file location:
%AppData%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
Restart Claude Desktop and ask about your Fitbit data!
Get Fitbit API credentials (as described above)
Install the package globally:
npm install -g mcp-fitbit
Create .env
file:
When you run mcp-fitbit
for the first time, it will tell you where to create the .env
file. It will look something like:
C:\Users\YourName\AppData\Roaming\npm\node_modules\mcp-fitbit\.env
Add your credentials to the .env
file:
FITBIT_CLIENT_ID=your_client_id_here
FITBIT_CLIENT_SECRET=your_client_secret_here
Run the server:
mcp-fitbit
Get Fitbit API credentials (as described above)
Clone and setup:
git clone https://github.com/TheDigitalNinja/mcp-fitbit
cd mcp-fitbit
npm install
Create .env
file:
FITBIT_CLIENT_ID=your_client_id_here
FITBIT_CLIENT_SECRET=your_client_secret_here
Build and run the server:
npm run build
npm run dev
On first use:
http://localhost:3000/auth
You can use the following tools through your AI assistant:
Tool | Description | Parameters |
---|---|---|
get_weight |
Weight data over time | period : 1d , 7d , 30d , 3m , 6m , 1y |
get_sleep_by_date_range |
Sleep logs for date range | startDate , endDate (YYYY-MM-DD) |
get_exercises |
Activity/exercise logs | afterDate (YYYY-MM-DD), limit (1-100) |
get_daily_activity_summary |
Daily activity summary | date (YYYY-MM-DD) |
get_activity_goals |
User's activity goals | period : daily , weekly |
get_activity_timeseries |
Activity time series data | resourcePath , startDate , endDate |
get_azm_timeseries |
Active Zone Minutes data | startDate , endDate (YYYY-MM-DD) |
get_heart_rate |
Heart rate for time period | period : 1d , 7d , 30d , 1w , 1m , optional date |
get_heart_rate_by_date_range |
Heart rate for date range | startDate , endDate (YYYY-MM-DD) |
get_food_log |
Nutrition data for a day | date (YYYY-MM-DD or "today") |
get_nutrition |
Individual nutrient over time | resource , period , optional date |
get_nutrition_by_date_range |
Nutrient for date range | resource , startDate , endDate |
get_profile |
User profile information | None |
The MCP Inspector is available at http://localhost:5173
when running the server. You can use it to test all tools interactively and handle the OAuth flow before using with your AI assistant.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "fitbit" '{"command":"mcp-fitbit","args":[],"env":{"FITBIT_CLIENT_ID":"your_client_id_here","FITBIT_CLIENT_SECRET":"your_client_secret_here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"fitbit": {
"command": "mcp-fitbit",
"args": [],
"env": {
"FITBIT_CLIENT_ID": "your_client_id_here",
"FITBIT_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"fitbit": {
"command": "mcp-fitbit",
"args": [],
"env": {
"FITBIT_CLIENT_ID": "your_client_id_here",
"FITBIT_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect