My Gym Stats MCP
Allows the MCP server to read workout logbook data from Google Sheets spreadsheets, exposing monthly training logs and session details such as weights, sets, and repetitions to LLM clients.
Click on "Deploy 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., "@My Gym Stats MCP How much did I bench press in my last workout?"
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.
My Gym Stats MCP
I love working out, and I have kept a logbook since I started training. It tracks my progress, including the weight lifted and the number of sets and repetitions performed.
The logbook is stored in Google Drive as a collection of Google Sheets. Each spreadsheet covers one month, with a separate tab for every training session.
This project makes that data accessible to an LLM client—ChatGPT, in my case. The client sends requests to a Node.js MCP server, which reads the logbook through the Google Sheets API and returns the requested information.
A concrete example of the resulting output is shown in this image.
Tech Stack
Technology | Role |
Node.js | Server runtime |
TypeScript | Type-safe application code |
Model Context Protocol (MCP) | Communication between the LLM client and the server |
Google Drive API | Restricted discovery of logbook files |
Google Sheets API | Access to workout data stored in Google Sheets |
JSON-RPC | Message format used by MCP |
Related MCP server: Iridium MCP Server
Configuration
Enable both the Google Drive API and Google Sheets API in your Google Cloud project.
Configure Application Default Credentials. If you use a service account, share only the
logbookfolder with its email address.Copy
.env.exampleto.envand set:GOOGLE_APPLICATION_CREDENTIALSto the absolute path of the credentials file.GOOGLE_DRIVE_LOGBOOK_FOLDER_IDto the ID from thelogbookfolder URL.
All tools are read-only. Starting from the configured logbook folder, the server discovers only direct child folders named YYYY and only their direct Google Spreadsheet children. Callers cannot provide paths, file IDs, URLs, or cell ranges.
Tools
Tool | Purpose | Input |
| List the available monthly spreadsheets without reading their cells | None |
| Read every worksheet for one month |
|
| Read every monthly spreadsheet for one year |
|
| Read all valid monthly spreadsheets across every year | None |
The reading tools use the spreadsheets.readonly scope. A single response is limited to 250,000 populated cells and 4,000,000 serialized characters.
How to run
nvm use
npm i
npm run build
npm run dev # runs the MCP server
npm run inspector # run in a separate shellHow to use with ChatGPT
This server can be connected to ChatGPT through an OpenAI Secure MCP Tunnel, without exposing the local MCP server to the public internet.
1. Prepare the project
Complete the Configuration steps, then install the dependencies and build the server:
nvm use
npm install
npm run build2. Create an OpenAI tunnel
Open the OpenAI Platform tunnel settings.
Create a tunnel and associate it with the ChatGPT workspace that will use it.
Copy its
tunnel_id.Create a runtime API key with Tunnels Read + Use permission. Creating or editing the tunnel also requires Tunnels Read + Manage.
Download and install the latest
tunnel-clientrelease linked from the tunnel settings page.
Keep the API key private. Load it into the shell used to run the tunnel client:
export CONTROL_PLANE_API_KEY="sk-..."3. Configure the tunnel client
Replace the example tunnel ID and both project paths with your own absolute values:
tunnel-client init \
--sample sample_mcp_stdio_local \
--profile my-gym-stats \
--tunnel-id tunnel_0123456789abcdef0123456789abcdef \
--mcp-command "node --env-file=/absolute/path/to/my-gym-stats-mcp/.env /absolute/path/to/my-gym-stats-mcp/dist/index.js"Validate the profile before starting it:
tunnel-client doctor --profile my-gym-stats --explain4. Start the tunnel
tunnel-client run --profile my-gym-statsKeep this process running while using the plugin. The tunnel client starts the MCP server itself, so npm run dev or npm start does not need to run separately.
5. Add the MCP server to ChatGPT
Open ChatGPT Plugins.
Select the plus button, then Add custom MCP server.
Enter a name such as
My Gym Stats.Under Connection, select Tunnel, then select the tunnel or paste its
tunnel_id.Select No authentication. Authentication to Google is handled locally by the server credentials configured in
.env.Review the security warning, select I understand and want to continue, and create the plugin.
Install the plugin in your personal plugins or the intended workspace.
In a conversation, type @My Gym Stats and ask ChatGPT to use one of the available tools. For example:
Use My Gym Stats to read March 2025 and summarize my training sessions.
If ChatGPT cannot discover or call the tools, confirm that tunnel-client run is still active and rerun:
tunnel-client doctor --profile my-gym-stats --explainAfter changing tool names, descriptions, or schemas, rebuild the project, restart the tunnel client, and refresh the plugin from its ChatGPT settings. See the official OpenAI guide for custom MCP servers for the current ChatGPT workflow.
The server uses the Google credentials configured in.env. Everyone authorized to use this plugin accesses the same logbook, so associate the tunnel and plugin only with the intended account or workspace.
Available Tools
4 toolslist_logbook_filesList logbook filesARead-onlyIdempotent
List the monthly Google Spreadsheets contained in YYYY year folders directly under the configured Google Drive folder named "logbook". The root folder is fixed by the server and cannot be selected by the caller.
Inputs: no named parameters. Returns: count, files
read_entire_logbookRead the entire logbookARead-onlyIdempotent
Read every worksheet from every valid monthly spreadsheet under all YYYY folders in the configured logbook. No path, file ID, URL, or range can be supplied by the caller.
Inputs: no named parameters. Returns: cellCount, spreadsheets, spreadsheetCount
read_logbook_monthRead one logbook monthARead-onlyIdempotent
Read every worksheet from the single monthly logbook spreadsheet selected by year and month. File IDs, paths, URLs, and ranges are resolved and restricted by the server.
Inputs: year (required), month (required). Returns: cellCount, spreadsheets, spreadsheetCount
read_logbook_yearRead one logbook yearARead-onlyIdempotent
Read every worksheet from all monthly spreadsheets in one logbook year. The year folder and spreadsheet IDs are resolved and restricted by the server.
Inputs: year (required). Returns: cellCount, spreadsheets, spreadsheetCount
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools are clearly separated by scope: listing files versus reading a month, a year, or the entire logbook. The descriptions explicitly state the boundaries, so an agent can choose the correct read tool without ambiguity.
All tool names use snake_case with a predictable verb_noun structure: list_logbook_files and read_logbook_{month,year,entire}. The convention is consistent and readable throughout.
Four tools is well-scoped for a read-only logbook browser. Each tool maps to a distinct level of access, and none feels redundant or missing at this scope.
The read-only surface is well covered: listing, monthly, yearly, and full-logbook reads are all present. Minor gaps remain, such as reading a single worksheet directly or deriving summary gym stats, but core access workflows are complete.
Maintenance
Related MCP Connectors
Your strength-training data for any AI assistant: workouts, progress, muscle volume, routines.
Create Hevy routines and analyze your training from chat. Unofficial; BYO Hevy PRO API key.
Workout log your AI fills in: sets from text or notebook photos, daily plans, history and records.
AI strength coach: writes your program, reads your logged sets, food and health data, adjusts loads
1
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables analysis and retrieval of JEFit workout data through natural language. Provides access to workout dates, detailed exercise information, and batch workout analysis for fitness tracking and progress monitoring.7032MIT
- AlicenseAqualityDmaintenanceConnects AI agents to Iridium fitness data to query workout history, nutrition logs, and body measurements. It enables users to track exercise progress, training volume, and personalized trainer analysis through natural language.1925 npm1MIT
- FlicenseNot gradedqualityDmaintenanceConnects to a Gym Tracker Supabase database to provide LLMs with access to personal workout history, routines, and training progress. It enables users to analyze fitness performance, track personal records, and receive personalized coaching advice through natural language.-
- FlicenseNot gradedqualityDmaintenanceAccess your Hevy workout data through natural language. Query workout history, exercise details, routines, and track progress.-