Skip to main content
Glama

🎨 vectorizer-ai-mcp

Pipeline Status Coverage Ruff Python 3.11+ License: MIT

Minimal MCP server for Vectorizer.AI - AI-powered bitmap to vector conversion.

✨ Features

  • πŸ–ΌοΈ vectorize_image: Convert PNG/JPG/WEBP/BMP/GIF to SVG/PDF/EPS/DXF

  • πŸ’Ύ save_file: Save vectorized output to local files

  • πŸ“Š check_account: Verify API credentials and credit balance

Related MCP server: Omni File Converter MCP

πŸ“¦ Installation

# With uv (recommended)
uv pip install .

# With pip
pip install .

βš™οΈ Configuration

Configuration is managed via environment variables using pydantic-settings.

Required Variables

Variable

Description

VECTORIZER_API_ID

Your Vectorizer.AI API ID

VECTORIZER_API_SECRET

Your Vectorizer.AI API secret

πŸ”‘ Get your credentials at vectorizer.ai/api.

Optional Variables

Variable

Default

Description

VECTORIZER_API_BASE_URL

https://api.vectorizer.ai/api/v1

API base URL

VECTORIZER_TIMEOUT

180.0

Request timeout in seconds (max 600)

Create a .envrc file in the project directory:

export VECTORIZER_API_ID="your-api-id"
export VECTORIZER_API_SECRET="your-api-secret"
# Optional: increase timeout for large images
export VECTORIZER_TIMEOUT="300"

Then run direnv allow to load the environment.

πŸš€ Running the Server

Standalone

# With uv
uv run vectorizer-ai-mcp

# Or if installed
vectorizer-ai-mcp

With Claude Code

Add to .mcp.json:

{
  "mcpServers": {
    "vectorizer-ai": {
      "command": "vectorizer-ai-mcp",
      "env": {
        "VECTORIZER_API_ID": "your-api-id",
        "VECTORIZER_API_SECRET": "your-api-secret"
      }
    }
  }
}

Or with uv (no global install needed):

{
  "mcpServers": {
    "vectorizer-ai": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/vectorizer-ai-mcp", "vectorizer-ai-mcp"],
      "env": {
        "VECTORIZER_API_ID": "your-api-id",
        "VECTORIZER_API_SECRET": "your-api-secret"
      }
    }
  }
}

πŸ› οΈ Tools

vectorize_image

Convert bitmap to vector graphics.

Parameter

Type

Required

Description

image

string

βœ…

Local file path, URL, or base64-encoded image

output_format

string

svg (default), pdf, eps, dxf, png

mode

string

production (1 credit), preview (0.2), test (free)

output_path

string

Save output directly to this path

max_colors

int

Limit colors (0-256, 0=unlimited)

curves

string

all, beziers_only, lines_only, arcs_and_lines

palette

string

Color palette mapping (see below)

Example:

vectorize_image(
  image="/path/to/logo.png",
  output_format="svg",
  mode="production",
  output_path="/path/to/logo.svg"
)

Palette Parameter

The palette parameter allows you to map or remove specific colors during vectorization. This is useful for:

  • Making backgrounds transparent

  • Remapping colors to a specific palette

  • Removing unwanted colors from the output

Format: [color][-> remapped][~ tolerance];

Syntax

Description

#RRGGBB

Opaque color

#RRGGBBAA

Color with alpha (00 = transparent)

-> #color

Remap to different color

~ 0.02

Tolerance (0-2.0, default 2.0)

Examples:

# Remove dark background (make transparent)
vectorize_image(
  image="/path/to/logo.png",
  palette="#0d1117 -> #00000000;",
  output_path="/path/to/logo-transparent.svg"
)

# Snap colors to specific palette
vectorize_image(
  image="/path/to/logo.png",
  palette="#FF0000 ~ 0.02; #00FF00 ~ 0.02; #0000FF ~ 0.02; #00000000;",
  output_path="/path/to/logo-limited.svg"
)

check_account

Verify API credentials and check credit balance. No parameters required.

save_file

Save base64-encoded content to a local file.

Parameter

Type

Required

Description

content_base64

string

βœ…

Base64-encoded file content

path

string

βœ…

Destination file path

πŸ’° Pricing

Mode

Credits

Quality

πŸ§ͺ Test

Free

Watermarked

πŸ‘οΈ Preview

0.2

Watermarked, lower res

βœ… Production

1.0

Full quality

Credits start at $0.20/credit (50 credits for $9.99/month).

πŸ§‘β€πŸ’» Development

# Install dev dependencies
uv sync --dev

# Run tests
uv run pytest

# Lint & format
uv run ruff check --fix src/ tests/
uv run ruff format src/ tests/

πŸ“„ License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers