
04 · n8n · MCPs · Self-hosted
Build automation with AI.
From workflow concept to a running cron job. We plan automations with Cowork, generate the n8n JSON with Claude Code via the n8n MCP, and host the whole thing for under ten euros a month on Hetzner.
We have no partnerships with n8n or Hetzner. We recommend what we use ourselves.
Setup
Before you automate — the steps.
Claude Code is the anchor. Around it you build your tool set: an automation tool, the matching MCP, and a hosting setup that doesn't blow up on your first production workflow.
- Step 01
Install the Claude desktop app (for Cowork)
Cowork lives in the Claude desktop app. You use it to plan your automation in dialogue — or you build small automations directly via scheduled tasks that run at fixed times. We show how just below.
- Step 02
Install Claude Code
Claude Code is the anchor of the whole setup — you build and import your workflows with it. If you've done the „Build products with AI“ cluster, this is nothing new. Install via the terminal, in VS Code, or alongside in the desktop app.
bash·Install via terminalnpm install -g @anthropic-ai/claude-code - Step 03
Pick an automation tool — n8n, Make or Zapier
Three sensible options. n8n (open source, official MCP server, self-hostable) — our pick if you want to generate workflows with Claude Code. Make.com (SaaS, visual editor, huge integration library) — good if you think visually and don't want self-hosting. Zapier (8,000+ integrations, friendliest onboarding) — good if you just want to connect a few apps without digging in deeper. For DACH/EU all three offer EU regions. For AI-driven workflow generation, n8n stays ahead.
- Step 04
Connect an MCP for your tool
With an MCP server, Claude Code reads and writes directly in your workflow instance — generates workflow JSON, imports it, tests trigger payloads. As of May 2026: n8n has the official n8n MCP. Make and Zapier don't have an official MCP — those you build manually in the editor and only use Claude Code for the logic planning. Snippet below is for n8n.
bash·n8n MCP connected to Claude Code (if you picked n8n)claude mcp add n8n --transport http \ "https://YOUR-N8N-DOMAIN/mcp" \ --header "Authorization: Bearer YOUR_N8N_API_KEY" - Step 05
Pick hosting
Pick a cloud where you host yourself. Self-hosted is cheaper than managed cloud and gives you full control over data and workflows. With Make or Zapier you don't get the choice — those run cloud-managed only.
Our pick: Hetzner Cloud, from €5/month
CX22 (2 vCPU, 4 GB RAM), EU region Falkenstein or Nuremberg. n8n + Postgres + Caddy as a Docker Compose stack, Claude Code rolls it out initially. Same thing works on DigitalOcean, AWS Lightsail or Scaleway — Hetzner wins on price-performance.
The simple way
Automate with Cowork and scheduled tasks.
You don't need an n8n server for every automation. For recurring research and briefing jobs, Claude Cowork with a scheduled task is enough. You describe the job once, and Cowork handles it from then on.
A scheduled task is a job that Cowork runs on its own at a fixed time. Daily, weekly or at a set moment. Cowork starts, works through the job and leaves the result ready for you.
You set the task up once in dialogue, the same way you usually work with Cowork. From then on it runs without you. That's what makes it a small, honest automation for everyday use.
I wanted to stay up to date with AI. So I built the staying-informed part myself.
AI moves every day, and "I'll read it later" never gets read. Instead of subscribing to another newsletter, a scheduled Cowork task runs every morning at 8:00. It scans the AI day and leaves me four finished things before my first coffee.

I built this for myself first. An AI briefing that keeps me up to date, helps me adjust my setup and make the right calls for my company.
Sample edition from 2 June 2026
Then I realized it's useful for other people too. So a public briefing and an Instagram story got added.
What else gets created every morning


Instagram story
The top stories as a finished story image in the brand look, 1080 by 1920, ready to post. Sources printed small.
Website update
A diff against the current state of the site: which number, model or price is outdated. So it stays current without me checking by hand every day.
## Update
Cluster 06 - APIs & models - Anthropic
Old: Opus 4.7 as top model.
New: Opus 4.8 (released 28 May 2026), strongest model for
complex reasoning and agentic coding.
Source: anthropic.com/newsHow the task runs
The interesting part is that one task handles research, design, rendering and filing in one go. While I sleep.
- 1
Scan sources from the last 24 hours, filter by relevance, merge duplicates.
- 2
Write four outputs in my voice.
- 3
Render the PDFs and the story image itself, from HTML to PDF and PNG, with the real logo.
- 4
File everything into a dated folder and a daily archive.
- 5
The story image syncs to my phone via Google Drive, ready to post.
Sources for the sample edition
I build the whole workflow step by step in the newsletter and the build-alongs. If you want something like this yourself: this way.
Here's how you build it yourself.
You don't need your own server. You describe the scheduled task once in a chat, and from then on it runs without you. This is the prompt my morning briefing starts from.
Set up a scheduled task that runs every morning at 8:00am.
Task:
1) Find the most important AI news from the previous day (new models, larger releases, relevant announcements).
2) Check the sources briefly for credibility and drop rumours without evidence.
3) Summarise everything in a short briefing: one sentence per item, plus the link.
4) Sort by importance and keep it under one screen.
Save the briefing as a markdown file and name it with the date.Where the limit is:
Cowork with scheduled tasks is strong for research, briefings and simple recurring jobs. As soon as an automation has to connect many tools, run reliably around the clock or process large amounts of data, the n8n route further down is the more robust choice.
The agent way
Build automation right inside Claude Code.
Plugins, skills, subagents and hooks make Claude Code more than a coding helper. A lot of automations you would otherwise set up in a separate tool, you build straight inside the agent. No server, no click editor, one conversation.
What you build with.
Skills
A SKILL.md describes a recurring task. Claude loads it on its own when it fits, or you call it with a slash command.
Plugins
A plugin bundles skills, subagents, hooks and MCP servers into one package. Installed once, available in every project.
Subagents
A separate agent with its own job and its own context. Good for offloading research or checks without filling up your main chat.
Hooks
A hook runs a script on a fixed event, such as after every file edit. That is how you enforce linting, checks or notifications automatically.
Claude Code or n8n?
Both build automations, but they are made for different jobs. The honest rule of thumb:
Claude Code is enough when
- the task understands context, writes content or changes code
- you start it on demand or as a scheduled task in the cloud
- you want to iterate fast and prefer working in a conversation
n8n is better when
- a workflow waits around the clock for webhooks or events
- you need ready-made connections to many SaaS services
- the steps should run deterministically, without a model deciding
Often you need both. Claude Code plans and writes, n8n keeps the long-running jobs alive.
Turn a workflow into a skill.
An example: a recurring competitor check you would otherwise click together in n8n. In Claude Code it is three steps.
- Step 01
Describe the task as a skill
Create a file at .claude/skills/<name>/SKILL.md in your project. The top says when Claude uses the skill, below it the steps.
prompt·Prompt to Claude CodeCreate a skill at .claude/skills/competitor-check/SKILL.md. It should: 1) fetch a competitor's website, 2) pull out prices and new features, 3) save the result as a short note in docs/research/. Write the description so you pick the skill yourself whenever I ask about a competitor. - Step 02
Trigger it on an event
If a step should run automatically, attach it to a hook in settings.json. Here a lint run after every file edit.
json·.claude/settings.json{ "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "npm run lint --silent || true" } ] } ] } } - Step 03
Schedule it to repeat
If the workflow should run at fixed times, create a scheduled task. It runs in the cloud, even when your machine is off.
text·Create a scheduled task/schedule every Monday 9:00: run the competitor-check skill for our three main competitors and save the notes to docs/research/.
Four principles for human-agent teams.
Anthropic published a guide on how its own teams work with agents. Four principles from it pay off in any setup, even if your team is just you:
Write everything down
Whatever isn't written down and accessible doesn't exist for your agent. Goals, decisions and context belong in docs and in your CLAUDE.md, written with agents as the primary readers.
Clear role, right tools
Every agent gets a clearly defined job and exactly the tools for it. At Anthropic, the data-analysis agent gets database access, the QA agent gets browser testing.
One big goal, in writing
Hand the agent the ambitious goal and let it find the path. In the guide, “make onboarding more helpful” led an agent to rework the error messages on its own.
Separate doer and verifier
The agent doing the work never grades it. A second agent checks the result and actively hunts for mistakes before you see it. More autonomy only comes after proven reliability.
To set this up yourself: this prompt configures your project along the four principles.
Set up my project following Anthropic's guide “Building effective human-agent teams”:
1. WRITE EVERYTHING DOWN: Review my CLAUDE.md and add the context a new agent needs: project goal, architecture, conventions, no-gos.
2. CLEAR ROLES + TOOLS: Create fitting subagents for my project under .claude/agents/ (e.g. reviewer, tester, researcher). Give each one a clear role and only the tools it needs.
3. BIG GOAL: Ask me for the big goal behind this project and write it prominently into the CLAUDE.md. From now on, proactively suggest paths that serve it.
4. VERIFICATION: Create a verifier agent that double-checks finished work and actively tries to find mistakes before I see them. Important tasks only count as done once it has checked them.
Show me at the end what you created and why.Workflow planning
Plan with Cowork first, then let it generate.
You plan the workflow itself with Cowork. The briefing walks through trigger, data sources, transformations and output in dialogue — you don't have to structure it beforehand. Less is more.
Copy the prompt below into Cowork, answer the questions. At the end, a markdown file falls out that you hand to Claude Code — and it builds the n8n JSON from it.
I want to plan an n8n workflow. Please ask me four blocks of questions, one after another:
1) Trigger — what starts the workflow?
2) Data sources — which tools does n8n have to read?
3) Transformations — what happens between trigger and output?
4) Output — what happens at the end?
Per block, always ask only one question at a time and wait for my answer.
If I get vague, ask for concrete examples.
At the end, create a markdown file "workflow-briefing.md" with:
- workflow name
- trigger (type + configuration)
- data sources (with auth method)
- transformation logic (step by step)
- output (with example payload)
- known edge cases
For more complex automations:
Scheduled tasks in Cowork are good for smaller, recurring jobs. As soon as an automation connects several tools or has to run around the clock, you build it as a proper workflow — in three steps.
How the generation flow runs after that
Three steps from briefing to a running workflow.
- 1
Plan the workflow
You describe what the automation should do with Cowork. At the end, a markdown file falls out with trigger, data sources, transformations and output.
- 2
Hand the markdown to Claude Code
Claude Code reads the briefing and builds the n8n nodes directly in your instance — trigger, AI calls, filters, output. You don't have to drag boxes around any more.
- 3
Add credentials
For each tool in the workflow (Gmail, Notion, Stripe, …) you add an OAuth token or API key in n8n. The workflow only runs live after that.
n8n + Claude Code
What a typical generation prompt looks like.
With the n8n MCP connected, you don't build workflows by clicking any more. You describe them. Claude Code reads the existing n8n state, plans the JSON, imports it into your instance, and hands you back the workflow link.
Workflow as prose
You describe in one sentence what should happen — Claude Code generates the n8n JSON. Instead of dragging 40 nodes around, you speak the workflow.
Iterable in code
Workflows live as JSON in Git. Diff, branch, review. Instead of a click editor you get version control like real code.
Test data generated
Claude Code also writes example payloads for the trigger webhooks for every workflow. You test directly, without needing live data.
Docs included
For every workflow Claude Code drops a README.md in the repo — trigger, steps, edge cases. When you come back three months later, you still know what's running.
Example: Claude Code generates the social-media-reels automation
You hand Claude Code the workflow briefing from the planning phase and say:
Read social-media-reels-workflow.md and build an n8n workflow from it.
The workflow takes a one-pager input (headline, body, image assets, hashtags)
and automatically generates a reel video for Instagram, TikTok, and LinkedIn.
[Alex delivers: detailed workflow steps — trigger, AI calls for script
and voiceover, asset generation via Remotion or video API, posting targets
with auth setup, logging, and error handling.]
Import the workflow directly into our n8n instance via MCP.
Also write a README.md with a trigger payload example and edge cases.Claude Code reads your briefing, generates the JSON, calls the n8n MCP, imports the workflow, hands you back the n8n editor link. You check visually, click „Activate“. Done.
Hetzner self-hosted
n8n on Hetzner — five euros a month, full data control.
Once you automate regularly, self-hosted pays off. A Hetzner CX22 (2 vCPU, 4 GB RAM, 40 GB SSD) is enough for n8n + Postgres + Caddy as a reverse proxy. Frankfurt or Falkenstein, EU region, GDPR-compliant.
Cost comparison
| Variant | Price | Executions | Note |
|---|---|---|---|
| n8n Cloud Starter | approx. €24/month | 2,500 executions | Comfortable, but costs scale fast once workflows go to production. |
| n8n Cloud Pro | approx. €60/month | 10,000 executions | Worth it if you don't want your own infrastructure and stay below the Pro cap. |
| Self-hosted (Hetzner CX22) | around €5/month | Unlimited (until resource cap) | Server know-how required. EU region, full data control, no lock-in. Our pick from the first production workflow on. |
Minimal Docker Compose stack
n8n runs as a Docker container next to Postgres and Caddy. Caddy handles HTTPS automatically via Let's Encrypt — you don't have to configure any certificates.
services:
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: n8n
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: n8n
volumes:
- postgres_data:/var/lib/postgresql/data
n8n:
image: n8nio/n8n:latest
restart: unless-stopped
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_DATABASE: n8n
DB_POSTGRESDB_USER: n8n
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
N8N_HOST: ${N8N_HOST}
N8N_PROTOCOL: https
WEBHOOK_URL: https://${N8N_HOST}/
GENERIC_TIMEZONE: Europe/Berlin
depends_on:
- postgres
volumes:
- n8n_data:/home/node/.n8n
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
volumes:
postgres_data:
n8n_data:
caddy_data:
caddy_config:
Let Claude Code roll out the setup on the server. Add SSH key, clone the repo, [docker compose up -d]. A backup cron is part of it — Claude writes the script along with it.
If you don't know how all of this works, just ask Claude Code: it knows the stack, walks you through step by step and corrects you when you mistype. You don't have to remember any of it — you only have to describe what should run at the end.
Example workflows
Two workflows to clone.
Two real daily workflows we run ourselves. A one-pager reel for social and a multi-scene product video with voiceover and phone reveal. Both fully in n8n, generated via Claude Code, rendered on Hetzner. You take the build guide below, hand it to Claude Code, and build your own.
Example 1 · Social media reels
From one-pager to finished reel
One-pager in, finished reel out. Reproducible for any topic and any brand. Here's how the workflow runs:
- Schedule or webhook kicks off the workflow every morning
- Claude writes hook, three facts and CTA from your style guide
- Pexels pulls a matching portrait background video
- You approve in Telegram or send feedback — up to four iterations
- FFmpeg renders the 1080×1920 MP4 with your brand overlay
- Google Drive collects MP4, caption and script per day
What the workflow looks like in n8n

An automatically generated reel
Take with you
Build guide as markdown
The full build guide as markdown. Drop it into Claude Code, say “build the workflow with my brand, my topic pool, my server”, and Claude walks step by step through Drive setup, renderer deploy and the n8n workflow.
Social media reels · Build guideMarkdown · to adapt and pass onExample 2 · Product videos
Product videos and short sequences for social
Here you automate product videos and short sequences for social. Three cut Pexels scenes plus a final phone reveal with an app screenshot, voiceover and a quiet music bed underneath. Here's how the workflow runs:
- Schedule kicks off the workflow every morning
- Claude writes three scenes (hook, problem, solution) plus a phone-reveal CTA
- Pexels pulls a separate background video for each scene
- You approve in Telegram or send feedback — up to four iterations
- ElevenLabs speaks the text as the voiceover
- FFmpeg composes scenes, voice, music and the phone reveal with the app screenshot
- Google Drive collects MP4, caption and script per day
You thumbs-up or send feedback
Before the render, n8n sends you the draft in Telegram. You reply with ok, no, or freetext. Up to four iterations until the script lands — only then does the renderer run.

An automatically generated product video
Take with you
Build guide as markdown
The full product-video build guide as markdown — with ElevenLabs setup, phone-reveal composition and the music chain. Drop it into Claude Code, name your brand, app and server, and Claude rebuilds the workflow for your product.
Product videos · Build guideMarkdown · to adapt and pass onLearning lever
Two years ago you couldn't build either of these workflows in an hour. Today: hand the build guide to Claude Code once, five minutes of smoke testing, then the pattern runs. Once the first workflow stands, every new one takes the same time.
Agentic OS
Your own agentic OS.
An agentic OS is your own operating system built on Claude Code. A system that thinks along: a long-term memory, a cockpit, your tools, your agents. All in one place.
The four building blocks.
Second brain
A folder where your knowledge lives and grows. Claude writes along, researches and links the notes.
Cockpit
A surface on top of the vault: an overview, your skills, an embedded terminal.
Connect tools
MCP servers attach external services, from Supabase to GitHub to your calendar.
Custom agents
Your own agents for your recurring tasks, each with a clear job.
What you need
- a Claude subscription (Pro or Max)
- the current version: claude update
- logged in with your Claude.ai account, not via an API key
Build the second brain.
The first building block, step by step. An Obsidian vault as your knowledge store, with Claude writing along.
- Download ObsidianStep 01
Install Obsidian
Obsidian is a free note app that stores your notes as plain markdown files in a folder. That folder becomes your vault.
- Step 02
Create the vault and start Claude
Create an empty folder and open it in Obsidian via “Open folder as vault”, not via “Create new vault”. Then start Claude Code in the same folder.
bash·Terminalmkdir ~/second-brain cd ~/second-brain claude - Step 03
Set up structure and rules
In the first prompt you build the skeleton: a CLAUDE.md that makes Claude the keeper of the vault, plus the folder structure.
prompt·Prompt 1We are turning this folder into a second brain. Create a CLAUDE.md that describes you as the keeper of this vault. Structure: raw/ for raw notes, wiki/ for linked articles, index.md as the entry point, log.md for changes. Define three operations: Capture (file a new note), Look up (answer a question from your knowledge), Tidy up (keep structure and links clean). Keep the CLAUDE.md under 200 lines. - Step 04
Build up and link the knowledge
Now you expand the vault. One subagent per topic, plus cross-links between related notes.
prompt·Prompt 2Expand the vault. Take the topics in raw/, research each one with a subagent, write an article per topic into wiki/ and add [[wikilinks]] between related notes. At the end, update index.md and log.md. - Step 05
Point auto memory at the vault
Auto memory is on by default from Claude Code 2.1.59: Claude remembers what matters on its own. Otherwise those notes land under ~/.claude/projects/. One line in settings.json puts them in your vault, so you read them in Obsidian too.
json·.claude/settings.json{ "autoMemoryDirectory": "~/second-brain/claude-memory" } - Step 06
Sync across multiple computers
To keep your brain identical on every computer and in the cloud, put the vault folder in a private Git repo. Clone it once on every other machine. Pull the latest state before you work, push it back when you are done. Because the auto memory sits inside the vault, it travels too. If you want it without a terminal, use Obsidian Sync (paid, no setup).
bash·Terminal (one-time setup)cd ~/second-brain git init && git add . && git commit -m "second brain" # create a private repo on GitHub, then connect it: git remote add origin git@github.com:YOUR-NAME/second-brain.git git push -u origin main # other machine: git clone ... ; then git pull (start) / git push (end)
A quick word on safety
You edit settings.json yourself, and the setting only takes effect after you confirm the folder as trusted. Everything runs locally on your machine. This page runs nothing. After that, restart Claude once so the setting applies.
The next stages: your own agents.
Once the second brain stands, you build agents on top. Three stages we run ourselves:
Scheduled agents
Fixed routines as scheduled tasks: the competitor check on Monday, the weekly review on Friday. The agent runs in the cloud and files its result in your vault. How to create such a task is covered above in the agent-path section.
On-demand agents
Tasks you start on request: “Research topic X and write the note to wiki/.” Every agent has a clear assignment and a fixed place to file things, so nothing ends up nowhere.
Content agents
The top stage: a pipeline from research to script to finished assets like carousels and reels. For scheduling, connect Metricool or Buffer via their official MCP servers. Your agent drafts the posts and puts them in the publishing queue, publishing happens through the tool.
The cockpit.
The vault is your storage, the cockpit is your surface on top of it. A plugin in Obsidian that gives you the overview: your skills as tiles, the status of your agents, an embedded terminal where Claude runs directly. That way you run your system from one place.
A ready-made cockpit plugin installs quickly. We will show ours once it is ready.
Our own agentic OS.
We will share our own agentic OS soon. Once our setup is ready, you will find the story behind it here, a few screenshots and the steps to rebuild it.
On to the next station
Examples
Our own apps. With story, trick and tech stack.