Skip to main content

icon-mcp-server

A Model Context Protocol (MCP) server that generates software / app icons locally with Pillow — no external API, no network calls, no keys required.

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.


Features

  • 5 visual styles: gradient, solid, outlined, shape, mono
  • 6 silhouette shapes: circle, square, rounded, triangle, hexagon, diamond
  • Multi-resolution output: single PNG, full PNG set, or aggregated Windows .ico
  • Optional .icns for macOS bundles
  • 4× 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-server

Or run without installing:

pipx run icon-mcp-server

Wire it up to an MCP client

Qoder / Claude Desktop / Cursor — mcp.json

{
  "mcpServers": {
    "icon-generator": {
      "command": "icon-mcp-server",
      "args": []
    }
  }
}

If the console script is not on PATH, invoke via Python:

{
  "mcpServers": {
    "icon-generator": {
      "command": "python",
      "args": ["-m", "icon_mcp_server"]
    }
  }
}
{
  "mcpServers": {
    "icon-generator": {
      "command": "uvx",
      "args": ["icon-mcp-server"]
    }
  }
}

Exposed MCP tools

Tool Purpose
list_icon_styles Discover available styles, shapes, and default palette
generate_icon Render a single PNG / ICO / ICNS file to disk
generate_icon_set Render a multi-size PNG set plus an aggregated Windows .ico
generate_icon_base64 Render and return inline base64 PNG (no disk write, great for previews)

Common parameters

Param Type Default Notes
text str "" Centered label / initials / single emoji
style enum gradient gradient | solid | outlined | shape | mono
shape enum rounded circle | square | rounded | triangle | hexagon | diamond
size int (px) 512 Clamped to 16..2048
fg_color color #FFFFFF Text / silhouette color
bg_color color #4F8DFD Background or gradient start
bg_color_2 color / null #8E5BFF Gradient end (ignored when null)
gradient_angle float (deg) 135 0 = left→right, 90 = top→bottom
font_scale float 0.55 Text height as fraction of icon size
corner_radius float 0.22 Only for shape='rounded'
border_width float 0.0 Stroke width as fraction of size
border_color color #FFFFFF Stroke color
shadow bool false 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 --version

Publishing to PyPI

One-time setup:

pip install --upgrade build twine

Build & 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__ and TWINE_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-xxxxxxxxxxxxxxxxxxxxxxxx
    
  • Trusted 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.

Release files for icon-mcp-server 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for icon-mcp-server 0.1.0
File Size Uploaded
icon_mcp_server-0.1.0.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for icon-mcp-server 0.1.0
File Interpreter ABI Platform
icon_mcp_server-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.4 kB

Release files / icon_mcp_server-0.1.0.tar.gz

Download URL icon_mcp_server-0.1.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9e7e90b934d7418d388a5c7a071ffb64edd189c7fee89055a732ddcf6fdb67bf
BLAKE2b-256 checksum
How to use checksums
b880e09af716fe44344f8279acb53ced2b439079f3307a48609ab87fabdf3d14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / icon_mcp_server-0.1.0-py3-none-any.whl

Download URL icon_mcp_server-0.1.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12df53a3305fdeabc26b90172726b75240a7dc4e02ae285b8c974ef6c6938c8f
BLAKE2b-256 checksum
How to use checksums
8ea202364da311d942d0644338376dd38d8665b0fa0948c0213f24c6de11b4c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page