wimsta-mcp 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +13 -0
  2. package/index.js +72 -3
  3. package/package.json +40 -8
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # WIMSTA MCP server
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/wimsta-mcp)](https://www.npmjs.com/package/wimsta-mcp) [![getwimsta/wimsta-mcp MCP server](https://glama.ai/mcp/servers/getwimsta/wimsta-mcp/badges/score.svg)](https://glama.ai/mcp/servers/getwimsta/wimsta-mcp)
4
+
3
5
  Evidence-based body calculators for AI assistants. Ask Claude, Cursor or any
4
6
  [MCP](https://modelcontextprotocol.io) client for your BMI, body-fat %, calorie needs or max heart
5
7
  rate and get **a range across published formulas, not one made-up number**, with the formulas,
@@ -18,6 +20,17 @@ so they always match the calculators on [wimsta.com](https://wimsta.com). No API
18
20
  | `tdee` | Maintenance calories (TDEE) range for an activity level |
19
21
  | `max_heart_rate` | Max heart rate range across nine formulas + five training zones |
20
22
  | `waist_to_height` | Waist-to-height ratio, Ashwell zone, healthy waist range |
23
+ | `ideal_weight` | Ideal body weight range across seven classic formulas + WHO healthy-weight range |
24
+ | `ffmi` | Fat-Free Mass Index, raw and normalized, neutral band |
25
+ | `body_surface_area` | Body surface area range across eight formulas |
26
+ | `body_shape` | Body-shape type from bust, waist and hip ratios |
27
+ | `body_frame` | Body-frame size from the height ÷ wrist ratio |
28
+ | `protein` | Daily protein bands (RDA, active, preservation, lean-mass) |
29
+ | `water` | Daily water range across five authorities, lifestyle add-ons |
30
+ | `creatine` | Creatine maintenance and loading dose (ISSN) |
31
+ | `one_rep_max` | One-rep max range across Epley, Brzycki, Lombardi, Lander + training table |
32
+ | `vo2max` | VO2max range from Uth, Cooper and Rockport field tests |
33
+ | `running_pace` | Pace / time / distance solver + Riegel race prediction range |
21
34
  | `get_formula` | One formula from the open [WIMSTA formula registry](https://wimsta.com/registry/) (CC BY 4.0): equation, citation, validation population, limitations |
22
35
  | `list_formulas` | Registry index, or all formulas of a category |
23
36
 
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- // WIMSTA MCP server: evidence-based body calculators (BMI, body fat, BMR, TDEE,
3
- // max heart rate, waist-to-height) and the open WIMSTA formula registry.
2
+ // WIMSTA MCP server: 17 evidence-based body and fitness calculators (BMI, body fat, BMR, TDEE,
3
+ // ideal weight, protein, water, max heart rate, VO2max, one-rep max, running pace…) and the open WIMSTA formula registry.
4
4
  // Every number comes from the public WIMSTA Calculation API (https://wimsta.com/tools/#calculation-api),
5
5
  // so results always match the calculators on wimsta.com. No API key, no tracking.
6
6
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
@@ -43,7 +43,7 @@ const cm = (lo, hi, what) => z.number().min(lo).max(hi).optional().describe(`${w
43
43
 
44
44
  const server = new McpServer({ name: 'wimsta', version });
45
45
 
46
- const NOTE = ' Returns a range across several published formulas (not one number), the formulas used with links, and a medical disclaimer. Estimates, not diagnoses.';
46
+ const NOTE = ' Returns a range across several published formulas (not one number), the formulas used with links, page_url (the matching calculator page on wimsta.com, worth sharing with the user), and a medical disclaimer. Estimates, not diagnoses.';
47
47
 
48
48
  server.registerTool('bmi', {
49
49
  title: 'BMI (range)',
@@ -97,6 +97,75 @@ server.registerTool('waist_to_height', {
97
97
  inputSchema: { waist_cm: z.number().min(45).max(160).describe('Natural waist, centimetres'), height_cm: height },
98
98
  }, async (a) => asResult(await call('/api/calc/waist-to-height', a)));
99
99
 
100
+ const bf = z.number().min(3).max(65).describe('Body-fat %');
101
+ const tool = (name, title, description, inputSchema, path) =>
102
+ server.registerTool(name, { title, description, inputSchema }, async (a) => asResult(await call(path, a)));
103
+
104
+ tool('ideal_weight', 'Ideal body weight (range)',
105
+ 'Ideal body weight as a range across seven classic formulas (Hamwi, Devine, Robinson, Miller, Broca, Lorentz, Peterson) plus the WHO healthy-weight range for the height.' + NOTE,
106
+ { sex, height_cm: height }, '/api/calc/ideal-weight');
107
+
108
+ tool('ffmi', 'Fat-Free Mass Index',
109
+ 'Fat-Free Mass Index (lean mass for height), raw and normalized to 1.8 m, with a neutral descriptive band. Needs body-fat %.' + NOTE,
110
+ { sex, weight_kg: weight, height_cm: height, body_fat_pct: bf }, '/api/calc/ffmi');
111
+
112
+ tool('body_surface_area', 'Body surface area (range)',
113
+ 'Body surface area in m² as a range across eight formulas (Mosteller, Du Bois, Haycock, Gehan–George, Boyd, Fujimoto, Takahira, Schlich).' + NOTE,
114
+ { sex, weight_kg: weight, height_cm: height }, '/api/calc/bsa');
115
+
116
+ tool('body_shape', 'Body shape type',
117
+ 'Body-shape type (hourglass, pear, inverted triangle, rectangle, apple) from bust/chest, waist and hip ratios. A descriptive label, not a health verdict.',
118
+ { bust_cm: z.number().min(60).max(160).describe('Bust (chest for men), centimetres'), waist_cm: z.number().min(45).max(160).describe('Natural waist, centimetres'), hip_cm: z.number().min(60).max(180).describe('Hips, centimetres') },
119
+ '/api/calc/body-shape');
120
+
121
+ tool('body_frame', 'Body frame size',
122
+ 'Body-frame size (small / medium / large) from the height ÷ wrist ratio (Grant cut points). A rule of thumb, not a clinical measure.',
123
+ { sex, height_cm: height, wrist_cm: z.number().min(10).max(25).describe('Wrist circumference, centimetres') }, '/api/calc/body-frame');
124
+
125
+ tool('protein', 'Daily protein (range)',
126
+ 'Daily protein in g/day as bands: RDA minimum, active adults, deficit/muscle preservation, and per kg of lean mass when body-fat % is given.' + NOTE,
127
+ { weight_kg: weight, body_fat_pct: bf.optional() }, '/api/calc/protein');
128
+
129
+ const flag = (what) => z.boolean().optional().describe(`Adds a fixed drinking-water bump for ${what}`);
130
+ tool('water', 'Daily water intake (range)',
131
+ 'Daily water need in ml and litres as a range across five authorities (IOM, WHO, EFSA, FNB, sports medicine), with optional lifestyle add-ons.' + NOTE,
132
+ {
133
+ sex, weight_kg: weight,
134
+ activity: z.enum(['sedentary', 'light', 'active', 'moderate', 'very', 'extra', 'extreme']).describe('Activity level'),
135
+ calorie_norm_kcal: z.number().min(800).max(6000).optional().describe('Daily calories, sharpens the FNB source'),
136
+ coffee: flag('coffee'), alcohol: flag('alcohol'), protein_diet: flag('a high-protein diet'), workouts: flag('workouts'),
137
+ hot_climate: flag('a hot climate'), pregnancy: flag('pregnancy'), breastfeeding: flag('breastfeeding'), illness: flag('illness'),
138
+ }, '/api/calc/water');
139
+
140
+ tool('creatine', 'Creatine dose (range)',
141
+ 'Creatine monohydrate dose from body weight: maintenance range (g/day) and the optional loading route, from the ISSN position stand. Not a prescription.',
142
+ { weight_kg: weight }, '/api/calc/creatine');
143
+
144
+ tool('one_rep_max', 'One-rep max (range)',
145
+ 'Estimated one-rep max as a range across Epley, Brzycki, Lombardi and Lander, the median, and a percent-of-1RM training table. Less precise above ~12 reps (flagged).',
146
+ { weight_lifted_kg: z.number().min(1).max(1000).describe('Weight lifted, kilograms'), reps: z.number().int().min(1).max(36).describe('Repetitions completed') },
147
+ '/api/calc/one-rep-max');
148
+
149
+ tool('vo2max', 'VO2max estimate (range)',
150
+ 'VO2max (ml/kg/min) as a range across the field methods you give data for: Uth heart-rate ratio, Cooper 12-minute run, Rockport 1-mile walk. Typically ±10–15% of a lab value.' + NOTE,
151
+ {
152
+ hr_rest_bpm: z.number().min(30).max(120).optional().describe('Resting heart rate (Uth; needs hr_max_bpm, or age + sex)'),
153
+ hr_max_bpm: z.number().min(120).max(230).optional().describe('Measured max heart rate (Uth)'),
154
+ cooper_m: z.number().min(600).max(5000).optional().describe('Metres covered in a 12-minute run (Cooper)'),
155
+ walk_min: z.number().min(5).max(60).optional().describe('Minutes to walk 1 mile (Rockport; also needs finish_hr_bpm, weight_kg, age, sex)'),
156
+ finish_hr_bpm: z.number().min(50).max(230).optional().describe('Heart rate at the end of the walk (Rockport)'),
157
+ weight_kg: weight.optional(), age: age.optional(), sex: sex.optional(),
158
+ }, '/api/calc/vo2max');
159
+
160
+ tool('running_pace', 'Running pace, time, distance',
161
+ 'Running pace solver: give any two of distance, time and pace to get the third plus speed. Optionally predicts a race time at another distance as a range (Riegel 1.06–1.08).',
162
+ {
163
+ distance_km: z.number().min(0.1).max(1000).optional().describe('Distance, km'),
164
+ time_min: z.number().min(0.5).max(6000).optional().describe('Time in decimal minutes, e.g. 25.5'),
165
+ pace_min_per_km: z.number().min(1).max(60).optional().describe('Pace in decimal minutes per km, e.g. 5.5'),
166
+ target_distance_km: z.number().min(0.1).max(1000).optional().describe('Predict a race time at this distance'),
167
+ }, '/api/calc/running-pace');
168
+
100
169
  server.registerTool('get_formula', {
101
170
  title: 'Look up a formula in the WIMSTA registry',
102
171
  description: 'Get one formula from the open WIMSTA formula registry (CC BY 4.0): equation, original study citation, population it was validated on, known limitations. Call list_formulas first to find ids.',
package/package.json CHANGED
@@ -1,21 +1,53 @@
1
1
  {
2
2
  "name": "wimsta-mcp",
3
- "version": "1.0.0",
4
- "description": "MCP server for evidence-based body calculators: BMI, body fat %, BMR, TDEE, max heart rate and waist-to-height as honest ranges across published formulas, plus the open WIMSTA formula registry. No API key.",
3
+ "version": "1.1.0",
4
+ "description": "MCP server with 17 evidence-based body and fitness calculators: BMI, body fat %, BMR, TDEE, ideal weight, protein, water, max heart rate, VO2max, one-rep max, running pace and more, as honest ranges across published formulas, plus the open WIMSTA formula registry. No API key.",
5
5
  "mcpName": "io.github.getwimsta/wimsta",
6
6
  "type": "module",
7
- "bin": { "wimsta-mcp": "index.js" },
7
+ "bin": {
8
+ "wimsta-mcp": "index.js"
9
+ },
8
10
  "main": "index.js",
9
- "files": ["index.js", "README.md", "LICENSE"],
10
- "engines": { "node": ">=18" },
11
+ "files": [
12
+ "index.js",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
11
19
  "dependencies": {
12
20
  "@modelcontextprotocol/sdk": "^1.32.2",
13
21
  "zod": "^4.0.0"
14
22
  },
15
- "keywords": ["mcp", "model-context-protocol", "bmi", "body-fat", "bmr", "tdee", "calorie-calculator", "heart-rate", "fitness", "health", "nutrition"],
23
+ "keywords": [
24
+ "bmi",
25
+ "bmr",
26
+ "body-fat",
27
+ "calorie-calculator",
28
+ "creatine",
29
+ "fitness",
30
+ "health",
31
+ "heart-rate",
32
+ "ideal-weight",
33
+ "mcp",
34
+ "model-context-protocol",
35
+ "nutrition",
36
+ "one-rep-max",
37
+ "protein",
38
+ "running-pace",
39
+ "tdee",
40
+ "vo2max",
41
+ "water-intake"
42
+ ],
16
43
  "homepage": "https://wimsta.com/tools/#calculation-api",
17
- "repository": { "type": "git", "url": "git+https://github.com/getwimsta/wimsta-mcp.git" },
18
- "bugs": { "url": "https://github.com/getwimsta/wimsta-mcp/issues" },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/getwimsta/wimsta-mcp.git"
47
+ },
48
+ "bugs": {
49
+ "url": "https://github.com/getwimsta/wimsta-mcp/issues"
50
+ },
19
51
  "author": "WIMSTA (https://wimsta.com)",
20
52
  "license": "MIT"
21
53
  }