The garth-mcp-server is a Model Context Protocol server that provides access to Garmin Connect data. Based on the garth library, it allows you to retrieve various health metrics, activity data, and device information directly from your Garmin account through an MCP interface.
To install the garth-mcp-server, use pip:
pip install garth-mcp-server
After installation, you'll need to authenticate with your Garmin account:
uvx garth login
This command will provide you with a token that you'll need for the next step.
Add the garth-mcp-server to your MCP configuration:
{
"mcpServers": {
"Garth - Garmin Connect": {
"command": "uvx",
"args": [
"garth-mcp-server"
],
"env": {
"GARTH_TOKEN": "<output of `uvx garth login`>"
}
}
}
}
Important: Make sure to use the full path for the uvx
command as MCP doesn't use the same PATH as your shell. On macOS, the typical path is /Users/{username}/.local/bin/uvx
.
The server provides access to various health metrics:
Sleep Data: Access detailed sleep information and movement data
nightly_sleep
- Detailed sleep data with movement trackingdaily_sleep
- Daily sleep summaryStress Monitoring:
daily_stress
- Daily stress levelsweekly_stress
- Weekly stress summaryActivity Metrics:
daily_intensity_minutes
/ weekly_intensity_minutes
- Exercise intensitydaily_steps
/ weekly_steps
- Step count trackingPhysiological Metrics:
daily_body_battery
- Energy level trackingdaily_hydration
- Hydration trackingdaily_hrv
/ hrv_data
- Heart rate variabilityUser Information:
user_profile
- Personal profile datauser_settings
- User preferencesRetrieve information about your workouts and activities:
get_activities
- List activities with optional filteringget_activities_by_date
- Activities for a specific dateget_activity_details
- Detailed activity informationget_activity_splits
- Lap and split dataget_activity_weather
- Weather conditions during activitiesAccess specialized health data:
get_body_composition
- Weight, BMI, and body compositionget_respiration_data
- Breathing rate informationget_spo2_data
- Blood oxygen saturationget_blood_pressure
- Blood pressure readingsInformation about your Garmin devices and equipment:
get_devices
- Connected Garmin devicesget_device_settings
- Device configurationget_gear
- Registered equipmentget_gear_stats
- Usage statistics for gearAdditional helpful tools:
monthly_activity_summary
- Monthly activity overviewsnapshot
- Data snapshots for specified date rangesget_connectapi_endpoint
- Direct access to any Garmin Connect API endpointTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "Garth-Garmin-Connect" '{"command":"uvx","args":["garth-mcp-server"],"env":{"GARTH_TOKEN":"<output of `uvx garth login`>"}}'
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": {
"Garth - Garmin Connect": {
"command": "uvx",
"args": [
"garth-mcp-server"
],
"env": {
"GARTH_TOKEN": "<output of `uvx garth login`>"
}
}
}
}
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": {
"Garth - Garmin Connect": {
"command": "uvx",
"args": [
"garth-mcp-server"
],
"env": {
"GARTH_TOKEN": "<output of `uvx garth login`>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect