Package Exports
- @zorlin/google-fit-mcp
- @zorlin/google-fit-mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zorlin/google-fit-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Google Fit MCP Server
A Model Context Protocol (MCP) server that provides access to Google Fit data.
Features
- Access Google Fit data sources
- Retrieve step counts, activities, calories, heart rate, weight, and sleep data
- Get daily fitness summaries
- OAuth2 authentication with Google
Installation
npm install -g @zorlin/google-fit-mcpSetup
Create Google OAuth2 Credentials
- Go to Google Cloud Console
- Create a new project or select existing
- Enable the Google Fitness API
- Create OAuth2 credentials (Desktop application type)
- Download the credentials JSON
Configure the MCP Server
Run the setup command:
npx @zorlin/google-fit-mcp-setup
Or manually create a configuration file at
~/.google-fit-mcp/config.json:{ "credentials": { "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob"] } }
Run the Server
npx @zorlin/google-fit-mcp
On first run, you'll be prompted to authorize the app via a URL.
Usage with Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"google-fit": {
"command": "npx",
"args": ["@zorlin/google-fit-mcp"],
"env": {
"GOOGLE_FIT_CONFIG_PATH": "/path/to/your/config.json"
}
}
}
}Available Tools
get_data_sources- List all available data sourcesget_steps- Get step count data for a date rangeget_activities- Get activity data for a date rangeget_calories- Get calories burned data for a date rangeget_heart_rate- Get heart rate data for a date rangeget_weight- Get weight data for a date rangeget_sleep- Get sleep session data for a date rangeget_daily_summary- Get a daily summary of fitness data
Example Usage
// Get today's step count
await get_steps({
startDate: "2024-01-20",
endDate: "2024-01-20"
});
// Get daily summary
await get_daily_summary({
date: "2024-01-20"
});Environment Variables
GOOGLE_FIT_CONFIG_PATH- Path to config.json (default:~/.google-fit-mcp/config.json)
License
MIT