
Bionic Image Tool
A local chat that can draw

A local chat that can draw


A small MCP tool server that lets Bionic, a local AI chat app, draw pictures on my Mac. It sends the request to ComfyUI running Qwen Image, waits, and opens the result in Preview.
I chat with a language model that runs entirely on my Mac. I wanted it to draw too, without sending anything to a cloud service. So I wrote a tool it can call.
You ask for a picture in the chat. The model calls make_image with a description, a shape (square, portrait or landscape) and an optional seed. The tool hands the job to ComfyUI, waits for Qwen Image to finish, opens the picture in Preview and tells the chat where it was saved, how long it took and which seed it used.
It is plain Python 3 from macOS, standard library only, so there is nothing to install. server.py speaks MCP over stdin and stdout. comfy.py builds the ComfyUI job from a saved workflow, sends it, waits for the result and finds the file.
Drawing runs on a worker thread, so the server keeps answering pings and cancel requests while a picture is in progress.
Every failure comes back as a plain sentence the chat can show: ComfyUI is not running, a model file is missing, or the job took too long. Stopping the request in the chat cancels the ComfyUI job too. One picture is drawn at a time. The same seed and text give the same picture.
33 unit tests run against a fake ComfyUI server, so the tool can be tested without a GPU.
Next project

Telling attacks from quotes, without an LLM