Asset Gen MCP Logo

asset-gen-mcp

AI-powered image asset generation with prompt engineering guidance and vectorization

Get API Key

Create a Google API key for Imagen access:

Google AI Studio →

Note: Imagen requires a billing-enabled API key. See Imagen pricing for details.

Requirements

Node.js >= 18
Python (for background removal) - Pre-installed on macOS and most Linux distributions
Google API Key - Get one at Google AI Studio

First Run Notice: The remove-background tool downloads an ML model (~150MB) and creates a Python virtual environment on first use. This takes approximately 3 minutes. Subsequent runs are fast (~2-5 seconds).

Install

npx (recommended - always latest)

npx -y @morphkit/asset-gen-mcp@latest

Or install globally:

npm

npm install -g @morphkit/asset-gen-mcp

yarn

yarn global add @morphkit/asset-gen-mcp

pnpm

pnpm add -g @morphkit/asset-gen-mcp

bun

bun add -g @morphkit/asset-gen-mcp

MCP Client Setup

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "asset-gen": {
      "command": "npx",
      "args": ["-y", "@morphkit/asset-gen-mcp@latest"],
      "env": {
        "GOOGLE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Claude Code

Run the following command (replace YOUR_API_KEY with your actual key):

claude mcp add asset-gen -e GOOGLE_API_KEY=YOUR_API_KEY -- npx -y @morphkit/asset-gen-mcp@latest

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "asset-gen": {
      "command": "npx",
      "args": ["-y", "@morphkit/asset-gen-mcp@latest"],
      "env": {
        "GOOGLE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Windsurf

Add to ~/.windsurf/mcp.json:

{
  "mcpServers": {
    "asset-gen": {
      "command": "npx",
      "args": ["-y", "@morphkit/asset-gen-mcp@latest"],
      "env": {
        "GOOGLE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Tools

get-image-generation-prompt-instructions

Returns asset-type-specific prompt engineering best practices for Google Imagen.

{
  "assetType": "logo",                   // required: logo | icon | illustration | character | sprite | pattern | photograph | ui-element
  "query": "I need a tech startup logo", // optional: context for the guidelines
  "stylePreferences": {                  // optional: style hints
    "colorScheme": "blue and white",
    "artStyle": "minimalist",
    "mood": "professional"
  }
}

generate-images

Generates images using Google Imagen with auto-vectorization for SVG outputs. Supports batch processing with up to 10 parallel requests.

{
  "requests": [
    {
      "outputPath": "/path/to/logo.png",            // required: output file path
      "extension": "png",                           // required: png | svg | webp | jpeg
      "prompt": "Minimalist owl logo, flat design", // required: 1-2000 chars
      "images": ["/path/to/reference.png"],         // optional: reference images (paths or URLs)
      "removeBackground": true                      // optional: AI background removal (png only)
    },
    {
      "outputPath": "/path/to/icon.svg",
      "extension": "svg",
      "prompt": "Settings gear icon, outlined style"
    }
  ],
  "model": "imagen-4.0-generate-001" // optional: imagen-4.0-ultra-generate-001 | imagen-4.0-generate-001 (default) | imagen-4.0-fast-generate-001
}

vectorize-image

Converts raster images (PNG, JPEG, WebP) to SVG using configurable vectorization options.

{
  "inputPath": "/path/to/input.png",  // required: source image
  "outputPath": "/path/to/output.svg", // required: output SVG path
  "config": {                          // optional: all fields have defaults
    "colorMode": "color",              // color | binary (default: color)
    "hierarchical": "stacked",         // stacked | cutout (default: stacked)
    "mode": "spline",                  // spline | polygon | none (default: spline)
    "filterSpeckle": 4,                // 0-100: remove small artifacts (default: 4)
    "colorPrecision": 6,               // 1-8: color clustering precision (default: 6)
    "layerDifference": 16,             // 0-100: color layer threshold (default: 16)
    "cornerThreshold": 60,             // 0-180: corner detection angle (default: 60)
    "lengthThreshold": 4,              // 0-10: min path segment length (default: 4)
    "spliceThreshold": 45,             // 0-180: curve splice angle (default: 45)
    "maxIterations": 10,               // 1-20: curve fitting iterations (default: 10)
    "pathPrecision": 3                 // 1-8: SVG path decimal precision (default: 3)
  }
}

remove-background

AI-powered background removal using InSPyReNet model. Works with complex backgrounds, shadows, and lighting effects. Outputs transparent PNG. Powered by transparent-background.

{
  "inputPath": "/path/to/image.png",  // required: source image
  "outputPath": "/path/to/output.png", // required: output PNG with transparency
  "fast": false                        // optional: true = 384x384 (faster), false = 1024x1024 (default, higher quality)
}

Model Selection

imagen-4.0-ultra-generate-001

Highest quality. Best for final marketing assets and premium output.

imagen-4.0-generate-001 (default)

Balanced quality, speed, and cost. Recommended for most use cases.

imagen-4.0-fast-generate-001

Speed-optimized. Best for rapid prototyping and iteration.