# MohamedAbdallah-14/prompt-to-asset [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/MohamedAbdallah-14/prompt-to-asset  
**GitHub Stars:** 19  
**npm Downloads (last month):** 565  
**Views:** 5  
**Installs:** 2  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mohamedabdallah-14-prompt-to-asset

## Description
Generates app icons, favicons, OG images, logos, and wordmarks. Routes each request across 30+ image models. Runs without an API key via Cloudflare Workers AI, NVIDIA NIM, HuggingFace, or Stable Horde. Three modes: inline SVG, external prompt-only, or full API. Validates contrast, OCR text accuracy, and palette before returning.

## Tools
Capabilities this server exposes over MCP:

- **asset_capabilities** — Report which of the three execution modes this server can run RIGHT NOW given the current env: inline_svg (zero key — hosting LLM authors the SVG), external_prompt_only (zero key — paste prompt into Ideogram/Nano Banana/Midjourney/Recraft/Flux UIs, then asset_ingest_external), api (requires provider key). Read-only; no network. Call before offering the user options.
- **asset_enhance_prompt** — Classify an asset brief, route to the right model, rewrite the prompt in that model's dialect, and report which execution modes are available (inline_svg / external_prompt_only / api). Returns an AssetSpec JSON including modes_available, optional svg_brief (for inline_svg), optional paste_targets (for external_prompt_only), and — when the brief leaves a material ambiguity — a `clarifying_questions[]` array the host LLM should surface via AskUserQuestion (or the equivalent) BEFORE calling a generator. Each entry has {id, header, question, options[], required, why}. Read-only; idempotent; no network.
- **asset_generate_logo** — Generate a logo. Three modes: inline_svg (Claude emits SVG — zero key), external_prompt_only (returns prompt + paste targets — zero key), api (server runs the provider pipeline — requires key). Omit mode to auto-select. Returns an AssetBundle / InlineSvgPlan / ExternalPromptPlan discriminated by the mode field.
- **asset_generate_app_icon** — Generate an app icon (iOS AppIconSet, Android adaptive, PWA maskable, visionOS 1024² master + placeholder parallax layers). Three modes (inline_svg / external_prompt_only / api). In non-api modes only the master mark is produced; call asset_ingest_external afterwards to run the platform fan-out. Set ios_18_appearances=true to also emit dark and tinted 1024² variants for iOS 18 tintable icons.
- **asset_generate_favicon** — Generate a favicon bundle (favicon-{16,32,48}.png + icon.svg + icon-dark.svg + apple-touch + PWA 192/512/512-maskable + <link> snippet). Three modes — inline_svg is the best fit for simple glyph marks (legible at 16×16).
- **asset_generate_og_image** — Render a 1200×630 OG image via Satori template (deterministic typography, no diffusion). Default mode=api renders server-side without any API key. external_prompt_only is only meaningful when with_background_image is set. inline_svg is not supported (web-font loading + precise text layout beyond LLM reach).
- **asset_generate_illustration** — Generate one or more brand-locked illustrations. Two modes (external_prompt_only / api); inline_svg is not supported — path budget too small for a composed scene. Injects brand bundle (palette, style_refs, LoRA, style_id) where supported.
- **asset_generate_splash_screen** — Generate a cross-platform splash-screen bundle from a brand mark. Two modes (external_prompt_only / api); inline_svg is not supported (splash screens are PNG bundles — generate a logo inline_svg first, then call this with existing_mark_svg). api mode composites the mark onto background_color and emits ios/LaunchScreen-2732.png, android/mipmap-*dpi/splash.png, android/themes-splash.xml, pwa/splash-1200.png, and a README describing how to wire each.
- **asset_generate_hero** — Generate marketing-hero / landing-page banner art. Two modes (external_prompt_only / api); inline_svg is not supported. Accepts aspect_ratio (16:9 / 21:9 / 3:2 / 2:1). Injects brand bundle where supported. Returns N variants if count>1.
- **asset_remove_background** — Matte an image to transparent background (BiRefNet / BRIA RMBG / U²-Net via remote endpoint; local white-chroma fallback). Returns RGBA PNG path.
- **asset_vectorize** — Convert a raster image to SVG. Tries in order: Recraft /vectorize (if PROMPT_TO_BUNDLE_RECRAFT_VECTORIZE_URL is set), vtracer on PATH, potrace on PATH, then a built-in posterize run-length fallback. Passes all output through SVGO when installed.
- **asset_upscale_refine** — Upscale / refine an image, asset-type-aware. DAT2 for flat logos/icons, Real-ESRGAN/SUPIR for photoreal, img2img for diffusion polish. Lanczos fallback.
- **asset_validate** — Run tier-0 deterministic validators on an asset (dimensions, alpha presence, checkerboard-pattern heuristic on tile-luma alternation, safe-zone bbox, palette ΔE2000 against brand, WCAG contrast of brand primary vs light and dark tabs, OCR Levenshtein against intended_text). Optional tier-2 VLM-as-judge via PROMPT_TO_BUNDLE_VLM_URL.
- **asset_brand_bundle_parse** — Parse a brand source (brand.json, DTCG tokens, AdCP spec, brand.md, or raw text) into the canonical BrandBundle schema.
- **asset_save_inline_svg** — Round-trip endpoint for inline_svg mode. After you (the LLM) emit the <svg>…</svg> in chat, immediately call this tool with that SVG text so the server writes a complete asset bundle to disk: master.svg + (for favicon) icon.svg + icon-dark.svg + favicon-{16,32,48}.png + favicon.ico + apple-touch-icon.png (opaque) + pwa-192.png + pwa-512.png + pwa-512-maskable.png + manifest.webmanifest + head-snippet.html + (for app_icon) the full iOS AppIconSet + Android adaptive (foreground+background+monochrome) + PWA maskable + visionOS. Returns an AssetBundle with file paths the user can open. Validates the SVG against the original svg_brief (viewBox, path count, palette, forbidden elements).
- **asset_ingest_external** — Ingest an image the user generated in an external tool (Midjourney, Nano Banana, Ideogram web, Recraft, Flux Playground, etc.) and run the matte → vectorize (where applicable) → tier-0 validation pipeline. The round-trip endpoint for external_prompt_only mode.
- **asset_train_brand_lora** — Train a brand-consistent LoRA from 20-50 sample images, returning a `lora_id` the `comfyui-*` and SDXL-family providers can reference. Requires a user-owned training endpoint (Modal / Runpod / self-host) at PROMPT_TO_BUNDLE_MODAL_LORA_TRAIN_URL. Phase-4 scaffold: the MCP tool does the packaging, validation, and HTTP; the user owns the deployment and pricing. See docs/research/06-stable-diffusion-flux/6d-lora-training-for-brand-style.md.
- **asset_doctor** — Structured environment inventory — MCP equivalent of `p2a doctor`. Returns native-dependency status (sharp, vtracer, potrace, png-to-ico, satori, resvg-js, tesseract.js, svgo), free-tier routes ranked best-first, paid-provider keys, paste-only providers, pipeline extension URLs, which modes are available right now, and a concrete 'what to try next' suggestion list. Read-only by default. Pass check_data=true to also run the model-registry/routing-table integrity check. Pass auto_fix=true to install missing native binaries (Homebrew / cargo / scoop — never sudo); pair with auto_fix_dry_run=true to preview without executing.
- **asset_models_list** — List the model registry (60+ entries) with optional filters. MCP equivalent of `p2a models list`. Returns id, family, provider, dialect, native_rgba/svg flags, text ceiling, tier (free/paid/paste-only), key_set status. Filter flags: free, paid, paste_only, rgba, svg. Read-only; no network.
- **asset_models_inspect** — Full capability dump for one model. MCP equivalent of `p2a models inspect <id>`. Accepts a model id or an `aka` alias. Returns the full ModelInfo record, env status, paste targets, routing rules that reference this model (as PRIMARY / fallback / NEVER), and usage notes. Read-only; no network.
- **asset_export_bundle** — Fan out a 1024² master PNG into the full platform bundle (iOS AppIconSet, Android adaptive, PWA maskable, visionOS parallax, Flutter launcher, favicon set). MCP equivalent of `p2a export master.png`. No API key required; runs entirely on sharp. Use when the LLM has a master (inline_svg saved, api-mode result, or user-supplied hand-authored PNG) and needs the platform fan-out.
- **asset_sprite_sheet** — Pack a directory of PNG/WEBP/JPG frames into one sprite sheet + TexturePacker-compatible JSON atlas (works in Phaser, PixiJS, Three.js, Godot, Unity via a light importer). MCP equivalent of `p2a sprite-sheet <dir>`. Offline, no API key.
- **asset_nine_slice** — Emit a 9-slice config + CSS border-image snippet + Unity/Godot/Phaser/PixiJS-ready numbers from one image and 4 pixel offsets. Optionally also emit an Android .9.png with the 1px stretchable-region encoding. MCP equivalent of `p2a nine-slice <image>`.
- **asset_init_brand** — Scaffold brand.json in the project root + ensure the assets dir exists. MCP equivalent of the `brand.json` portion of `p2a init`. Auto-detects the framework (Next.js, Expo, Flutter, Xcode, Astro, Vite, Remix, Nuxt, React Native, Electron, Node) and returns platform hints. Deliberately does NOT do IDE MCP registration — that's the one piece the user handles once at install time via a terminal. Call this at the start of a new project so subsequent generator calls have a brand source-of-truth and a known output dir.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "prompt-to-asset": {
    "command": "npx",
    "args": ["-y","prompt-to-asset"]
  }
}
```

## Documentation

## What MohamedAbdallah-14/prompt-to-asset MCP server does

MohamedAbdallah-14/prompt-to-asset MCP server turns an asset brief or existing image into outputs used by web and application projects. Generation tools cover logos, app icons, favicons, Open Graph images, illustrations, splash screens, and marketing heroes. It can also process supplied assets by removing backgrounds, vectorizing raster images, upscaling or refining them, and running validation checks.

The project is designed around three execution paths. `inline_svg` lets the host language model author an SVG without credentials. `external_prompt_only` produces a model-specific prompt and paste destinations for services such as Ideogram, Nano Banana, Midjourney, Recraft, or Flux interfaces. `api` lets the server call configured image providers. The available paths depend on the current environment and the asset type.

## How it works

A typical workflow starts with `asset_capabilities` or `asset_doctor`, which reports the modes and provider routes currently available. `asset_enhance_prompt` classifies a brief, selects a suitable model, adapts the wording to that model, and returns an `AssetSpec`. If important details are unclear, it provides questions for the host assistant to ask before generation.

Generated or supplied masters can be passed to `asset_export_bundle` for platform-specific outputs. For inline SVG, the assistant should send the completed markup to `asset_save_inline_svg`, which writes the SVG and related files to disk. Images made in an external UI can return through `asset_ingest_external`, which applies the available matte, vectorization, and tier-0 validation steps.

Brand consistency is handled through `asset_brand_bundle_parse`, which accepts sources such as `brand.json`, DTCG tokens, AdCP specifications, brand markdown, or raw text. A brand bundle can provide palette, style, and related model settings where supported. `asset_train_brand_lora` packages and submits training data to a user-owned training endpoint; it does not provide that deployment itself.

## Setup and configuration

The package requires Node.js 20.11 or newer. The MCP server can be launched with `npx -y prompt-to-asset`. The README also documents npm installation and client-specific installation links for Cursor, VS Code, and Claude Desktop; Windsurf is listed as a supported assistant environment.

No credential is needed for inline SVG, external prompt handoff, offline bundle export, sprite sheets, 9-slice generation, or other local operations. API-backed routes may use Cloudflare Workers AI, NVIDIA NIM, Hugging Face Inference, Stable Horde, Pollinations, free trials, or optional paid providers. Provider availability and credentials can be inspected with `asset_doctor` or `asset_models_list`.

## Tools and capabilities

- Generate logos, icons, favicons, OG images, illustrations, splash screens, and hero artwork.
- Export a 1024² master into iOS, Android, PWA, favicon, visionOS, and Flutter outputs.
- Build TexturePacker-compatible sprite atlases and 9-slice configuration files.
- Parse brand sources and apply palette, style, and text-related constraints.
- Validate dimensions, transparency, safe zones, palette drift, WCAG contrast, and OCR similarity.
- Inspect a registry of more than 60 models, including routing rules and credential status.

## Limitations and notes

Not every asset type supports every execution mode. OG images use a deterministic Satori template and do not support inline SVG; external prompting is relevant only when a background image is requested. Illustrations, splash screens, and hero art support external prompting and API execution but not inline SVG. App icons generated through non-API modes produce the master mark first, after which platform fan-out requires another tool call.

API-backed generation depends on provider configuration, quotas, endpoint availability, and model capabilities. Background removal can use remote endpoints or a local white-chroma fallback, while vectorization falls back through local tools and a built-in posterization method. LoRA training requires a user-owned Modal, RunPod, or self-hosted endpoint. Native dependencies such as `sharp`, `vtracer`, `potrace`, `satori`, `resvg-js`, `tesseract.js`, and `svgo` are optional capabilities that can affect results.

_Full upstream README: https://allmcps.com/mcp/mohamedabdallah-14-prompt-to-asset/readme_

