icon-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@icon-mcp-server generate a 512px gradient app icon with the letter 'G' on a rounded square"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
icon-mcp-server
中文名称:图标生成 MCP 服务 English name:icon-mcp-server 分类 / Category:开发者工具 / Developer Tools · 图像生成 / Image Generation
A Model Context Protocol (MCP) server that generates software / app icons locally with Pillow — no external API, no network calls, no keys required.
一个基于 Pillow 的本地 MCP 服务,用于生成软件 / 应用图标(PNG / ICO / ICNS)。 无需外部 API、无需联网、无需密钥。
Renders PNG / ICO / ICNS files with gradients, shapes, borders, drop shadows, and centered text or emoji — perfect for quickly bootstrapping app icons, favicons, tray icons, or placeholder assets.
服务配置 / MCP Configuration
推荐使用 uvx 拉起(无需预装,自动创建临时环境):
{
"mcpServers": {
"icon-generator": {
"command": "uvx",
"args": ["icon-mcp-server"]
}
}
}环境变量 / Environment variables:无需(本服务完全离线运行,不依赖任何 API Key)。
托管部署兼容性 / Hosted deployment:
完全支持魔搭 MCP 广场「可托管部署」模式(Hosted / SSE)。
在托管模式下,
generate_icon和generate_icon_set会写入服务器磁盘,用户无法直接下载文件。托管模式推荐使用
generate_icon_base64工具,它直接返回 base64 编码的 PNG(客户端可渲染data:image/png;base64,...URL)。本地部署(stdio)时,全部 4 个工具都能正常使用。
Related MCP server: Toolkits MCP
工具列表 / Tools
Tool | Purpose | 用途 |
| Discover available styles, shapes, and default palette | 查询可用样式、形状与默认调色板 |
| Render a single PNG / ICO / ICNS file to disk | 渲染单个 PNG / ICO / ICNS 文件到磁盘 |
| Render a multi-size PNG set + aggregated Windows | 渲染多尺寸 PNG 集 + 聚合 Windows |
| Render and return inline base64 PNG (no disk write) | 渲染并返回内嵌 base64 PNG(不写盘,适合托管模式) |
Features / 特性
5 visual styles:
gradient,solid,outlined,shape,mono6 silhouette shapes:
circle,square,rounded,triangle,hexagon,diamondMulti-resolution output: single PNG, full PNG set, or aggregated Windows
.icoOptional
.icnsfor macOS bundles4× supersampling + LANCZOS downscale → crisp results even at 16 px
Base64 preview mode for MCP clients that cannot read local files
Zero external services — everything runs offline via Pillow
Install from PyPI / 安装
pip install icon-mcp-serverOr run without installing / 或免安装运行:
pipx run icon-mcp-serverAlternative MCP client configurations / 其他客户端配置
以下配置与顶部「服务配置」章节等效,供不同客户端场景选择。如果你正在把本服务提交给魔搭 MCP 广场,请使用顶部的 uvx 配置。
已 pip install 后(console script 在 PATH 上)
{
"mcpServers": {
"icon-generator": {
"command": "icon-mcp-server",
"args": []
}
}
}通过 Python 模块方式(console script 不在 PATH 上时)
{
"mcpServers": {
"icon-generator": {
"command": "python",
"args": ["-m", "icon_mcp_server"]
}
}
}Exposed MCP tools — parameters / 工具参数详情
Common parameters
Param | Type | Default | Notes |
| str |
| Centered label / initials / single emoji |
| enum |
|
|
| enum |
|
|
| int (px) |
| Clamped to 16..2048 |
| color |
| Text / silhouette color |
| color |
| Background or gradient start |
| color / null |
| Gradient end (ignored when null) |
| float (deg) |
|
|
| float |
| Text height as fraction of icon size |
| float |
| Only for |
| float |
| Stroke width as fraction of size |
| color |
| Stroke color |
| bool |
| Soft drop shadow behind silhouette |
Example calls
// generate_icon
{
"out_path": "./out/app.png",
"text": "Q",
"style": "gradient",
"shape": "rounded",
"bg_color": "#4F8DFD",
"bg_color_2": "#8E5BFF",
"gradient_angle": 135,
"size": 512
}// generate_icon_set → writes app_16.png … app_512.png + app.ico
{
"out_dir": "./dist/icons",
"base_name": "app",
"text": "A",
"style": "solid",
"shape": "circle",
"bg_color": "#FF7043",
"include_ico": true,
"png_sizes": [16, 32, 48, 64, 128, 256, 512]
}Local development
git clone <your-fork-url> icon-mcp-server
cd icon-mcp-server
python -m venv .venv
# Windows PowerShell:
.venv\Scripts\Activate.ps1
# macOS / Linux:
# source .venv/bin/activate
pip install -e ".[dev]"
icon-mcp-server --self-test # renders samples into ./_icon_self_test
python -m icon_mcp_server --versionPublishing to PyPI
One-time setup:
pip install --upgrade build twineBuild & upload:
# 1. Bump version in pyproject.toml (and src/icon_mcp_server/__init__.py)
# 2. Clean previous artifacts
rmdir /s /q dist 2>nul || rm -rf dist
# 3. Build sdist + wheel
python -m build
# 4. Validate
twine check dist/*
# 5. Upload to TestPyPI first (recommended)
twine upload --repository testpypi dist/*
# 6. Smoke-test install from TestPyPI
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ icon-mcp-server
icon-mcp-server --self-test
# 7. Publish to real PyPI
twine upload dist/*Auth options for twine
API token (recommended): set
TWINE_USERNAME=__token__andTWINE_PASSWORD=<your-pypi-token>, or configure~/.pypirc:[distutils] index-servers = pypi, testpypi [pypi] username = __token__ password = pypi-xxxxxxxxxxxxxxxxxxxxxxxx [testpypi] repository = https://test.pypi.org/legacy/ username = __token__ password = pypi-xxxxxxxxxxxxxxxxxxxxxxxxTrusted Publisher (OIDC) — no token needed. Configure it in the PyPI project settings and publish from a GitHub Actions workflow using
pypa/gh-action-pypi-publish.
License
MIT — see LICENSE.
Available Tools
4 toolsgenerate_iconA
Render a single icon and save it to out_path.
Parameters
out_path : str
Destination file path. Extension determines the format unless fmt is given.
Supported extensions: .png (default), .ico, .icns.
text : str
Short label drawn in the center (initials, single glyph, or emoji).
style : str
One of gradient / solid / outlined / shape / mono.
size : int
Edge length in pixels, 16..2048.
shape : str
One of circle / square / rounded / triangle / hexagon / diamond.
fg_color, bg_color, bg_color_2, border_color : str
CSS-like color strings (#RRGGBB or named colors).
gradient_angle : float
Gradient direction in degrees (0 = left→right, 90 = top→bottom).
font_scale : float
Text height as fraction of the icon size (0.05..1.2).
corner_radius : float
Corner radius fraction for shape='rounded' (0..0.5).
border_width : float
Stroke width as a fraction of the icon size (0..0.15).
shadow : bool
Add a soft drop shadow behind the icon silhouette.
fmt : str, optional
Force output format (png / ico / icns).
Inputs: out_path (required), fmt, size, text, +11 more.
generate_icon_base64A
Render an icon and return it as a base64-encoded PNG string (no disk write).
Useful for previews inside MCP clients that cannot read local files.
Inputs: size, text, shape, style, +9 more.
generate_icon_setC
Render a multi-resolution icon set: several PNGs + an aggregated .ico.
The largest PNG is drawn once at high resolution and downscaled with LANCZOS for every other size, so all outputs share the same design.
Inputs: out_dir (required), text, shape, style, +12 more.
list_icon_stylesA
Return the available styles, shapes, and default palette values.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Most tools have clearly distinct purposes: listing styles, rendering to base64 for previews, rendering to a file, and rendering a multi-resolution set. generate_icon and generate_icon_base64 overlap conceptually (both render a single icon), but their output modes (file vs. base64 string) are distinct enough to avoid confusion.
All tool names follow a consistent snake_case verb_noun pattern (list_*, generate_*) with the target clearly indicated (styles, icon_base64, icon, icon_set). The compound names are descriptive and align with the underlying actions, making the naming predictable.
Four tools is well-scoped for an icon generation server: one for metadata/discovery, two for single-icon output variants, and one for multi-resolution sets. Each tool earns its place without redundancy or bloat.
The tool surface covers the full icon-generation workflow: discover available styles, preview as base64, save a single icon in multiple formats, and produce a full icon set. There are no obvious dead ends or missing operations for the stated purpose.
Maintenance
Related MCP Connectors
Generate PWA icon sets and iOS splash screens from a text prompt or an existing image.
Check, generate, and troubleshoot complete favicon, Apple touch icon, PWA, and web app icon sets.
Generate favicons (ICO, SVG, Apple touch, PWA, manifest) from SVG, text or emoji; check any site.
Generate matching icon sets, spot illustrations and transparent design assets for sites and apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceGenerates all required web app icons and manifest files from a single source image with framework auto-detection. Supports Next.js App Router, traditional web apps, and PWA standards with zero configuration.16 npmMIT
- FlicenseNot gradedqualityDmaintenanceA collection of image processing tools that enables users to optimize images, remove backgrounds using AI, and generate favicons from logo files locally.-
- AlicenseCqualityCmaintenanceGenerate deployment-ready PWA, iOS, and Android app icon sets from a text description. Produces all 27 required sizes, maskable icons, Xcode-ready iOS icons, Android mipmap folders, splash screens, and manifest.json packaged as a ZIP. Powered by Google Imagen 4.62MIT
- AlicenseBqualityDmaintenanceGenerates app icons with customizable text, colors, and sizes, including complete iOS app icon sets.2MIT