Skip to content

MCP server

@almostjacked/fitness-tools-mcp is a Model Context Protocol stdio server. It exposes the same calculators as the library and the HTTP API — identical math — as MCP tools, one tool per calculator. No install required:

Terminal window
npx @almostjacked/fitness-tools-mcp

Works with any MCP-compatible client (Claude Code, Claude Desktop, Cursor, Windsurf, Zed, Cline, Continue, and others).

Terminal window
claude mcp add fitness-tools -- npx -y @almostjacked/fitness-tools-mcp
{
"mcpServers": {
"fitness-tools": {
"command": "npx",
"args": ["-y", "@almostjacked/fitness-tools-mcp"]
}
}
}

Each calculator is a separate MCP tool (tdee, body-fat, one-rep-max, macros, activity-multiplier, powerlifting-attempts, muscle-potential, ffmi, rsmi), with an input schema generated from the same Zod definition that powers the library. Optional fields apply their defaults — e.g. tdee runs all four formulas unless you pass methods.

A call returns both structuredContent (validated against the calculator’s output schema) and a JSON text fallback. So a tdee call with:

{
"sex": "male", "age": 30,
"height": { "value": 180, "unit": "cm" },
"weight": { "value": 80, "unit": "kg" },
"activity": "moderate"
}

comes back with results (mifflin, harris, …) and a consensus, the same shape the HTTP API and the library return.

Invalid input and domain errors (e.g. an unknown method) come back as tool errors (isError: true) with a readable message — the server never crashes the session.

Same calculators, three protocols:

  • @almostjacked/fitness-tools — import and call in-process (browser or server).
  • @almostjacked/fitness-tools-api — call over HTTP from any language or a no-code tool.
  • @almostjacked/fitness-tools-mcp — wire the calculators into an agent or LLM client.