unit-converter-mcp


Nameunit-converter-mcp JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryUnit-conversion utilities exposed via Model Context Protocol
upload_time2025-07-17 02:39:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords conversion length mcp model-context-protocol temperature unit volume weight
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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_length`        | Convert length/distance between units      | Meter, Kilometer, Foot, Inch, Mile, etc. |
| `convert_weight`        | Convert weight/mass between units          | Kilogram, Gram, Pound, Ounce, Ton |
| `convert_volume`        | Convert volume between units               | Liter, Gallon, Cup, Fluid Ounce, etc. |
| `list_supported_units`  | List all supported units for each type    | All conversion types |

## 🔧 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`

```json
{
  "mcpServers": {
    "unit-converter": {
      "command": "uvx",
      "args": ["unit-converter-mcp"]
    }
  }
}
```

## 📋 Tool Reference

### `convert_temperature`

Convert temperature between Celsius, Fahrenheit, and Kelvin.

**Parameters:**
- `value` (float): Temperature value to convert
- `from_unit` (str): Source unit (celsius, fahrenheit, kelvin)
- `to_unit` (str): Target unit (celsius, fahrenheit, kelvin)

**Example:**
```json
{
  "name": "convert_temperature",
  "arguments": {
    "value": 100,
    "from_unit": "celsius",
    "to_unit": "fahrenheit"
  }
}
```

### `convert_length`

Convert length between various units including metric and imperial systems.

**Parameters:**
- `value` (float): Length value to convert
- `from_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:**
```json
{
  "name": "convert_length",
  "arguments": {
    "value": 1,
    "from_unit": "meter",
    "to_unit": "foot"
  }
}
```

### `convert_weight`

Convert weight/mass between various units.

**Parameters:**
- `value` (float): Weight value to convert
- `from_unit` (str): Source unit (kilogram, gram, pound, ounce, ton)
- `to_unit` (str): Target unit (kilogram, gram, pound, ounce, ton)

**Example:**
```json
{
  "name": "convert_weight",
  "arguments": {
    "value": 1,
    "from_unit": "kilogram",
    "to_unit": "pound"
  }
}
```

### `convert_volume`

Convert volume between various units including metric and imperial systems.

**Parameters:**
- `value` (float): Volume value to convert
- `from_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:**
```json
{
  "name": "convert_volume",
  "arguments": {
    "value": 1,
    "from_unit": "liter",
    "to_unit": "gallon"
  }
}
```

### `list_supported_units`

List all supported units for each conversion type.

**Parameters:** None

**Example:**
```json
{
  "name": "list_supported_units",
  "arguments": {}
}
```

## 🛠️ Development

### Prerequisites

- Python 3.10+
- [uv](https://docs.astral.sh/uv/) package manager

### Setup

```bash
# Clone the repository
git clone https://github.com/zazencodes/unit-converter-mcp
cd unit-converter-mcp

# Install dependencies
uv sync --dev

# Run tests
uv run pytest

# Run linting
uv run ruff check --fix
uv run ruff format

# Type checking
uv run mypy src/
```

### MCP Client Config

```json
{
  "mcpServers": {
    "unit-converter-dev": {
      "command": "uv",
      "args": [
        "--directory",
        "<path_to_your_repo>/unit-converter-mcp",
        "run",
        "unit-converter-mcp"
      ]
    }
  }
}
```

**Note:** Replace `<path_to_your_repo>/unit-converter-mcp` with the absolute path to your cloned repository.

### Building

```bash
# Build package
uv build

# Test installation
uv run --with dist/*.whl unit-converter-mcp
```

### Release Checklist

1.  **Update Version:**
    - Increment the `version` number in `pyproject.toml` and `src/__init__.py`.

2.  **Update Changelog:**
    - Add a new entry in `CHANGELOG.md` for the release.
        - Draft notes with coding agent using `git diff` context.

        ```
        Update the @CHANGELOG.md for the latest release.
        List all significant changes, bug fixes, and new features.
        Here's the git diff:
        [GIT_DIFF]
        ```
        
    - Commit along with any other pending changes.

3.  **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.

## Testing with MCP Inspector

For exploring and/or developing this server, use the MCP Inspector npm utility:

```bash
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector

# Run local development server with the inspector
npx @modelcontextprotocol/inspector uv run unit-converter-mcp

# Run PyPI production server with the inspector
npx @modelcontextprotocol/inspector uvx unit-converter-mcp
```

## 📝 License

MIT License - see [LICENSE](LICENSE) file for details.

## 🤝 Contributing

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

## 📚 Links

- [Model Context Protocol](https://modelcontextprotocol.io/)
- [FastMCP Documentation](https://github.com/jlowin/fastmcp)
- [Python unit conversion libraries](https://docs.python.org/3/library/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "unit-converter-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "conversion, length, mcp, model-context-protocol, temperature, unit, volume, weight",
    "author": null,
    "author_email": "Alexander Galea <alex@galea.dev>",
    "download_url": "https://files.pythonhosted.org/packages/be/cb/f8f9b9dab38b9e021a3534a898a7f8b0d58cc073f95a254d93db01f74fda/unit_converter_mcp-0.1.0.tar.gz",
    "platform": null,
    "description": "# Unit Converter MCP\n\nUnit conversion utilities that provide precise conversions between different units of measurement.\n\n## \ud83d\udd27 Tools\n\n| Tool                    | Purpose                                    | Supported Units |\n| ----------------------- | ------------------------------------------ | --------------- |\n| `convert_temperature`   | Convert temperature between units          | Celsius, Fahrenheit, Kelvin |\n| `convert_length`        | Convert length/distance between units      | Meter, Kilometer, Foot, Inch, Mile, etc. |\n| `convert_weight`        | Convert weight/mass between units          | Kilogram, Gram, Pound, Ounce, Ton |\n| `convert_volume`        | Convert volume between units               | Liter, Gallon, Cup, Fluid Ounce, etc. |\n| `list_supported_units`  | List all supported units for each type    | All conversion types |\n\n## \ud83d\udd27 Setup\n\n### Claude Desktop\n\nAdd this to your Claude Desktop configuration file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`   \n**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"unit-converter\": {\n      \"command\": \"uvx\",\n      \"args\": [\"unit-converter-mcp\"]\n    }\n  }\n}\n```\n\n## \ud83d\udccb Tool Reference\n\n### `convert_temperature`\n\nConvert temperature between Celsius, Fahrenheit, and Kelvin.\n\n**Parameters:**\n- `value` (float): Temperature value to convert\n- `from_unit` (str): Source unit (celsius, fahrenheit, kelvin)\n- `to_unit` (str): Target unit (celsius, fahrenheit, kelvin)\n\n**Example:**\n```json\n{\n  \"name\": \"convert_temperature\",\n  \"arguments\": {\n    \"value\": 100,\n    \"from_unit\": \"celsius\",\n    \"to_unit\": \"fahrenheit\"\n  }\n}\n```\n\n### `convert_length`\n\nConvert length between various units including metric and imperial systems.\n\n**Parameters:**\n- `value` (float): Length value to convert\n- `from_unit` (str): Source unit (meter, kilometer, centimeter, millimeter, inch, foot, yard, mile)\n- `to_unit` (str): Target unit (meter, kilometer, centimeter, millimeter, inch, foot, yard, mile)\n\n**Example:**\n```json\n{\n  \"name\": \"convert_length\",\n  \"arguments\": {\n    \"value\": 1,\n    \"from_unit\": \"meter\",\n    \"to_unit\": \"foot\"\n  }\n}\n```\n\n### `convert_weight`\n\nConvert weight/mass between various units.\n\n**Parameters:**\n- `value` (float): Weight value to convert\n- `from_unit` (str): Source unit (kilogram, gram, pound, ounce, ton)\n- `to_unit` (str): Target unit (kilogram, gram, pound, ounce, ton)\n\n**Example:**\n```json\n{\n  \"name\": \"convert_weight\",\n  \"arguments\": {\n    \"value\": 1,\n    \"from_unit\": \"kilogram\",\n    \"to_unit\": \"pound\"\n  }\n}\n```\n\n### `convert_volume`\n\nConvert volume between various units including metric and imperial systems.\n\n**Parameters:**\n- `value` (float): Volume value to convert\n- `from_unit` (str): Source unit (liter, milliliter, gallon, quart, pint, cup, fluid_ounce)\n- `to_unit` (str): Target unit (liter, milliliter, gallon, quart, pint, cup, fluid_ounce)\n\n**Example:**\n```json\n{\n  \"name\": \"convert_volume\",\n  \"arguments\": {\n    \"value\": 1,\n    \"from_unit\": \"liter\",\n    \"to_unit\": \"gallon\"\n  }\n}\n```\n\n### `list_supported_units`\n\nList all supported units for each conversion type.\n\n**Parameters:** None\n\n**Example:**\n```json\n{\n  \"name\": \"list_supported_units\",\n  \"arguments\": {}\n}\n```\n\n## \ud83d\udee0\ufe0f Development\n\n### Prerequisites\n\n- Python 3.10+\n- [uv](https://docs.astral.sh/uv/) package manager\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/zazencodes/unit-converter-mcp\ncd unit-converter-mcp\n\n# Install dependencies\nuv sync --dev\n\n# Run tests\nuv run pytest\n\n# Run linting\nuv run ruff check --fix\nuv run ruff format\n\n# Type checking\nuv run mypy src/\n```\n\n### MCP Client Config\n\n```json\n{\n  \"mcpServers\": {\n    \"unit-converter-dev\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"--directory\",\n        \"<path_to_your_repo>/unit-converter-mcp\",\n        \"run\",\n        \"unit-converter-mcp\"\n      ]\n    }\n  }\n}\n```\n\n**Note:** Replace `<path_to_your_repo>/unit-converter-mcp` with the absolute path to your cloned repository.\n\n### Building\n\n```bash\n# Build package\nuv build\n\n# Test installation\nuv run --with dist/*.whl unit-converter-mcp\n```\n\n### Release Checklist\n\n1.  **Update Version:**\n    - Increment the `version` number in `pyproject.toml` and `src/__init__.py`.\n\n2.  **Update Changelog:**\n    - Add a new entry in `CHANGELOG.md` for the release.\n        - Draft notes with coding agent using `git diff` context.\n\n        ```\n        Update the @CHANGELOG.md for the latest release.\n        List all significant changes, bug fixes, and new features.\n        Here's the git diff:\n        [GIT_DIFF]\n        ```\n        \n    - Commit along with any other pending changes.\n\n3.  **Create GitHub Release:**\n    - Draft a new release on the GitHub UI.\n        - Tag release using UI.\n    - The GitHub workflow will automatically build and publish the package to PyPI.\n\n## Testing with MCP Inspector\n\nFor exploring and/or developing this server, use the MCP Inspector npm utility:\n\n```bash\n# Install MCP Inspector\nnpm install -g @modelcontextprotocol/inspector\n\n# Run local development server with the inspector\nnpx @modelcontextprotocol/inspector uv run unit-converter-mcp\n\n# Run PyPI production server with the inspector\nnpx @modelcontextprotocol/inspector uvx unit-converter-mcp\n```\n\n## \ud83d\udcdd License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## \ud83d\udcda Links\n\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [FastMCP Documentation](https://github.com/jlowin/fastmcp)\n- [Python unit conversion libraries](https://docs.python.org/3/library/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Unit-conversion utilities exposed via Model Context Protocol",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/zazencodes/unit-converter-mcp",
        "Issues": "https://github.com/zazencodes/unit-converter-mcp/issues",
        "Repository": "https://github.com/zazencodes/unit-converter-mcp"
    },
    "split_keywords": [
        "conversion",
        " length",
        " mcp",
        " model-context-protocol",
        " temperature",
        " unit",
        " volume",
        " weight"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1f515fd42ef84bf0cde410244ec70265663b70895fd88baafeea9e4428201082",
                "md5": "38ab6791dbe78ee5155d6c00e584cacc",
                "sha256": "2a40d0594d38d4879fed41b40a6ee97e0aeb3deab65fd3f792f4e5084faf458f"
            },
            "downloads": -1,
            "filename": "unit_converter_mcp-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38ab6791dbe78ee5155d6c00e584cacc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 9924,
            "upload_time": "2025-07-17T02:39:09",
            "upload_time_iso_8601": "2025-07-17T02:39:09.209619Z",
            "url": "https://files.pythonhosted.org/packages/1f/51/5fd42ef84bf0cde410244ec70265663b70895fd88baafeea9e4428201082/unit_converter_mcp-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "becbf8f9b9dab38b9e021a3534a898a7f8b0d58cc073f95a254d93db01f74fda",
                "md5": "bd6574fb1bfb27635e1bd87bac0e592d",
                "sha256": "5a93f74f0d12071b795093e684f60cb6b2269a976e8d58ba1a35eaf14f0378de"
            },
            "downloads": -1,
            "filename": "unit_converter_mcp-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bd6574fb1bfb27635e1bd87bac0e592d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9036,
            "upload_time": "2025-07-17T02:39:10",
            "upload_time_iso_8601": "2025-07-17T02:39:10.171028Z",
            "url": "https://files.pythonhosted.org/packages/be/cb/f8f9b9dab38b9e021a3534a898a7f8b0d58cc073f95a254d93db01f74fda/unit_converter_mcp-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-17 02:39:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zazencodes",
    "github_project": "unit-converter-mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "unit-converter-mcp"
}
        
Elapsed time: 1.01576s