@zorlin/google-fit-mcp
v0.1.0
Published
Google Fit MCP server for accessing fitness data
Downloads
13
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-setupOr 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-mcpOn 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
