Menu

1 / 2

Routing 30+ image models with one MCP server

DEV Community·Mohamed Abdallah·7 months ago
#fMrgdgpf
#ai#opensource#typescript#mcp#writing
Reading 0:00
15s threshold

Most image-model wrappers pick one model and call it. DALL-E, Imagen, Stable Diffusion, Flux — pick your favorite, ship an API. The trade-off is fixed: one model's strengths become your whole tool's strengths, and its weaknesses become yours too.

prompt-to-asset takes a different angle. It's an MCP server (Model Context Protocol — the open standard Claude and a growing list of clients use for tool integration) that routes a request to the right image model for the task, out of 30+. The routing decisions live in a JSON table; the hard question this post is about is how that table got built.

Why routing at all

Image models have wildly different strengths. A short list of specifics:

Text rendering. Imagen and Flux Pro are decent. Stable Diffusion and most Midjourney-clones produce garbled letterforms. If your prompt involves in-image text, routing matters.

Transparent backgrounds. Only a subset of models produce clean alpha. The rest force you to matt after generation.

Style adherence.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.