MCP: The Blog Writes Itself
I gave my AI assistant the keys to deploy my websites. This post was published by it. I'm not sure if that's cool or terrifying.
The problem
I host a handful of static sites on S3 + CloudFront. Updating them has always been the same tedious loop: SSH into the NAS, edit files, run a sync script, wait for CloudFront invalidation, check it worked. It's not hard, but it's enough friction that I rarely bother writing anything. The last post on here before this month was from 2019. Seven years of "I should blog about that" followed by not blogging about that.
Meanwhile, I've been building out my homelab with an AI assistant running through LibreChat. It can already manage my home automation, read and write files on the NAS, and operate git repos. The missing piece was obvious: let it publish websites too.
What is MCP?
MCP — Model Context Protocol — is Anthropic's standard for giving AI models access to external tools. Think of it like a USB port for LLMs: you plug in a server that exposes capabilities, and the model can call them as needed. My setup already uses MCP servers for Home Assistant, the filesystem, git, time, and notifications. Adding another one for static hosting was the natural next step.
The tool
I wrote a small custom MCP server that exposes three operations:
- list_sites — shows all configured sites, their domains, and local paths
- pull_site — syncs a site's live S3 content down to the NAS (always do this before editing)
- push_site — uploads local changes to S3 and fires a CloudFront invalidation
The server knows about all my sites — this one (charltones.com), the business sites, Shona's film sites — grouped by owner with their S3 buckets and CloudFront distributions. It's configured declaratively and the assistant has filesystem access to the local copies, so the workflow becomes:
- I say "add a blog post about X"
- The assistant pulls the latest site content
- It reads existing posts to understand the structure and style
- It writes the new HTML file and updates the index
- It pushes to S3 and invalidates the cache
- The post is live
That's it. No SSH, no scripts, no context switching. I describe what I want and it happens.
Is this a good idea?
Honestly? Probably. The sites are static HTML — the worst case is a bad deploy that I roll back. There's no database to corrupt, no server to crash. S3 versioning means nothing is ever truly lost. And the assistant already has filesystem access to these files anyway; the MCP server just adds the ability to push the button.
The real win is removing friction from writing. If I can just talk about what I want to post and have it appear on the internet, I might actually post more than once every seven years. We'll see.
How it works under the hood
The MCP server is a thin wrapper around the AWS SDK. Each site has a config entry mapping it to an S3 bucket and CloudFront distribution ID. The pull operation does a sync from S3 to the local NAS path (downloading new/changed objects, optionally deleting orphans). The push does the reverse — syncs local to S3, then creates a /* invalidation on the associated CloudFront distribution so changes go live immediately.
It runs as a container alongside everything else on the homelab, accessible to the AI assistant through the same MCP transport layer as the other tools.
Meta
This post is the proof of concept. I asked my assistant to write a blog post about itself being able to write blog posts. It pulled the site, read my previous posts to match the style and structure, wrote the HTML, updated the index page, and pushed it live.
If you're reading this, it worked.