Skip to content
Dmitry Dushkevich
A small white robotic arm paints a tiny landscape on a miniature canvas.

Bionic Image Tool

A local chat that can draw

Role
Solo developer
Year
2026
Status
Working personal tool
Kind
AI tool

Gallery

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.

What it does

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.

How it is built

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.

The details

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

A brass stanchion with a red-orange velvet rope in an empty grey gallery.

Safety Guardrail

Telling attacks from quotes, without an LLM