mcpField
M
MCP BMI

MCP BMI

Local
github.com/oscarrenaliasHealth0Updated 73w ago

About MCP BMI

MCP BMI is an MCP server for calculating a person's BMI from weight and height. It also returns the category associated with a BMI value.

Key features

  1. 01Calculate BMI from weight and height
  2. 02Return the category for a BMI value

Use cases

  1. 01Calculate BMI from a person's measurements
  2. 02Check the category associated with a BMI

MCP support

The server exposes tools to MCP clients for calculating BMI and looking up its category.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"bmi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/oscarrenalias/mcp-server-bmi:latest"
]
}
}
}
Run commanddocker run -i --rm ghcr.io/oscarrenalias/mcp-server-bmi:latest

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocighcr.io/oscarrenalias/mcp-server-bmi:latest

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP BMI

This is a simple MCP server that exposes a tool to calculate the BMI of a person given their weight and height.

calculate_bmi

Calculates the BMI based on weight and height.

Input parameters:

  • weight
  • height

Response:

  • bmi_index: a number representing the BMI index

bmi_category

Returns the category that the BMI corresponds to:

Input parameters:

  • bmi (float)

Response:

  • bmi_category: a string representing the category, as per the established values:
    • Underweight (Less than 18.5)
    • Healthy Weight (18.5 to less than 25)
    • Overweight (25 to less than 30)
    • Obesity (30 or greater)
    • Class 1 Obesity (30 to less than 35)
    • Class 2 Obesity (35 to less than 40)
    • Class 3 Severe obesity (40 or greater)

Using the server

Visual Studio Code

Add these lines to settings.json:

{
    "servers": {
      "command": "docker",
      "args": [
         "run",
         "-i",
          "--rm",
         "ghcr.io/oscarrenalias/mcp-server-bmi:latest"
       ]
      }
    }
  }

Built on Python with FastMCP, packaged as a Docker container and published to the GitHub registry.

Running the Server locally

To start the server locally:

uv sync
uv run bmi_server.py

Or with Docker:

docker build -t mcp-bmi .
docker run --rm -it mcp-bmi

Testing

To run the provided test:

uv run test_bmi.py

Development

Use the provided DevContainer for a ready-to-go development environment in VS Code.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.