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.
Example: "add blur and rotate 15 degrees" → Applies GaussianBlur + Rotate transforms automatically
Quick Start
# Install from PyPI
pip install albumentations-mcp
# Run as MCP server
uvx albumentations-mcp
MCP Client Setup
Claude Desktop
Copy claude-desktop-config.json to ~/.claude_desktop_config.json
Or add manually:
{
"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 to .kiro/settings/mcp.json
Or add manually:
{
"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 presetslist_available_transforms- Get supported transforms and parametersvalidate_prompt- Test prompts without processing imageslist_available_presets- Get available preset configurationsset_default_seed- Set global seed for reproducible resultsget_pipeline_status- Check pipeline health and configurationget_quick_transform_reference- Condensed transform keywords for promptingget_getting_started_guide- Structured workflow guide for first-time assistants
VLM (Gemini “Nano Banana”) Tools
check_vlm_config– Report readiness without exposing secretsvlm_generate_preview– Text→image preview for prompt/style ideation (no session)vlm_edit_image– Image‑conditioned edit; runs full session + verificationvlm_suggest_recipe– Planning‑only: outputs Alb Compose + optional VLMEdit prompt template; can save underoutputs/recipes/
VLM quickstart (env or file):
# 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:
# 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):
{
"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):
{
"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 tweaksexplain_effects- Analyze pipeline effects in plain Englishaugmentation_parser- Parse natural language to structured transformsvision_verification- Compare original and augmented imageserror_handler- Generate user-friendly error messages and recovery suggestions
Available Resources
transforms_guide- Complete transform documentation with parameters and rangespolicy_presets- Built-in preset configurations (segmentation, portrait, lowlight)available_transforms_examples- Usage examples and patterns organized by categoriespreset_pipelines_best_practices- Best practices guide for augmentation workflowstroubleshooting_common_issues- Common issues, solutions, and diagnostic stepsgetting_started_guide- Same content as the tool version, resource-style
Usage Examples
# 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
- Architecture Overview
- Purpose & Rationale
- Preset Configurations
- Session Folders (outputs/) Guide
- Regex Security Analysis
- Design Philosophy
- Usage Examples
- VLM (Nano Banana/Gemini) Guide
- Troubleshooting
- Contributing
Configuration Files
License
MIT License - see LICENSE for details.
Contact: ramsi.kalia@gmail.com
Metadata
Release files for albumentations-mcp 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| albumentations_mcp-1.0.2.tar.gz | 103.6 kB | Without provenance | Details for albumentations_mcp-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| albumentations_mcp-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for albumentations_mcp-1.0.2-py3-none-any.whl |
Total release size: 223.9 kB
Release files / albumentations_mcp-1.0.2.tar.gz
| Download URL | albumentations_mcp-1.0.2.tar.gz |
|---|---|
| Size | 103.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f43b2b336eb5539afac67677b98e88dd26a7232878bd95c00f5681949408a19
|
|
BLAKE2b-256 checksum How to use checksums |
ed9107e0c10faa67185e4e28607dab997ba46f3826f4004bab4af11052056d65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / albumentations_mcp-1.0.2-py3-none-any.whl
| Download URL | albumentations_mcp-1.0.2-py3-none-any.whl |
|---|---|
| Size | 120.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75034dc968bd1a79e3accde67be236ce612936392fc77996356a90e93e7c3d58
|
|
BLAKE2b-256 checksum How to use checksums |
f52c3caca365d9a341f820e694c79a428845f51950f145022525f2bb00092613
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for albumentations-mcp 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.