fitness-tracker-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fitness-tracker-mcpLog a 30-minute run and 150g protein for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ποΈ Fitness Tracker β MCP Server
A fully offline Model Context Protocol server that lets any MCPβcompatible client (Claude Code, Claude Desktop, etc.) log workouts, track dietary macros, and retrieve daily summaries β all stored in a local SQLite database.
Layer | Technology |
MCP framework | FastMCP (stdio) |
Database | SQLite 3 |
Validation | Pydantic v2 |
Testing | Pytest |
π Project Structure
MCP_Project/
βββ server.py # MCP server β tools, schemas, DB logic
βββ test_server.py # Pytest suite (22 tests)
βββ requirements.txt # pip dependencies
βββ README.md # You are here
βββ fitness_tracker.db # Created automatically on first runRelated MCP server: Nutrition MCP
π Quick Start
1. Install Dependencies
pip install -r requirements.txt2. Run the Test Suite
pytest test_server.py -vYou should see 22 tests pass, covering:
β Pydantic schema validation (valid inputs, bad dates, negative numbers, missing fields, SQL injection strings)
β Database insert and retrieve logic
β Daily summary aggregation and date isolation
3. Run the Server Standalone (optional)
python server.pyThe server starts on stdio β it reads JSONβRPC from stdin and writes to stdout. You will not see a prompt; this is intended for MCP client consumption.
π Connect to Claude Code
Run this once in your terminal to register the server:
claude mcp add fitness-tracker --transport stdio -- python server.pyTip: Use the full absolute path to
server.pyif Claude Code is not launched from this directory:claude mcp add fitness-tracker --transport stdio -- python "C:\Users\Mayan\OneDrive\Documents\MCP_Project\server.py"
After registering, Claude Code can call the three tools below whenever you ask fitness-related questions.
π οΈ Exposed Tools
log_workout
Log a single workout session.
Parameter | Type | Constraint | Example |
|
| YYYYβMMβDD |
|
|
| 1β100 chars |
|
|
| > 0 (minutes) |
|
|
| β₯ 0 |
|
log_macros
Log dietary macronutrients for a meal or full day.
Parameter | Type | Constraint | Example |
|
| YYYYβMMβDD |
|
|
| β₯ 0 (g) |
|
|
| β₯ 0 (g) |
|
|
| β₯ 0 (g) |
|
get_daily_summary
Retrieve a combined workout + nutrition summary for a given date.
Parameter | Type | Constraint | Example |
|
| YYYYβMMβDD |
|
Returns aggregated totals: workout count, total duration, total calories burned, macro totals (protein / carbs / fat in grams), and estimated calories consumed (using 4 / 4 / 9 kcal per gram).
π Safety
Parameterised queries β all SQL uses
?placeholders; user input is never interpolated into query strings.Pydantic validation β every tool input is parsed through a strict schema before touching the database, so malformed LLM outputs fail immediately with a clear error.
Offline by design β stdio transport means zero network traffic.
π License
MIT β use freely.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceA personal fitness tracking server that enables logging and querying workouts, nutrition, and body metrics through a local SQLite database. Integrates with OpenNutrition MCP for food logging and supports exercise history tracking for workout progression.Last updated17
- Alicense-qualityBmaintenanceA filesystem-based MCP server that turns any MCP-capable AI agent into a conversational calorie and protein tracker with natural-language estimates, confidence-aware logging, daily/weekly progress, food-history search, and export, working offline with local fallback data.Last updated187MIT
- Flicense-qualityBmaintenanceLocal-first nutrition tracker MCP server for Hermes, enabling food, alias, recipe, and meal log management with SQLite persistence.Last updated
- FlicenseAqualityBmaintenancePersonal workout coach MCP server that logs exercises in natural language, tracks progress with SQLite, and provides coaching signals like estimated 1RM and volume trends.Last updated6
Related MCP Connectors
MCP server for Withings health data β sleep, activity, heart, and body metrics.
GibsonAI MCP server: manage your databases with natural language
MCP server for Argo RPG Platform β connects AI assistants to campaign data via OAuth2
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MayankKapgate/fitness-tracker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server