albumentations-mcp


Namealbumentations-mcp JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryMCP-compliant image augmentation server using Albumentations
upload_time2025-09-08 07:19:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT License Copyright (c) 2025 Ramsi Kalia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords ai albumentations computer-vision data-augmentation gemini google-genai image-augmentation image-editing image-generation mcp mcp-server semantic-augmentation vlm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Albumentations-MCP with Nano Banana (Gemini)

Natural language image augmentation via MCP protocol. Transform images using plain English with this MCP-compliant server built on [Albumentations](https://albumentations.ai/).

**Example:** `"add blur and rotate 15 degrees"` → Applies GaussianBlur + Rotate transforms automatically

![Albumentations augmentations](./assets/augmentation.jpeg)

![Nano banana augmentations](./assets/nano%20banana.jpeg)

## Quick Start

```bash
# Install from PyPI
pip install albumentations-mcp

# Run as MCP server
uvx albumentations-mcp
```

## MCP Client Setup

### Claude Desktop

Copy [claude-desktop-config.json](docs/claude-desktop-config.json) to `~/.claude_desktop_config.json`

Or add manually:

```json
{
  "mcpServers": {
    "albumentations": {
      "command": "uvx",
      "args": ["albumentations-mcp"],
      "env": {
        "MCP_LOG_LEVEL": "INFO",
        "OUTPUT_DIR": "./outputs",
        "ENABLE_VISION_VERIFICATION": "true",
        "DEFAULT_SEED": "42"
      }
    }
  }
}
```

### Kiro IDE

Copy [kiro-mcp-config.json](docs/kiro-mcp-config.json) to `.kiro/settings/mcp.json`

Or add manually:

```json
{
  "mcpServers": {
    "albumentations": {
      "command": "uvx",
      "args": ["albumentations-mcp"],
      "env": {
        "MCP_LOG_LEVEL": "INFO",
        "OUTPUT_DIR": "./outputs",
        "ENABLE_VISION_VERIFICATION": "true",
        "DEFAULT_SEED": "42"
      },
      "disabled": false,
      "autoApprove": ["augment_image", "list_available_transforms"]
    }
  }
}
```

## Available Tools

- **`augment_image`** - Apply augmentations using natural language or presets
- **`list_available_transforms`** - Get supported transforms and parameters
- **`validate_prompt`** - Test prompts without processing images
- **`list_available_presets`** - Get available preset configurations
- **`set_default_seed`** - Set global seed for reproducible results
- **`get_pipeline_status`** - Check pipeline health and configuration
- **`get_quick_transform_reference`** - Condensed transform keywords for prompting
- **`get_getting_started_guide`** - Structured workflow guide for first-time assistants

### VLM (Gemini “Nano Banana”) Tools

- **`check_vlm_config`** – Report readiness without exposing secrets
- **`vlm_generate_preview`** – Text→image preview for prompt/style ideation (no session)
- **`vlm_edit_image`** – Image‑conditioned edit; runs full session + verification
- **`vlm_suggest_recipe`** – Planning‑only: outputs Alb Compose + optional VLMEdit prompt template; can save under `outputs/recipes/`

VLM quickstart (env or file):

```bash
# Option 1: env
set ENABLE_VLM=true
set VLM_PROVIDER=google
set VLM_MODEL=gemini-2.5-flash-image-preview
set GOOGLE_API_KEY=...  # or GEMINI_API_KEY / VLM_API_KEY

# Option 2: file (auto‑discovered)
# Place a non‑secret file at config/vlm.json:
{
  "enabled": true,
  "provider": "google",
  "model": "gemini-2.5-flash-image-preview"
  // api_key may be in file or environment
}
```

Examples:

```python
# Preview (no input image, no session)
vlm_generate_preview(prompt="Neon night street, cinematic moodboard")

# Edit (image + prompt, full session)
vlm_edit_image(
    image_path="examples/basic_images/cat.jpg",
    prompt=(
        "Using the provided photo of a cat, add a small, knitted wizard hat. "
        "Preserve identity, pose, lighting, and composition."
    ),
    edit_type="edit",
)

# Plan and save a hybrid recipe (Alb + VLMEdit)
plan = vlm_suggest_recipe(
    task="domain_shift",
    constraints_json='{"output_count":3,"identity_preserve":true}',
    save=True,
)
print(plan["paths"])  # outputs/recipes/<timestamp>_<task>_<hash>/
```

MCP env examples for VLM (choose one option)

Option A — file (preferred):

```json
{
  "mcpServers": {
    "albumentations": {
      "command": "uvx",
      "args": ["albumentations-mcp"],
      "env": {
        "MCP_LOG_LEVEL": "INFO",
        "OUTPUT_DIR": "./outputs",
        "ENABLE_VLM": "true",
        "VLM_CONFIG_PATH": "config/vlm.json"
      }
    }
  }
}
```

Option B — inline env (no file):

```json
{
  "mcpServers": {
    "albumentations": {
      "command": "uvx",
      "args": ["albumentations-mcp"],
      "env": {
        "MCP_LOG_LEVEL": "INFO",
        "OUTPUT_DIR": "./outputs",
        "ENABLE_VLM": "true",
        "VLM_PROVIDER": "google",
        "VLM_MODEL": "gemini-2.5-flash-image-preview"
      }
    }
  }
}
```

## Available Prompts

- **`compose_preset`** - Generate augmentation policies from presets with optional tweaks
- **`explain_effects`** - Analyze pipeline effects in plain English
- **`augmentation_parser`** - Parse natural language to structured transforms
- **`vision_verification`** - Compare original and augmented images
- **`error_handler`** - Generate user-friendly error messages and recovery suggestions

## Available Resources

- **`transforms_guide`** - Complete transform documentation with parameters and ranges
- **`policy_presets`** - Built-in preset configurations (segmentation, portrait, lowlight)
- **`available_transforms_examples`** - Usage examples and patterns organized by categories
- **`preset_pipelines_best_practices`** - Best practices guide for augmentation workflows
- **`troubleshooting_common_issues`** - Common issues, solutions, and diagnostic steps
- **`getting_started_guide`** - Same content as the tool version, resource-style

## Usage Examples

```python
# Simple augmentation
augment_image(
    image_path="photo.jpg",
    prompt="add blur and rotate 15 degrees"
)

# Using presets
augment_image(
    image_path="dataset/image.jpg",
    preset="segmentation"
)

# Test prompts
validate_prompt(prompt="increase brightness and add noise")

# Process from URL (two-step)
session = load_image_for_processing(image_source="https://example.com/image.jpg")
# Use the returned session_id from the previous call
augment_image(session_id="<session_id>", prompt="add blur and rotate 10 degrees")
```

## Features

- **Natural Language Processing** - Convert English descriptions to transforms
- **Preset Pipelines** - Pre-configured transforms for common use cases
- **Reproducible Results** - Seeding support for consistent outputs
- **MCP Protocol Compliant** - Full MCP implementation with tools, prompts, and resources
- **Comprehensive Documentation** - Built-in guides, examples, and troubleshooting resources
- **Production Ready** - Comprehensive testing, error handling, and structured logging
- **Multi-Source Input** - Works with local file paths, base64 payloads, and URLs (via loader)

## Documentation

- [Installation & Setup](docs/setup.md)
- [Architecture Overview](docs/architecture.md)
- [Purpose & Rationale](docs/purpose.md)
- [Preset Configurations](docs/presets.md)
- [Session Folders (outputs/) Guide](docs/session-folders.md)
- [Regex Security Analysis](docs/regex_security_analysis.md)
- [Design Philosophy](docs/design_philosophy.md)
- [Usage Examples](docs/examples.md)
- [VLM (Nano Banana/Gemini) Guide](docs/vlm_nano_banana.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Contributing](docs/contributing.md)

### Configuration Files

- [Claude Desktop Config](docs/claude-desktop-config.json)
- [Kiro IDE Config](docs/kiro-mcp-config.json)
- [All Configuration Examples](docs/mcp-config-examples.json)
- [VLM Example Config](config/vlm.example.json)

## License

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

**Contact:** [ramsi.kalia@gmail.com](mailto:ramsi.kalia@gmail.com)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "albumentations-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "ai, albumentations, computer-vision, data-augmentation, gemini, google-genai, image-augmentation, image-editing, image-generation, mcp, mcp-server, semantic-augmentation, vlm",
    "author": null,
    "author_email": "Ramsi Kalia <ramsi.kalia@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/91/07e0c10faa67185e4e28607dab997ba46f3826f4004bab4af11052056d65/albumentations_mcp-1.0.2.tar.gz",
    "platform": null,
    "description": "# Albumentations-MCP with Nano Banana (Gemini)\n\nNatural language image augmentation via MCP protocol. Transform images using plain English with this MCP-compliant server built on [Albumentations](https://albumentations.ai/).\n\n**Example:** `\"add blur and rotate 15 degrees\"` \u2192 Applies GaussianBlur + Rotate transforms automatically\n\n![Albumentations augmentations](./assets/augmentation.jpeg)\n\n![Nano banana augmentations](./assets/nano%20banana.jpeg)\n\n## Quick Start\n\n```bash\n# Install from PyPI\npip install albumentations-mcp\n\n# Run as MCP server\nuvx albumentations-mcp\n```\n\n## MCP Client Setup\n\n### Claude Desktop\n\nCopy [claude-desktop-config.json](docs/claude-desktop-config.json) to `~/.claude_desktop_config.json`\n\nOr add manually:\n\n```json\n{\n  \"mcpServers\": {\n    \"albumentations\": {\n      \"command\": \"uvx\",\n      \"args\": [\"albumentations-mcp\"],\n      \"env\": {\n        \"MCP_LOG_LEVEL\": \"INFO\",\n        \"OUTPUT_DIR\": \"./outputs\",\n        \"ENABLE_VISION_VERIFICATION\": \"true\",\n        \"DEFAULT_SEED\": \"42\"\n      }\n    }\n  }\n}\n```\n\n### Kiro IDE\n\nCopy [kiro-mcp-config.json](docs/kiro-mcp-config.json) to `.kiro/settings/mcp.json`\n\nOr add manually:\n\n```json\n{\n  \"mcpServers\": {\n    \"albumentations\": {\n      \"command\": \"uvx\",\n      \"args\": [\"albumentations-mcp\"],\n      \"env\": {\n        \"MCP_LOG_LEVEL\": \"INFO\",\n        \"OUTPUT_DIR\": \"./outputs\",\n        \"ENABLE_VISION_VERIFICATION\": \"true\",\n        \"DEFAULT_SEED\": \"42\"\n      },\n      \"disabled\": false,\n      \"autoApprove\": [\"augment_image\", \"list_available_transforms\"]\n    }\n  }\n}\n```\n\n## Available Tools\n\n- **`augment_image`** - Apply augmentations using natural language or presets\n- **`list_available_transforms`** - Get supported transforms and parameters\n- **`validate_prompt`** - Test prompts without processing images\n- **`list_available_presets`** - Get available preset configurations\n- **`set_default_seed`** - Set global seed for reproducible results\n- **`get_pipeline_status`** - Check pipeline health and configuration\n- **`get_quick_transform_reference`** - Condensed transform keywords for prompting\n- **`get_getting_started_guide`** - Structured workflow guide for first-time assistants\n\n### VLM (Gemini \u201cNano Banana\u201d) Tools\n\n- **`check_vlm_config`** \u2013 Report readiness without exposing secrets\n- **`vlm_generate_preview`** \u2013 Text\u2192image preview for prompt/style ideation (no session)\n- **`vlm_edit_image`** \u2013 Image\u2011conditioned edit; runs full session + verification\n- **`vlm_suggest_recipe`** \u2013 Planning\u2011only: outputs Alb Compose + optional VLMEdit prompt template; can save under `outputs/recipes/`\n\nVLM quickstart (env or file):\n\n```bash\n# Option 1: env\nset ENABLE_VLM=true\nset VLM_PROVIDER=google\nset VLM_MODEL=gemini-2.5-flash-image-preview\nset GOOGLE_API_KEY=...  # or GEMINI_API_KEY / VLM_API_KEY\n\n# Option 2: file (auto\u2011discovered)\n# Place a non\u2011secret file at config/vlm.json:\n{\n  \"enabled\": true,\n  \"provider\": \"google\",\n  \"model\": \"gemini-2.5-flash-image-preview\"\n  // api_key may be in file or environment\n}\n```\n\nExamples:\n\n```python\n# Preview (no input image, no session)\nvlm_generate_preview(prompt=\"Neon night street, cinematic moodboard\")\n\n# Edit (image + prompt, full session)\nvlm_edit_image(\n    image_path=\"examples/basic_images/cat.jpg\",\n    prompt=(\n        \"Using the provided photo of a cat, add a small, knitted wizard hat. \"\n        \"Preserve identity, pose, lighting, and composition.\"\n    ),\n    edit_type=\"edit\",\n)\n\n# Plan and save a hybrid recipe (Alb + VLMEdit)\nplan = vlm_suggest_recipe(\n    task=\"domain_shift\",\n    constraints_json='{\"output_count\":3,\"identity_preserve\":true}',\n    save=True,\n)\nprint(plan[\"paths\"])  # outputs/recipes/<timestamp>_<task>_<hash>/\n```\n\nMCP env examples for VLM (choose one option)\n\nOption A \u2014 file (preferred):\n\n```json\n{\n  \"mcpServers\": {\n    \"albumentations\": {\n      \"command\": \"uvx\",\n      \"args\": [\"albumentations-mcp\"],\n      \"env\": {\n        \"MCP_LOG_LEVEL\": \"INFO\",\n        \"OUTPUT_DIR\": \"./outputs\",\n        \"ENABLE_VLM\": \"true\",\n        \"VLM_CONFIG_PATH\": \"config/vlm.json\"\n      }\n    }\n  }\n}\n```\n\nOption B \u2014 inline env (no file):\n\n```json\n{\n  \"mcpServers\": {\n    \"albumentations\": {\n      \"command\": \"uvx\",\n      \"args\": [\"albumentations-mcp\"],\n      \"env\": {\n        \"MCP_LOG_LEVEL\": \"INFO\",\n        \"OUTPUT_DIR\": \"./outputs\",\n        \"ENABLE_VLM\": \"true\",\n        \"VLM_PROVIDER\": \"google\",\n        \"VLM_MODEL\": \"gemini-2.5-flash-image-preview\"\n      }\n    }\n  }\n}\n```\n\n## Available Prompts\n\n- **`compose_preset`** - Generate augmentation policies from presets with optional tweaks\n- **`explain_effects`** - Analyze pipeline effects in plain English\n- **`augmentation_parser`** - Parse natural language to structured transforms\n- **`vision_verification`** - Compare original and augmented images\n- **`error_handler`** - Generate user-friendly error messages and recovery suggestions\n\n## Available Resources\n\n- **`transforms_guide`** - Complete transform documentation with parameters and ranges\n- **`policy_presets`** - Built-in preset configurations (segmentation, portrait, lowlight)\n- **`available_transforms_examples`** - Usage examples and patterns organized by categories\n- **`preset_pipelines_best_practices`** - Best practices guide for augmentation workflows\n- **`troubleshooting_common_issues`** - Common issues, solutions, and diagnostic steps\n- **`getting_started_guide`** - Same content as the tool version, resource-style\n\n## Usage Examples\n\n```python\n# Simple augmentation\naugment_image(\n    image_path=\"photo.jpg\",\n    prompt=\"add blur and rotate 15 degrees\"\n)\n\n# Using presets\naugment_image(\n    image_path=\"dataset/image.jpg\",\n    preset=\"segmentation\"\n)\n\n# Test prompts\nvalidate_prompt(prompt=\"increase brightness and add noise\")\n\n# Process from URL (two-step)\nsession = load_image_for_processing(image_source=\"https://example.com/image.jpg\")\n# Use the returned session_id from the previous call\naugment_image(session_id=\"<session_id>\", prompt=\"add blur and rotate 10 degrees\")\n```\n\n## Features\n\n- **Natural Language Processing** - Convert English descriptions to transforms\n- **Preset Pipelines** - Pre-configured transforms for common use cases\n- **Reproducible Results** - Seeding support for consistent outputs\n- **MCP Protocol Compliant** - Full MCP implementation with tools, prompts, and resources\n- **Comprehensive Documentation** - Built-in guides, examples, and troubleshooting resources\n- **Production Ready** - Comprehensive testing, error handling, and structured logging\n- **Multi-Source Input** - Works with local file paths, base64 payloads, and URLs (via loader)\n\n## Documentation\n\n- [Installation & Setup](docs/setup.md)\n- [Architecture Overview](docs/architecture.md)\n- [Purpose & Rationale](docs/purpose.md)\n- [Preset Configurations](docs/presets.md)\n- [Session Folders (outputs/) Guide](docs/session-folders.md)\n- [Regex Security Analysis](docs/regex_security_analysis.md)\n- [Design Philosophy](docs/design_philosophy.md)\n- [Usage Examples](docs/examples.md)\n- [VLM (Nano Banana/Gemini) Guide](docs/vlm_nano_banana.md)\n- [Troubleshooting](docs/troubleshooting.md)\n- [Contributing](docs/contributing.md)\n\n### Configuration Files\n\n- [Claude Desktop Config](docs/claude-desktop-config.json)\n- [Kiro IDE Config](docs/kiro-mcp-config.json)\n- [All Configuration Examples](docs/mcp-config-examples.json)\n- [VLM Example Config](config/vlm.example.json)\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n**Contact:** [ramsi.kalia@gmail.com](mailto:ramsi.kalia@gmail.com)\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Ramsi Kalia\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "MCP-compliant image augmentation server using Albumentations",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/ramsi-k/albumentations-mcp",
        "Issues": "https://github.com/ramsi-k/albumentations-mcp/issues",
        "Repository": "https://github.com/ramsi-k/albumentations-mcp"
    },
    "split_keywords": [
        "ai",
        " albumentations",
        " computer-vision",
        " data-augmentation",
        " gemini",
        " google-genai",
        " image-augmentation",
        " image-editing",
        " image-generation",
        " mcp",
        " mcp-server",
        " semantic-augmentation",
        " vlm"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f52c3caca365d9a341f820e694c79a428845f51950f145022525f2bb00092613",
                "md5": "02729a8f79f741e6d701f851a317d14b",
                "sha256": "75034dc968bd1a79e3accde67be236ce612936392fc77996356a90e93e7c3d58"
            },
            "downloads": -1,
            "filename": "albumentations_mcp-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "02729a8f79f741e6d701f851a317d14b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 120357,
            "upload_time": "2025-09-08T07:19:05",
            "upload_time_iso_8601": "2025-09-08T07:19:05.170615Z",
            "url": "https://files.pythonhosted.org/packages/f5/2c/3caca365d9a341f820e694c79a428845f51950f145022525f2bb00092613/albumentations_mcp-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ed9107e0c10faa67185e4e28607dab997ba46f3826f4004bab4af11052056d65",
                "md5": "02ab94c7196ea567f20a9b0ad803912b",
                "sha256": "0f43b2b336eb5539afac67677b98e88dd26a7232878bd95c00f5681949408a19"
            },
            "downloads": -1,
            "filename": "albumentations_mcp-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "02ab94c7196ea567f20a9b0ad803912b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 103584,
            "upload_time": "2025-09-08T07:19:06",
            "upload_time_iso_8601": "2025-09-08T07:19:06.632646Z",
            "url": "https://files.pythonhosted.org/packages/ed/91/07e0c10faa67185e4e28607dab997ba46f3826f4004bab4af11052056d65/albumentations_mcp-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-08 07:19:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ramsi-k",
    "github_project": "albumentations-mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "albumentations-mcp"
}
        
Elapsed time: 1.51623s