MCP Server Project

Webcomic Background Generator

A local MCP server that generates Warhammer 40,000–aesthetic backgrounds for my Imperial Knight webcomic — built with Claude.

MCP Server Python Stable Diffusion ComfyUI Built with Claude
Background Story

My very own Hackathon

Gothic cathedral interior with stained glass — generated by this MCP server

I was reading this article by Anthropic the other day and I found myself inspired, particularly by the winners of the Hackathon. They used Opus 4.8 to build a 3D reconstruction platform for architecture! A platform that not only researches, but assembles a 3D model of Tang Dynasty architecture, for example. Amazing.

So I thought, hey, why not build something similar with Opus 4.8? Working at Aleph (or AKQA Singapore, I'm still not sure what the higher-ups will decide), I was asked to construct MCP server prototypes, do proof of concepts for websites and even a chatbot, and I wondered if I could use this experience to build something for my own personal use.

What would be of use to me? Given that I'm trying to draw webcomics, I suddenly had an idea — why not build an MCP server that generates Warhammer 40,000 aesthetic backgrounds for my Imperial Knight webcomic/manhwa? As a one-person studio trying to draw a full webcomic, there are limits to what I can achieve by myself, and maybe such an MCP server or program will help me tremendously.

So this is what I ended up with.

How It Works

In the grim darkness of the 41st Millennium, there are only backgrounds

The server exposes a single tool, generate_background, to my AI assistant. I describe a scene in plain language, and — optionally — hand it two things:

  • A drawn character (ideally a PNG with a transparent background). The harness reads the character as a spatial guide — their scale, stance, and position on the canvas determine the horizon line and camera angle automatically. (This uses ControlNet.)
  • A style reference. A cool-toned grimdark image whose palette and mood get transferred onto the result — so every background feels like it belongs in the same world. (This uses IP-Adapter.)

The harness will generate a finished background around the provided characters, planned to match their scale, perspective and camera angle. I then import it as a layer into my working file and polish the details, e.g. shadows, environmental interactions (such as snow on the characters if they're on an ice planet).

Ideally, this workflow maintains what I envision to be human-AI teamwork. The human creatives remain in charge of characters, story and composition, while delegating the repetitive and tedious background work to the AI.

Under the hood: a Python MCP server wrapping a local ComfyUI + Stable Diffusion pipeline (SD 1.5 + ControlNet + IP-Adapter), running on my own GPU. No cloud, no per-image cost.

Dark gothic cathedral exterior at night — generated by this MCP server
Output

It actually works!

I tested it, and this MCP server is capable of generating backgrounds. It took me a while to refine and get to a point where I'm finally satisfied with the outputs, which included searching for the appropriate LoRAs. I definitely recommend Solstice and Counterfeit and DreamShaper for any aspiring webcomic artist. They aren't flawless, obviously, which is evidence that human artists are still necessary to manage, polish, and perfect the backgrounds. But for now, this demonstrates that the MCP server I built with Claude Code actually works.

Take note, though, this is not meant to replace human artists. In a studio, you'll usually have members of a team in charge of backgrounds. Ideally, they draw the backgrounds that are used as assets and references for this MCP server to reproduce when deadlines are tight, to save time and be more efficient. And ideally, you'll want those same assistants to adjust the coloring (saturation, hue, etc.) and make changes where appropriate (angles, perspectives, details), rather than just stuffing them wholesale into a panel.

For one-man teams like me, perhaps we can't afford to do that, but obviously, I would prefer to work alongside human colleagues (who make good use of this MCP server I built) rather than rely solely on my background generator.

Dark gothic cathedral exterior at night
Gothic cathedral
Blue moonlit clocktower at night
Moonlit clocktower
Sunlit forest path, manhwa style
Forest path
Icy mountain vista
Ice world
Jungle world — anime-style sunlit forest
Jungle world
Solstice forest path with dappled light
Solstice forest

🎬

Walkthrough coming soon

A step-by-step of the full workflow — sketch → generate → draw the character on top — is on the way.

For everyone's use

MCP server instructions

Now, this isn't limited for my use alone. If you want to make use of it, you can too! But how, you ask? Well, first of all, you can ask your AI harness, be it Claude Code, Codex or Google Antigravity to clone the Warhammer40000-background-mcp repository, then follow the steps in the README to install. It'll set it up all for you!

You can tell your harness to adjust. This is for all webcomic artists, not just Warhammer 40,000 fans. So if you would like, say, medieval fantasy, curate a set of anime aesthetic medieval fantasy art from your favorite references, and store them accordingly. Draw your character and feed him/her to your harness so that they can plan around the perspectives, angles and scale that are appropriate for your characters. Then get your harness to generate whatever backgrounds you need!

I hope this will help webcomic artists tremendously, especially those who are understaffed and rushing deadlines. Now set forth, focus on storytelling and bringing your characters to life, and leave the background work to… well, the background generator!

View the code on GitHub →