Skip to main content

A Model Context Protocol server for BMI (Body Mass Index) calculation and health assessment

Project description

BMI Calculator MCP Server

A Model Context Protocol server for calculating BMI (Body Mass Index) and providing health status assessments.

Features

  • BMI calculation based on height and weight
  • Health status assessment according to WHO standards
  • Support for metric units (meters and kilograms)

Installation

Using uvx (recommended)

uvx mcp-server-bmi-calculator@latest

Using pip

pip install mcp-server-bmi-calculator

Usage

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "bmi-calculator": {
      "command": "uvx",
      "args": ["mcp-server-bmi-calculator@latest"]
    }
  }
}

With Cline

Add to your MCP settings:

{
  "mcpServers": {
    "bmi-calculator": {
      "command": "uvx",
      "args": ["mcp-server-bmi-calculator@latest"]
    }
  }
}

Available Tools

calculate_bmi

Calculate Body Mass Index (BMI) and return health status assessment.

Parameters:

  • height (number, required): Height in meters (e.g., 1.75)
  • weight (number, required): Weight in kilograms (e.g., 70)

Returns:

  • bmi: Calculated BMI value (rounded to 1 decimal place)
  • category: Health category (underweight/normal/overweight/obese)
  • health_status: Chinese description of health status

Health Status Categories:

  • BMI < 18.5: Underweight (体重过轻)
  • 18.5 ≤ BMI < 24: Normal weight (体重正常)
  • 24 ≤ BMI < 28: Overweight (超重)
  • BMI ≥ 28: Obese (肥胖)

Example:

Input:

{
  "height": 1.75,
  "weight": 70
}

Output:

{
  "bmi": 22.9,
  "category": "normal",
  "health_status": "体重正常"
}

Development

Setup

# Clone the repository
git clone https://github.com/yourusername/mcp-server-bmi-calculator
cd mcp-server-bmi-calculator

# Install dependencies
pip install -e .

Running locally

python -m mcp_server_bmi_calculator

Building

python -m build

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_bmi_calculator-0.2.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_bmi_calculator-0.2.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_bmi_calculator-0.2.1.tar.gz.

File metadata

File hashes

Hashes for mcp_server_bmi_calculator-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ef28a727dfc935028c41052180b5ce71299821b45bea645bd7d627b381b94e5e
MD5 9a9e118a0a45656a697dd6b6850a2c6b
BLAKE2b-256 8b598a1570651e8de54662ba882dce4da5e504513b053bc09ef3c690be23cf7b

See more details on using hashes here.

File details

Details for the file mcp_server_bmi_calculator-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_bmi_calculator-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42c7e26f834dea7908a38da5144b4d2d74e3f7d361a92da7447eb5cdf99fc59f
MD5 56d663838ce9dc82392637d4c7d91671
BLAKE2b-256 0313a0ef795dd88ffb918a8f9f2ca29c6dc8b375d28e5ed2ff7e7b08de59ae00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page