Enables distribution through PyPI, allowing users to install the unit converter MCP using standard Python package tools.
Uses Python's unit conversion capabilities to provide precise conversions between different units of measurement across multiple domains including temperature, length, mass, and more.
Unit Converter MCP
Unit conversion utilities that provide precise conversions between different units of measurement.
🔧 Tools
Tool | Purpose | Supported Units |
---|---|---|
convert_temperature | Convert temperature between units | Celsius, Fahrenheit, Kelvin |
convert_angle | Convert angle between units | Degrees, Radians, Arcmin, Arcsec, Turns, Gons |
convert_length | Convert length/distance between units | Meter, Kilometer, Foot, Inch, Mile, etc. |
convert_area | Convert area between units | Square Meter, Acre, Hectare, Square Foot, etc. |
convert_mass | Convert mass between units | Kilogram, Gram, Pound, Ounce, Ton |
convert_volume | Convert volume between units | Liter, Gallon, Cup, Fluid Ounce, etc. |
convert_time | Convert time between units | Seconds, Minutes, Hours, Days, Years, etc. |
convert_energy | Convert energy between units | Joule, Kilowatt Hour, Calorie, BTU, etc. |
convert_force | Convert force between units | Newton, Pound Force, Kilogram Force, etc. |
convert_pressure | Convert pressure between units | Pascal, Bar, PSI, Atmosphere, etc. |
convert_power | Convert power between units | Watt, Horsepower, BTU per hour, etc. |
convert_speed | Convert speed between units | m/s, mph, km/h, knots, Mach, etc. |
convert_computer_data | Convert computer storage between units | Bytes, KB, MB, GB, TB, etc. |
convert_density | Convert density between units | kg/L, g/cm³, lb/gal, g/L, etc. |
list_supported_units | List all supported units for each type | All conversion types |
🔧 Examples
Here are some example prompts to get you started:
🔧 Setup
Claude Desktop
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 Tool Reference
convert_temperature
Convert temperature between Celsius, Fahrenheit, and Kelvin.
Parameters:
value
(float): Temperature value to convertfrom_unit
(str): Source unit (celsius, fahrenheit, kelvin)to_unit
(str): Target unit (celsius, fahrenheit, kelvin)
Example:
convert_length
Convert length between various units including metric and imperial systems.
Parameters:
value
(float): Length value to convertfrom_unit
(str): Source unit (meter, kilometer, centimeter, millimeter, inch, foot, yard, mile)to_unit
(str): Target unit (meter, kilometer, centimeter, millimeter, inch, foot, yard, mile)
Example:
convert_mass
Convert mass between various units including metric, imperial, and specialized units.
Parameters:
value
(float): Mass value to convertfrom_unit
(str): Source unit (kilogram, gram, pound, ounce, tonne, carat, stone, etc.)to_unit
(str): Target unit (kilogram, gram, pound, ounce, tonne, carat, stone, etc.)
Supported Units:
- Metric: kilogram, gram, milligram, microgram, nanogram, picogram, femtogram, decagram, hectogram, tonne, kilotonne, megatonne
- Imperial: pound, ounce, stone, short ton (US), long ton (UK)
- Precious metals: troy ounce, carat
- Historical: grain
Example:
convert_volume
Convert volume between various units including metric and imperial systems.
Parameters:
value
(float): Volume value to convertfrom_unit
(str): Source unit (liter, milliliter, gallon, quart, pint, cup, fluid_ounce)to_unit
(str): Target unit (liter, milliliter, gallon, quart, pint, cup, fluid_ounce)
Example:
convert_time
Convert time between various units from sub-seconds to millennia.
Parameters:
value
(float): Time value to convertfrom_unit
(str): Source unit (seconds, minutes, hours, days, weeks, months, years, etc.)to_unit
(str): Target unit (seconds, minutes, hours, days, weeks, months, years, etc.)
Example:
convert_energy
Convert energy between various units including metric, electrical, heat, nutrition, and particle physics systems.
Parameters:
value
(float): Energy value to convertfrom_unit
(str): Source unit (joule, kilowatt hour, calorie, Btu, etc.)to_unit
(str): Target unit (joule, kilowatt hour, calorie, Btu, etc.)
Supported Units:
- SI and metric prefixes: joule, kilojoule, megajoule, gigajoule, terajoule, petajoule, exajoule
- Electrical-energy units: watt hour, kilowatt hour, megawatt hour, gigawatt hour, terawatt hour
- Heat / nutrition: Btu, calorie, kilocalorie, therm
- Mechanical & particle-physics units: foot‑pound force, inch‑pound force, erg, electron volt
Example:
convert_force
Convert force between various units including metric and imperial systems.
Parameters:
value
(float): Force value to convertfrom_unit
(str): Source unit (newtons, pounds force, kilograms force, dynes, kilonewtons, kips, etc.)to_unit
(str): Target unit (newtons, pounds force, kilograms force, dynes, kilonewtons, kips, etc.)
Supported Units:
- Metric: newtons, kilonewtons, meganewtons, dynes
- Imperial: pounds force, kips
- Other: kilograms force, tonnes force, long tons force, short tons force
Example:
convert_density
Convert density between various units including metric, imperial, and specialized systems.
Parameters:
value
(float): Density value to convertfrom_unit
(str): Source unit (kilograms per liter, grams per cubic centimeter, pounds per gallon, etc.)to_unit
(str): Target unit (kilograms per liter, grams per cubic centimeter, pounds per gallon, etc.)
Supported Units:
- Grain-based hardness units: grains per gallon (UK), grains per gallon (US), grains per gallon
- Metric staples: grams per cubic centimeter, grams per liter, kilograms per liter, kilograms per cubic meter, milligrams per liter
- Fluid-ounce units: ounces per gallon (UK), ounces per gallon (US), ounces per gallon
- Pound-based units: pounds per cubic foot, pounds per gallon (UK), pounds per gallon (US), pounds per gallon
- Tonne/ton bulk-density units: tonnes per cubic meter, tons per cubic yard (UK), tons per cubic yard (US), tons per cubic yard
Example:
list_supported_units
List all supported units for each conversion type.
Parameters: None
Example:
convert_angle
Convert angle between degrees, radians, and other angular units.
Parameters:
value
(float): Angle value to convertfrom_unit
(str): Source unit (degrees, radians, arcmin, arcsec, turns, gons)to_unit
(str): Target unit (degrees, radians, arcmin, arcsec, turns, gons)
Example:
convert_area
Convert area between various units including metric and imperial systems.
Parameters:
value
(float): Area value to convertfrom_unit
(str): Source unit (acre, are, hectare, square centimeter, square foot, square inch, square kilometer, square meter, square mile, square millimeter, square yard)to_unit
(str): Target unit (acre, are, hectare, square centimeter, square foot, square inch, square kilometer, square meter, square mile, square millimeter, square yard)
Example:
convert_computer_data
Convert computer storage between various units from bits to exabytes.
Parameters:
value
(float): Computer storage value to convertfrom_unit
(str): Source unit (bits, bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes)to_unit
(str): Target unit (bits, bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes)
Example:
convert_pressure
Convert pressure between various units including metric, imperial, and specialized systems.
Parameters:
value
(float): Pressure value to convertfrom_unit
(str): Source unit (pascal, hectopascal, kilopascal, megapascal, bar, atmosphere, centimeters of water, inches of water, feet of water, meters of water, millimeters of mercury, inches of mercury, kilogram force per square centimeter, newtons per square centimeter, newtons per square millimeter, psi, psf)to_unit
(str): Target unit (pascal, hectopascal, kilopascal, megapascal, bar, atmosphere, centimeters of water, inches of water, feet of water, meters of water, millimeters of mercury, inches of mercury, kilogram force per square centimeter, newtons per square centimeter, newtons per square millimeter, psi, psf)
Example:
convert_power
Convert power between various units including mechanical, electrical, and thermal systems.
Parameters:
value
(float): Power value to convertfrom_unit
(str): Source unit (Btu per hour, foot pound‑force per second, ton of refrigeration, calorie per hour, kilocalorie per hour, horsepower, horsepower (metric), kilogram‑force meter per second, watt, kilowatt, megawatt, gigawatt, terawatt, petawatt)to_unit
(str): Target unit (Btu per hour, foot pound‑force per second, ton of refrigeration, calorie per hour, kilocalorie per hour, horsepower, horsepower (metric), kilogram‑force meter per second, watt, kilowatt, megawatt, gigawatt, terawatt, petawatt)
Example:
convert_speed
Convert speed between various units including metric, imperial, and specialized systems.
Parameters:
value
(float): Speed value to convertfrom_unit
(str): Source unit (centimeters per minute, centimeters per second, feet per hour, feet per minute, feet per second, inches per minute, inches per second, kilometers per hour, kilometers per second, knots, Mach (ISA sea level), speed of sound, meters per hour, meters per minute, meters per second, miles per hour, miles per minute, miles per second, yards per hour, yards per minute, yards per second, speed of light)to_unit
(str): Target unit (centimeters per minute, centimeters per second, feet per hour, feet per minute, feet per second, inches per minute, inches per second, kilometers per hour, kilometers per second, knots, Mach (ISA sea level), speed of sound, meters per hour, meters per minute, meters per second, miles per hour, miles per minute, miles per second, yards per hour, yards per minute, yards per second, speed of light)
Example:
🛠️ Development
Prerequisites
- Python 3.10+
- uv package manager
Setup
MCP Client Config
Note: Replace <path_to_your_repo>/unit-converter-mcp
with the absolute path to your cloned repository.
Building
Release Checklist
- Update Version:
- Increment the
version
number inpyproject.toml
andsrc/__init__.py
.
- Increment the
- Update Changelog:
- Add a new entry in
CHANGELOG.md
for the release.- Draft notes with coding agent using
git diff
context.
- Draft notes with coding agent using
- Commit along with any other pending changes.
- Add a new entry in
- Create GitHub Release:
- Draft a new release on the GitHub UI.
- Tag release using UI.
- The GitHub workflow will automatically build and publish the package to PyPI.
- Draft a new release on the GitHub UI.
Testing with MCP Inspector
For exploring and/or developing this server, use the MCP Inspector npm utility:
📝 License
MIT License - see LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
This server cannot be installed
Provides precise conversions between different units of measurement including temperature, length, weight, and volume.
Related MCP Servers
- AsecurityFlicenseAqualityProvides altitude-azimuth coordinates for celestial objects including planets, over 117,000 stars, and 14,000 deep sky objects based on system time and configurable location.Last updated -31TypeScript
- TypeScript
- PythonMIT License
- AsecurityAlicenseAqualityToken Metrics MCP ServerLast updated -19271TypeScriptMIT License