Illustrator MCP Vectorizer

Illustrator MCP Vectorizer

Enables AI agents to automate Adobe Illustrator, converting bitmap artwork into editable .ai files, running ExtendScript, and capturing the Illustrator window for visual QA.

Category
访问服务器

README

Illustrator MCP Vectorizer

Automate Adobe Illustrator from AI agents and convert bitmap artwork into editable .ai files.

This project started from krVatsal/illustrator-mcp and adds a practical bitmap-to-vector pipeline:

  • Run ExtendScript in Adobe Illustrator through an MCP server.
  • Capture the Illustrator window for visual QA.
  • Convert PNG/JPEG artwork into Illustrator paths.
  • Choose between deterministic local vectorization, app-icon silhouette tracing, and native Illustrator Image Trace.
  • Save repeatable .jsx scripts and final .ai files from the command line or MCP clients.

Demo

App icon mode

Use this mode for simple app icons where subtle gradients should not split one visual layer into many fragments.

Vectorized travel icon

Illustrator Image Trace mode

Use this mode for complex flat illustrations, JPEG inputs, and artwork where Illustrator's native smoothing gives better visual results.

Image traced lighthouse island

When to use each mode

Mode Best for Tradeoff
color Flat logos, icons, posters, and controlled source art Fully local and deterministic, but JPEG noise can create extra paths
icon App-style icons with one rounded background and light foreground glyphs Very clean layers for that specific icon shape family
image-trace / image_trace Complex illustrations and noisy JPEGs Requires Illustrator execution, but usually gives the cleanest result

Requirements

  • Python 3.12+
  • Adobe Illustrator installed
  • Windows: pywin32 is installed from dependencies
  • macOS: grant Automation permissions when prompted

Optional:

  • OPENAI_API_KEY for OpenAI vision-based layer naming
  • A local llama.cpp multimodal model for offline layer naming

Install

git clone https://github.com/yingy-buxing/illustrator-mcp-vectorizer.git
cd illustrator-mcp-vectorizer
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt

On macOS/Linux:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

CLI usage

Generate a reusable JSX file and an output path for Illustrator to save:

python -m illustrator.vectorize_cli input.png ^
  --mode color ^
  --jsx output.jsx ^
  --output-ai output.ai ^
  --colors 32 ^
  --max-dimension 1200 ^
  --min-area 40

For app icons with a gradient background and light foreground glyph:

python -m illustrator.vectorize_cli icon.png ^
  --mode icon ^
  --jsx icon.jsx ^
  --output-ai icon.ai ^
  --max-dimension 1024 ^
  --min-area 80

For complex JPEG illustrations, use native Illustrator Image Trace:

python -m illustrator.vectorize_cli illustration.jpg ^
  --mode image-trace ^
  --jsx illustration-trace.jsx ^
  --output-ai illustration-trace.ai ^
  --colors 48 ^
  --max-dimension 1200 ^
  --trace-median-filter 3

Run the generated JSX inside Illustrator with the MCP run tool, or use the MCP tool below with execute: true.

MCP server

Start the server:

python -m illustrator

Example client configuration:

{
  "mcpServers": {
    "illustrator": {
      "command": "C:\\path\\to\\repo\\.venv\\Scripts\\python.exe",
      "args": ["-m", "illustrator"]
    }
  }
}

The server exposes these core tools:

  • run: execute ExtendScript in Illustrator
  • view: capture the Illustrator window
  • vectorize_bitmap: convert a bitmap into a .jsx script and optionally execute it/save .ai
  • get_prompt_suggestions, get_system_prompt, get_prompting_tips, get_advanced_template, help: prompt helpers inherited from the original project

Example vectorize_bitmap arguments:

{
  "image_path": "E:\\input.jpg",
  "output_path": "E:\\output.ai",
  "jsx_path": "E:\\output.jsx",
  "vector_mode": "image_trace",
  "colors": 48,
  "max_dimension": 1200,
  "trace_median_filter": 3,
  "execute": true
}

Use vector_mode: "color" for deterministic local tracing, vector_mode: "icon" for app-icon silhouettes, and vector_mode: "image_trace" for Illustrator Image Trace.

Layer planning

Local vectorization can optionally rename layers with a visual planner:

  • layer_provider: "auto" uses OpenAI vision when OPENAI_API_KEY is available, otherwise falls back to heuristic layers.
  • layer_provider: "openai" requires an OpenAI API key.
  • layer_provider: "local" uses a local llama.cpp multimodal model.
  • layer_provider: "none" disables semantic layer planning.

Strict validation is available with require_visual_model: true; the tool stops before generating JSX if the visual planner does not complete.

Codex skill

This repo includes a skill at:

skills/illustrator-vectorizer

Use it when you want Codex to choose the best vectorization mode, run the pipeline, inspect previews, and hand back .ai/.jsx outputs. To install it locally, copy that folder into your Codex skills directory:

Copy-Item -Recurse .\skills\illustrator-vectorizer C:\Users\Administrator\.codex\skills\illustrator-vectorizer

Development

Run tests:

python -m unittest discover -s tests -v

Important files:

  • illustrator/server.py: MCP tools and Illustrator execution
  • illustrator/vectorizer.py: deterministic local color/icon vectorization
  • illustrator/image_trace.py: native Illustrator Image Trace JSX generation
  • illustrator/vectorize_cli.py: command line entry point
  • skills/illustrator-vectorizer/SKILL.md: Codex skill workflow

Notes

  • .env.local is ignored and can hold local API keys.
  • Generated .ai files are Adobe Illustrator documents; the .jsx files are reproducible scripts used to create them.
  • JPEG sources often need image-trace mode or preprocessing because compression artifacts become tiny vector fragments.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选