Building an MTG Companion App with Remote Coding
The Idea
It started the way most side projects do – with a problem in the middle of a game night.
We wanted to play a round of Magic: The Gathering in the Advanced Kingdoms variant – a Commander modification for larger groups where each player gets a secret role. The King is known to everyone, the Bandits know each other, and various subtypes come with special information. The problem: we had forgotten the printed role card at home.
The roles are handed out randomly, some stay hidden, some are partially revealed. Normally we have a printed version of the roles, but this night we forgot them. A small self-hosted web app seemed like the right alternative.
Setting Up the Project
Setup was quick. Creating the GitHub repo, giving Claude access to it, and adding the rules PDF as context – all straightforward. The direct link to a shared Google Drive folder didn't work for context loading, so the simpler fix was just uploading the PDF directly to the repo via the GitHub web interface.
Initial prompt:
Create a simple self-hosted web app for the MTG Commander Kingdom variant (https://www.mtgsalvation.com/forums/the-game/commander-edh/818991-advanced-kingdoms-edh-variant-feedback-welcome). The flow: create a game with a player count and a hidden name. Once the host clicks create, a shareable link is generated and only their role is shown to them. Other players use the link to join and see their own role. Once all players have joined, no additional players can enter.
That got us a working base pretty fast.
Shaping the Code
The initial result was a single app.py with everything crammed in – HTML, CSS, Python logic. Fine for a prototype, but not great for maintainability or for the LLM working on it later. A quick second prompt cleaned that up:
Split
app.pyand use independent files for HTML, CSS, etc. Follow PEP coding guidelines.
The role logic itself needed some work too. Since the LLM was working from the Reddit post rather than the actual rules PDF, it had filled in some gaps with its own interpretation. After loading the PDF directly into the repo, the role descriptions aligned properly.
Morning Improvements
The next morning I picked it up again and added a few things:
- Support for different variants of the variant (the rules doc has multiple versions)
- Preparation for a planned 2.0 rule set
- Pre-commit hooks with
ruff,ty, and a secrets check - Basic unit tests
- A GitHub Actions workflow that builds and publishes a container image
My home NAS runs the app now, exposed via nginx. Nothing exotic, but exactly what I wanted – one URL to share before the game starts.
When the AI Goes the Wrong Way
One thing worth calling out: the container setup hit a snag in the GitHub Actions workflow. I had based the image on ghcr.io/astral-sh/uv:0.11.3-python3.14-trixie-slim, and the action kept failing because it was looking for a README.md that wasn't in the expected folder.
When I asked Claude to fix it, the first suggestion was to switch to an older, non-slim base image – essentially trading the right fix for a working workaround. A quick read of the actual error message and a manual one-line fix solved it properly.
That's a pattern worth keeping in mind: knowing enough to read the error yourself and push back on a lazy fix is still part of the job.
The Result
The app works. Players get a link, join, see their role – and we don't need to print anything anymore.
Screenshots:

Code is here: github.com/tobiwan88/mtg_kimgdom
Some Personal Takeaways
Back in my teens I was building IRC bots to automate things running on my home system. I remember dreaming about just explaining an idea to a machine and having it run – and that feels closer to reality now than ever.
I still think that to get the most out of these tools you need to understand what's happening underneath. Knowing how things should work is what lets you catch the bad suggestions and steer things in the right direction.
The disruption feels real though. A working prototype or MVP is now a weekend project – the barrier to building something has dropped significantly. Keeping it running at scale is a whole different story, but the first step is easier than it's ever been.
How society and governments will respond to a shift this fast is probably the bigger question. Older institutions tend to move slowly, and the decisions made – or not made – in the next few years could push things toward very different outcomes. Whether that ends up closer to a dystopia or a utopia likely depends a lot on who is steering and how fast they catch up. And with the current state of the world, the dystopian path sadly feels more likely than not. It's up to all of us to work toward the other one.