SparkyFitness includes a built-in Model Context Protocol (MCP) server that lets any MCP-compatible AI assistant — Claude Desktop, Cursor, or your own agent — read and write your health data through a structured, authenticated protocol. Once connected, your AI assistant gains the ability to log food and workouts, analyze trends, manage habits and goals, and run a guided daily check-in, all from a natural language prompt in your preferred AI client.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CodeWithCJ/SparkyFitness/llms.txt
Use this file to discover all available pages before exploring further.
What is MCP?
The Model Context Protocol is an open standard that lets AI clients call structured tools exposed by a server over HTTP. Rather than copy-pasting data into a chat window, your AI client calls a SparkyFitness tool directly — the server handles the database read or write, and the result comes back as structured data the model can reason about. SparkyFitness’s MCP server is served in-process by the main application server atPOST /mcp. There is no separate container to run.
Enabling the MCP Server
The MCP server is always active when SparkyFitness is running. To connect a client, you only need to:- Generate a Personal API Key — go to Settings → Profile → Personal API Key and click Generate API Key. Copy the key.
- Find your MCP endpoint URL:
- Production:
https://<your-host>/mcp - Local dev (via frontend proxy):
http://localhost:8080/mcp - Local dev (server direct):
http://localhost:3010/mcp
- Production:
Connecting Claude Desktop or Cursor
- HTTP clients (Cursor, etc.)
- stdio clients (Claude Desktop)
/mcp with an Authorization header:Available Tools
All MCP tools automatically respect your unit preferences (lbs/kg, kcal/kJ, cm/in). You never need to specify unit conversions in your prompts.Nutrition & Food
log_food — Log a food item to your diary
log_food — Log a food item to your diary
log_meal — Log a saved meal template
log_meal — Log a saved meal template
log_water — Track water intake
log_water — Track water intake
list_diary — View today's food log
list_diary — View today's food log
copy_from_yesterday — Copy yesterday's meals
copy_from_yesterday — Copy yesterday's meals
get_nutritional_summary — Macro and calorie breakdown
get_nutritional_summary — Macro and calorie breakdown
Exercise & Fitness
log_exercise — Log a workout or cardio session
log_exercise — Log a workout or cardio session
log_workout_preset — Start a saved workout routine
log_workout_preset — Start a saved workout routine
get_exercise_details — Learn how to perform an exercise
get_exercise_details — Learn how to perform an exercise
get_exercise_progress — View strength or cardio progress
get_exercise_progress — View strength or cardio progress
search_exercises — Discover exercises by muscle group or equipment
search_exercises — Discover exercises by muscle group or equipment
Biometrics & Check-ins
sparky_daily_checkin_wizard — Guided daily check-in
sparky_daily_checkin_wizard — Guided daily check-in
log_biometrics — Log weight, steps, and body measurements
log_biometrics — Log weight, steps, and body measurements
log_sleep — Record sleep duration and quality
log_sleep — Record sleep duration and quality
log_mood — Track your mood score
log_mood — Track your mood score
get_fasting_status — Check your fasting window
get_fasting_status — Check your fasting window
get_biometrics_history — View weight and measurement trends
get_biometrics_history — View weight and measurement trends
log_custom_metric — Log any custom health measurement
log_custom_metric — Log any custom health measurement
Goals, Habits & Reports
sparky_manage_habits — Track daily habits
sparky_manage_habits — Track daily habits
sparky_manage_goals — Set and update fitness goals
sparky_manage_goals — Set and update fitness goals
sparky_get_report — Get a weekly performance summary
sparky_get_report — Get a weekly performance summary
sparky_manage_profile — Update profile and preferences
sparky_manage_profile — Update profile and preferences
Example Prompts
Here are natural language prompts you can use immediately after connecting an MCP client:- Nutrition
- Exercise
- Check-ins & Biometrics
- Goals & Reports
- “Log a bowl of oatmeal with 50g oats, 200ml whole milk, and a banana for breakfast.”
- “What were my total calories and protein yesterday?”
- “Copy my lunch from yesterday to today.”
- “I drank 2 litres of water today — log it.”
- “Show me my average macros over the last 14 days.”
Unit Preferences
All MCP tools are unit-aware. When you call a tool, SparkyFitness reads your saved unit preferences and converts values automatically:- Weight displayed and accepted in kg or lbs based on your preference
- Energy displayed in kcal or kJ
- Height and body measurements in cm or inches
- Liquid volumes in ml or fl oz
sparky_manage_profile tool:
“Switch my weight display to pounds.”The change takes effect immediately for all subsequent MCP tool calls.
Security
sparky_inspect_schema, sparky_get_user_info, sparky_get_db_stats) exist but are disabled by default. They are only exposed when the DEV_TOOLS_ENABLED=true environment variable is set and the request authenticates with an admin API key. Keep this disabled in production.