AI Fitness Coach
AI agent that plans workouts based on Strava biometric data and Google Calendar workout history
01Problem Statement
Maintaining a structured 5-day upper/lower strength split alongside a running program requires constant manual tracking — logging sets, monitoring progression, adjusting for readiness, and coordinating schedules. Traditional fitness apps lack the intelligence to dynamically adapt workouts based on real performance data, recovery signals, and calendar constraints.
02Architecture
Claude Code acts as the coaching agent, reading the workout program spreadsheet as ground truth and connecting to two MCP servers hosted in an n8n Docker container. The Strava MCP server fetches activity data, heart rate, and performance metrics from the Strava API. The Google Calendar MCP server reads past workout events to track progression and creates new scheduled sessions. Claude applies progression logic, readiness adjustments, and periodization rules to generate and log each workout.
03Data Model
Strava MCP Tools
{
"tools": [
{
"name": "get_strava_activities",
"description": "Get the last 30 Strava activities. Provides high-level summaries. Use get_strava_activity_by_id for full details.",
"inputSchema": {
"type": "object",
"properties": {}
}
},
{
"name": "get_strava_activity_by_id",
"description": "Get a Strava activity by ID. Returns full details including heart rate, best efforts by segment, etc.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "activity id"
}
},
"required": ["id"]
}
}
]
}Google Calendar MCP Tools
{
"tools": [
{
"name": "calendar_listEvents",
"description": "Get many events in Google Calendar",
"inputSchema": {
"type": "object",
"properties": {
"Limit": { "type": "number" },
"After": { "type": "string" },
"Before": { "type": "string" }
},
"required": ["Limit", "After", "Before"]
}
},
{
"name": "calendar_getEvent",
"description": "Get an event in Google Calendar",
"inputSchema": {
"type": "object",
"properties": {
"Event_ID": { "type": "string" }
},
"required": ["Event_ID"]
}
},
{
"name": "calendar_createEvent",
"description": "Create an event in Google Calendar",
"inputSchema": {
"type": "object",
"properties": {
"Start": { "type": "string" },
"End": { "type": "string" },
"event_title": { "type": "string" },
"event_description": { "type": "string" }
},
"required": ["Start", "End", "event_title", "event_description"]
}
},
{
"name": "calendar_updateEvent",
"description": "Update an event in Google Calendar",
"inputSchema": {
"type": "object",
"properties": {
"Event_ID": { "type": "string" },
"Start": { "type": "string" },
"End": { "type": "string" },
"event_title": { "type": "string" },
"event_description": { "type": "string" }
},
"required": ["Event_ID", "Start", "End", "event_title", "event_description"]
}
}
]
}