Let Claude Code add a contact form that works
Paste the prompt below into Claude Code in your site's folder. It writes the form into your site and gives you a link. You press Activate, and every message is stored in Germany and emailed to you.
Or let Claude Code start without an account: it sends you the link.
Add a working contact form to this site with FormHaven.
Read https://formhaven.net/llms.txt and follow
"Start without an account". Then give me the link
to switch the form on.
What happens
-
1
Claude Code reads the instructions
It fetches https://formhaven.net/llms.txt, which tells an agent how to reserve a form without an account.
-
2
It reserves the form and writes the code
One request returns the form address. Claude Code puts it in your contact form's action, with every input named and the hidden spam trap.
-
3
You open the link and press Activate
Create an account or log in, then press the button. Until then the form refuses posts and stores nothing.
-
4
Send a test
Fill in your form. The message lands in your inbox, with the visitor as the reply address.
Let it change settings afterwards
Once the form is active, the setup key Claude Code got works on our MCP server for 30 days. Add it once and ask in plain words: keep messages 90 days, send copies to my client, give me the privacy text in Dutch.
claude mcp add --transport http formhaven https://formhaven.net/mcp \
--header "Authorization: Bearer YOUR_KEY"
Ask for the privacy text too
Your privacy policy needs a paragraph about the form. Claude Code can fetch one filled in from the form's real settings and add it to your privacy page.
Get the FormHaven privacy text for our contact form in
English and add it to the privacy page. Put the notice
line above the form's Send button.
Questions about this setup
- Do I need an API key first?
- No. Claude Code starts the form without one, and the key it gets works for 30 days once you have pressed Activate. For longer, create a key in the dashboard and connect it yourself.
- What does Claude Code change in my site?
- The contact form's action address, the names of its inputs and one hidden input that traps bots. If you ask for it, the privacy page too. Review the diff like any other change.
- Does it work with any framework?
- Yes. The form posts to FormHaven, so it works in plain HTML, Astro, Next.js, Hugo or anything else that renders a form. Ask for React and it can fetch a ready component.
- Can my client get the messages?
- Yes. Add up to 5 more addresses to the form. Each one confirms by a link first, and their copy carries no FormHaven branding.
- Where is the data stored?
- On our server at Hetzner in Falkenstein, Germany, for as long as you set per form, or not at all. A data processing agreement covers every account.
More to read
Get your form address in a minute
14 days free, no card. Then €1 per form a month, €0.50 from the 11th form.