Vier MCP-Server in neun Tagen: Homelab-Anbindung fuer Claude
Nachdem Claude bereits Mail und Kalender ueber fremde MCP-Server in Docker-Containern nutzt, hat der Autor eigene Server fuer sein Homelab gebaut. Im Fokus stehen dabei die bei Hetzner laufenden Dienste und deren Kosten.

Veröffentlicht am 23. November, ursprünglich publiziert auf marco-starker.de, KI-unterstützt
Claude liest bereits meine E-Mails und meinen Kalender. Beides läuft über MCP-Server, die andere geschrieben haben, die in Docker-Containern auf einem meiner Server liegen und mit Claude als Custom Connectors verbunden sind. Als das funktionierte, stellten sich die nächsten Fragen fast von selbst: Was genau betreibe ich eigentlich bei Hetzner, und was kostet es? Welches Zertifikat in meinem Reverse Proxy läuft als nächstes ab? Was habe ich heute auf Discord verpasst? Sind die Backups letzte Nacht tatsächlich gelaufen?
Für keines davon fand ich einen passenden Server. Die meisten existierenden MCP-Server nutzen stdio: Sie laufen als lokaler Prozess neben Claude Desktop oder Claude Code. Ein Custom Connector in Claude braucht genau das Gegenteil, nämlich einen entfernten Server mit einer öffentlichen HTTPS-URL. Also habe ich meine eigenen gebaut. Innerhalb von neun Tagen, zwischen dem 15. und dem 23. November, entstanden daraus vier Server, alle Open Source, alle mit Claude als meinem Pair Programmer gebaut:
In diesem Artikel geht es darum, was die vier gemeinsam haben, was bei jedem Einzelnen besonders war und wie sie ohne einen einzigen Klick von meiner Seite in die offizielle MCP Registry gelangt sind.
Der wichtigste Satz des gesamten Projekts ist einer, den ich später auf jede Connect-to-Claude-Seite der Dokumentation geschrieben habe: Custom Connectors verbinden sich von den Servern von Anthropic aus, nicht von deinem Rechner. Eine URL, die nur im Heimnetz funktioniert, ist nutzlos. Der Server muss über HTTPS aus dem Internet erreichbar sein, was Sicherheit sofort zur ersten Designfrage macht und nicht zur letzten.
Die zweite Einschränkung: Claude-Connectors können keine eigenen Header senden. Ein Bearer-Token, der naheliegende Weg, eine HTTP-API zu schützen, funktioniert nur mit Claude Code und anderen Clients. Für die Connectors in den Claude-Apps muss der Schutz vor dem Server erfolgen, am Reverse Proxy.
Als Transport habe ich MCPs Streamable HTTP im Stateless-Modus gewählt. Jeder POST an /mcp erhält eine eigene, frische MCP-Server-Instanz, die antwortet und danach verschwindet. Es gibt keine Sessions, keine vom Server initiierten Streams, nichts wird zwischen Requests im Speicher gehalten; ein GET erhält schlicht ein 405. Das klingt nach einer Einschränkung, machte aber alles einfacher: Die Container können mit einem read-only-Dateisystem laufen, ein Neustart verliert nichts, und es gibt keinen Session-Zustand, der von einem Aufrufer zu einem anderen durchsickern könnte.
Nach den ersten beiden Servern hatte sich ein fester Regelkatz herausgebildet, den die anderen beiden einfach geerbt haben:
Der Code selbst folgt denselben Richtlinien, die ich für alle meine privaten Projekte nutze, und das machte einen echten Unterschied bei der Arbeit mit einer KI: Die Regeln sind einmal aufgeschrieben, und Claude befolgt sie in jedem neuen Repository, statt dass ich dieselben Dinge viermal korrigieren muss.
Mein ursprünglicher Wunsch war einfach: Claude sollte mir sagen, was ich bei Hetzner habe und was es kostet, Rechnungen inklusive. Eine gute Sammlung an Tools existierte bereits in @lazyants/hetzner-mcp-server, aber nur via stdio. Deshalb ist hetzner-mcp bewusst schlank: rund 300 Zeilen, die die vorhandenen Tools hinter den HTTP-Transport legen und einen Read-only-Modus, Filter und den Token ergänzen.
Zwei Dinge habe ich dabei gelernt. Erstens hat die Hetzner-Cloud-API keine Rechnungen. Kosten lassen sich nur aus dem Bestand und der Preisliste ableiten. In der Praxis funktioniert das gut, denn Claude kombiniert die Server mit hetzner_get_pricing und berechnet die Monatssumme. Es ist aber ein gutes Beispiel dafür, die API zu prüfen, bevor man ein Feature verspricht.
Zweitens sind 185 Tools eine Menge. Jede Tool-Beschreibung landet im Kontext von Claude. Deshalb kann hetzner-mcp nur bestimmte Tool-Gruppen laden (MCP_SPLITS=servers,dns), und deshalb ist der Read-only-Modus, der den Umfang auf 59 Tools reduziert, nicht nur ein Sicherheitsfeature.
Nginx Proxy Manager ist der Reverse Proxy vor allem, was ich hoste, inzwischen auch vor diesen MCP-Servern. Der Tool-Umfang orientiert sich an VeryBigSad/nginx-proxy-manager-mcp, einem Python-Server für stdio; der Code ist eine unabhängige TypeScript-Implementierung mit 50 Tools in neun Bereichen.
NPM kennt nur Nutzer-Token, keine API-Keys. Der Server loggt sich also mit E-Mail und Passwort ein, cached das Token bis kurz vor dessen Ablauf und loggt sich bei einem 401 erneut ein. Dafür erhält er einen eigenen NPM-Nutzer, nur mit Leserechten und ohne Zwei-Faktor-Authentifizierung, sodass die Zugangsdaten im Container nicht mehr tun können, als sie sollen.
Das Detail, das mir am besten gefällt: Die Update-Tools ändern nur die Felder, die Claude übergibt. Ohne das müsste Claude einen kompletten Proxy-Host auslesen, einen Wert ändern und alles zurückschicken. Ein falsches Feld, und die Konfiguration ist kaputt. Mit Teil-Updates ist „force HTTPS on app.example.com“ exakt ein Feld.
Und ja, es gibt einen leicht rekursiven Moment: Claude kann über diesen Server den Proxy-Host auslesen, der genau diesen Server schützt.
Discord war das Sorgenkind. Der naheliegende Weg wäre ein Bot gewesen, aber ein Bot sieht nur die Server, zu denen er eingeladen wurde, und keine meiner Direktnachrichten. Ich wollte, dass Claude sieht, was ich sehe. Deshalb arbeitet discord-mcp mit einem regulären Nutzerkonto:
Auch kleine Dinge zählen hier: Discord lehnt Nachrichten über 2.000 Zeichen ab, deshalb teilt send_message lange Texte an Absatz-, Zeilen- oder Wortgrenzen und sendet sie mit einer kurzen Pause dazwischen, so wie es ein Mensch täte.
Um das klar zu sagen: Die Automatisierung eines Nutzerkontos ist ein „Self-Bot“ und verstößt gegen die Nutzungsbedingungen von Discord. Deshalb steht das in der README und der Dokumentation in einem Warnkasten, deshalb ist der Server standardmäßig read-only, und deshalb ist das Projekt auf meiner Website als Experiment markiert. Ich nutze ihn mit diesem Risiko im Hinterkopf; das solltest du selbst entscheiden.
Der neueste Server war auch der gründlichste. Backrest ist eine Web-UI und ein Scheduler für restic-Backups, und ich wollte alles davon in Claude haben: Dashboard, Operationen, Logs, Snapshots, Backups, Restores, Prune und Check, Konfiguration. Das Ergebnis sind 26 Tools, eines für jede Prozedur der Backrest-API, die ein Client nutzen kann, plus die Prometheus-Metriken. Vom ersten Commit bis zum Eintrag in der MCP Registry verging ein einziger Tag.
Backrest bietet seine API als gRPC-Dienst an, der mit dem Connect-Protokoll auch über HTTP mit einfachem JSON aufgerufen werden kann. Das machte einen eigenen Client einfach. Server-Streams wie Live-Operationsereignisse oder Logs werden für eine begrenzte Zeit gelesen, und Claude bekommt, was in diesem Zeitfenster angekommen ist.
Interessant war die Konfiguration. Backrest speichert Repository-Passwörter im Klartext in seiner Konfiguration, dazu Access Keys in der restic-Umgebung und Tokens in Notification-Hooks. Wenn Claude die Konfiguration lesen kann, kann es jedes Repository-Passwort lesen. Deshalb maskiert backrest-mcp alle diese Werte als ********, bevor irgendetwas bei Claude ankommt.
Das erzeugt ein Folgeproblem: Was passiert, wenn Claude einen Plan ändert und die Konfiguration zurückschreibt? Es würde ******** als neues Passwort speichern. Deshalb macht der Server den Weg umgekehrt: Jedes ******** wird beim Eintragen durch den gespeicherten Wert ersetzt, Repositories und Pläne über die ID zugeordnet, Umgebungsvariablen über den Namen, Hooks über die Position. Gibt es keinen gespeicherten Wert zum Wiederherstellen, schlägt der Aufruf fehl, statt stillschweigend ein Repository-Passwort zu zerstören. Diese Logik hat mehr Nachdenken erfordert als die 26 Tools zusammen.
Alle vier laufen als Docker-Container auf einem meiner Server bei Hetzner. Jeder erhält eine eigene Subdomain unter einem Wildcard-Zertifikat und liegt hinter Nginx Proxy Manager. Am Proxy erledigt eine Access List die eigentliche Arbeit: Nur die veröffentlichten Outbound-IP-Bereiche von Anthropic und mein eigenes Netz kommen durch, und sie brauchen zusätzlich Basic Auth.
In Claude ist jeder Server schlicht ein Custom Connector mit seiner URL. Danach ist das Gespräch der Test: „Wie liefen meine Backups in den letzten 30 Tagen?“, „Welche Zertifikate laufen diesen Monat ab?“, „Was kostet mein Hetzner-Setup pro Monat?“ Wählt Claude die richtigen Tools und stimmen die Antworten, funktioniert der Server.
Der Teil, der vier Repositories in etwas verwandelt hat, über das ich nicht mehr nachdenken muss, ist ein gemeinsamer Satz wiederverwendbarer GitHub-Workflows. Jedes MCP-Repository hat eine CI-Datei von etwa dreißig Zeilen, die sie aufruft:
Daneben überwacht ein zweiter Workflow den docs-Ordner jedes Repositories: Er prüft das Markdown und veröffentlicht es als Dokumentation auf meiner Website in Englisch und Deutsch.
Der Registry-Schritt verdient einen genaueren Blick. Er prüft, dass die Version in server.json zum Release-Tag passt und dass das Image genau mit diesem Tag referenziert wird. Er lädt die mcp-publisher-CLI herunter und verifiziert deren Signatur mit cosign, bevor er sie ausführt. Danach loggt er sich über GitHub OIDC ein, ohne gespeichertes Secret; die GitHub-Identität beweist, dass ich den Namespace io.github.DasRed besitze. Und die Registry wiederum prüft, dass das Docker-Image zum Server gehört: Jedes Image trägt das Label io.modelcontextprotocol.server.name.
Glama nimmt die Server von selbst über GitHub auf. So landet ein gemergter Commit als laufender Container, aktualisierte Dokumentation, neues Image und Registry-Eintrag, ohne einen einzigen manuellen Schritt.
Die naheliegende Ironie: Claude hat geholfen, die Server zu bauen, durch die es jetzt in meine Infrastruktur blickt. Genau das macht die Schleife so kurz: Claude ist der Client, für den die Server gemacht sind, deshalb zeigt sich eine unklare Tool-Beschreibung oder ein ungeschicktes Antwortformat schon im allerersten Gespräch und nicht Wochen später.
Wo die KI stark war: die Umsetzung zweier Python-Toolsets in idiomatisches TypeScript, die Durcharbeitung der Backrest-Service-Definition und die Erstellung typisierter Tools für jede Prozedur, die Konsistenzhaltung über vier Repositories hinweg sowie das Schreiben von Dokumentation in zwei Sprachen. Vier Server mit Dokumentation, CI und Registry-Einträgen in neun Tagen hätten in meiner Freizeit sonst nicht stattgefunden.
Wo ich selbst entscheiden musste: Read-only als Standard, ein Benutzerkonto statt eines Bots für Discord, welche Tools als destruktiv gelten, und vor allem das Maskieren von Geheimnissen in backrest-mcp. Das alles sind keine Programmierfragen. Es ist die Frage, was eine Maschine, die in meinem Namen handelt, sehen und tun darf – und genau diesen Teil möchte ich nicht delegieren.
Dokumentation, Konfiguration und Einrichtungsanleitungen für alle vier Server finden sich auf meiner Website: hetzner-mcp, nginx-proxy-manager-mcp, discord-mcp und backrest-mcp. Der Code liegt auf GitHub unter der MIT-Lizenz.
Dank an lazyants für die Hetzner-Tools, VeryBigSad und elyxlz für die Toolsets, die die Nginx Proxy Manager- und Discord-Server inspiriert haben, Gareth George für Backrest sowie das Model Context Protocol-Team für SDK und Registry.
Ursprünglich veröffentlicht auf marco-starker.de.
Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.
Original (Englisch) anzeigen
Posted on Nov 23 • Originally published at marco-starker.de • AI-assisted
Claude already reads my mail and my calendar. Both run through MCP servers other people wrote, sitting in Docker containers on one of my servers and connected to Claude as custom connectors. Once that worked, the next questions came naturally: What exactly do I run at Hetzner, and what does it cost? Which certificate in my reverse proxy expires next? What did I miss on Discord today? Did last night's backups actually run?
For none of these did I find a server that fit. Most existing MCP servers speak stdio: they run as a local process next to Claude Desktop or Claude Code. A custom connector in Claude needs the opposite – a remote server with a public HTTPS URL. So I built my own. Within nine days, between 15 and 23 November, four servers came out of it, all open source, all built with Claude as my pair programmer:
This article is about what the four have in common, what was special about each of them, and how they ended up in the official MCP Registry without me clicking anything.
The most important sentence in the whole project is one I later wrote into every Connect to Claude page of the documentation: custom connectors connect from Anthropic's servers, not from your machine. A URL that only works in your home network is useless. The server has to be reachable from the internet via HTTPS – which immediately makes security the first design question, not the last.
The second constraint: Claude's connectors cannot send custom headers. A bearer token, the obvious way to protect an HTTP API, only works for Claude Code and other clients. For the connectors in the Claude apps, protection has to happen in front of the server, at the reverse proxy.
For the transport I chose MCP's Streamable HTTP in stateless mode. Every POST to /mcp gets its own, fresh MCP server instance, answers and is gone. There are no sessions, no server-initiated streams, nothing kept in memory between requests; a GET simply gets a 405. That sounds like a limitation, but it made everything simpler: the containers can run with a read-only file system, a restart loses nothing, and there is no session state that could leak from one caller to another.
After the first two servers, a fixed set of rules had emerged that the other two simply inherited:
The code itself follows the same guidelines I use for all my private projects, which made a real difference when working with an AI: the rules are written down once, and Claude follows them in every new repository instead of me correcting the same things four times.
My original wish was simple: Claude should tell me what I have at Hetzner and what it costs, including the invoices. A good set of tools already existed in @lazyants/hetzner-mcp-server – but only via stdio. So hetzner-mcp is deliberately thin: about 300 lines that put the existing tools behind the HTTP transport and add read-only mode, filters and the token.
Two things I learned along the way. First, the Hetzner Cloud API has no invoices. Costs can only be derived from the inventory and the price list. That's fine in practice – Claude combines the servers with hetzner_get_pricing and calculates the monthly total – but it's a nice example of checking the API before promising a feature.
Second, 185 tools are a lot. Every tool description ends up in Claude's context. That's why hetzner-mcp can load only certain tool groups ( MCP_SPLITS=servers,dns ), and why read-only mode, which reduces the set to 59 tools, is not just a safety feature.
Nginx Proxy Manager is the reverse proxy in front of everything I host – including, by now, these MCP servers. The tool set follows VeryBigSad/nginx-proxy-manager-mcp, a Python server for stdio; the code is an independent TypeScript implementation with 50 tools in nine areas.
NPM only knows user tokens, no API keys. So the server logs in with email and password, caches the token until shortly before it expires and logs in again on a 401. For that it gets its own NPM user – view-only, without two-factor authentication – so the credentials in the container can't do more than they should.
The detail I like most: the update tools only change the fields Claude passes. Without that, Claude would have to read a complete proxy host, change one value and send everything back – one wrong field and the configuration is broken. With partial updates, “force HTTPS on app.example.com ” is exactly one field.
And yes, there is a slightly recursive moment: Claude can use this server to read the proxy host that protects this very server.
Discord was the odd one out. The obvious way would be a bot – but a bot only sees the servers it was invited to and none of my direct messages. I wanted Claude to see what I see. So discord-mcp works with a regular user account:
Small things matter here, too: Discord rejects messages longer than 2,000 characters, so send_message splits long texts at paragraph, line or word boundaries and sends them with a short pause in between, the way a person would.
To be clear: automating a user account is a “self-bot” and against Discord's Terms of Service. That's why the README and the documentation say so in a warning box, why the server is read-only by default, and why the project is marked as an experiment on my website. I use it with that risk in mind; you should decide that for yourself.
The latest server was also the most thorough. Backrest is a web UI and scheduler for restic backups, and I wanted all of it in Claude: dashboard, operations, logs, snapshots, backups, restores, prune and check, configuration. The result is 26 tools – one for every procedure of the Backrest API a client can use, plus the Prometheus metrics. From the first commit to the entry in the MCP Registry, it took a single day.
Backrest offers its API as a gRPC service that can also be called with plain JSON over HTTP using the Connect protocol. That made a dedicated client easy. Server streams like live operation events or logs are read for a limited time, and Claude gets what arrived in that window.
The interesting part was the configuration. Backrest stores repository passwords in plain text in its config, along with access keys in the restic environment and tokens in notification hooks. If Claude can read the config, it can read every repository password. So backrest-mcp masks all of them as ******** before anything reaches Claude.
That creates a follow-up problem: what happens when Claude changes a plan and writes the config back? It would save ******** as the new password. So the server does the reverse on the way in: every ******** is replaced with the stored value – repositories and plans matched by ID, environment variables by name, hooks by position. If there is no stored value to restore, the call fails instead of silently destroying a repository password. That logic took more thought than the 26 tools combined.
All four run as Docker containers on one of my servers at Hetzner. Each gets its own subdomain under a wildcard certificate and sits behind Nginx Proxy Manager. At the proxy, an access list does the real work: only Anthropic's published outbound IP ranges and my own network get through, and they additionally need basic auth.
In Claude, each server is simply a custom connector with its URL. After that, the conversation is the test: “How did my backups do in the last 30 days?”, “Which certificates expire this month?”, “What does my Hetzner setup cost per month?” If Claude picks the right tools and the answers are right, the server works.
The part that turned four repositories into something I don't have to think about is a shared set of reusable GitHub workflows. Every MCP repository has a CI file of about thirty lines that calls them:
Next to it, a second workflow watches the docs folder of each repository: it checks the Markdown and publishes it on my website as documentation in English and German.
The registry step is worth a closer look. It checks that the version in server.json matches the release tag and that the image is referenced with exactly that tag. It downloads the mcp-publisher CLI and verifies its signature with cosign before running it. It then logs in via GitHub OIDC – no stored secret, the GitHub identity proves that I own the io.github.DasRed namespace. And the registry in turn verifies that the Docker image belongs to the server: each image carries the label io.modelcontextprotocol.server.name.
Glama picks the servers up from GitHub on its own. So a merged commit ends up as a running container, updated documentation, a new image and a registry entry, without a single manual step.
The obvious irony: Claude helped build the servers through which it now looks into my infrastructure. That's also what makes the loop so short – Claude is the client the servers are made for, so an unclear tool description or a clumsy answer format shows up in the very first conversation, not weeks later.
Where the AI was strong: turning two Python tool sets into idiomatic TypeScript, working through the Backrest service definition and producing typed tools for every procedure, keeping four repositories consistent, and writing documentation in two languages. Four servers with documentation, CI and registry entries in nine days would not have happened in my spare time otherwise.
Where I had to decide: read-only as the default, a user account instead of a bot for Discord, which tools count as destructive, and above all the secret masking in backrest-mcp. None of that is a coding question. It's the question of what a machine that acts on my behalf should be allowed to see and do – and that's exactly the part I don't want to delegate.
Documentation, configuration and setup guides for all four servers are on my website: hetzner-mcp, nginx-proxy-manager-mcp, discord-mcp and backrest-mcp. The code is on GitHub, under the MIT license.
Credits: lazyants for the Hetzner tools, VeryBigSad and elyxlz for the tool sets that inspired the Nginx Proxy Manager and Discord servers, Gareth George for Backrest, and the Model Context Protocol team for the SDK and the registry.
Originally published on marco-starker.de.