#code
This Post Was Published by an MCP Server
I write these posts in Markdown, commit them, and push. Vercel rebuilds, they go live. That flow is fine — right up until you're working inside Claude and the little frictions start to stack up. You finish something worth writing about, and publishing means dropping back to a terminal to stage, commit, push. By the time that's done, the moment has cooled off and so has the urge.
So I automated it. This post is the receipt: I didn't touch git to publish it. Claude did, through a server I built this week.
The three pieces
A publish endpoint. /api/publish takes a title, a body, a tag, and any screenshots. It writes the frontmatter, then commits an .mdx file (plus images) to GitHub in a single commit via the Git Trees API. The push starts a Vercel build, and a minute later the post is live. No local checkout, no branch, no pull request.
An MCP server. A thin thing with one real tool: publish_post. It reads screenshots off my disk, encodes them, and calls the endpoint. The only secret it carries is a publish token — the GitHub credential stays on the server, not in the client. Claude calls it like any other tool.
A skill. A short instruction file telling Claude how to write one of these: catch what just happened, keep it honest, follow my no-fluff rules, then publish. I trigger it by saying "fresh post."
Why bother
It's not about saving keystrokes. It's about closing the gap between having something to say and actually saying it.
The good posts are the ones written while the thing is still warm — you shipped a feature, you found a bug, you finally understood something you'd been circling for weeks. Wait until evening and the one detail that made it worth writing has quietly evaporated. Now I can publish from the same session where the work happened, while it's still fresh.
Images
Screenshots ride along in the same commit, into the repo next to the post. No object storage, no second service, no extra token to babysit. Every other post here already references images this way, so there's nothing new to maintain. And if there's no screenshot, the post still looks intentional — the card and header fall back to a tag-colored block instead of a sad broken-image icon.
The catch
This is my own infrastructure with a token sitting in an env var. Worth it because I publish from Claude often enough that the friction was real. If you post once a month, git push is genuinely fine — please don't build this.
There's a quieter cost too: when publishing is one sentence away, the bar can sag. That's exactly why the skill carries my anti-AI-writing rules. Fast to publish shouldn't mean lazy to write.
Closing
This article took that exact path — written in a Claude session, handed to the MCP server, committed by the endpoint, deployed by the push it made. The fact that you're reading it means the whole chain held, which is a small relief: I wrote this closing line before I'd tested any of it.