CAPTCHA embed code generator
hopi_captcha_embed_code_generatorGenerate the embed code for a CAPTCHA on a web form plus the server code that checks the token. Providers: turnstile (Cloudflare Turnstile), hcaptcha, recaptcha2 (reCAPTCHA v2 checkbox), recaptcha3 (reCAPTCHA v3 score) and altcha (self-hosted proof of work, no account). Servers: php, node (Express), python (Flask), cloudflare (Pages Function), netlify (Netlify Function) and vercel (Vercel Function), plus two form services that check the token themselves, so no server code is returned: netlify-forms (reCAPTCHA v2 only; with no site key Netlify supplies its own reCAPTCHA) and formspree (not altcha). ALTCHA server code is given for node and python only. The secret key is never asked for: the server code reads it from an environment variable. Set useTestKey to use the provider's official always-pass test site key (not available for recaptcha3 or altcha). Source: https://hopi.co.uk/captcha-embed-code-generator/
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "hopi_captcha_embed_code_generator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Widget size. flexible is Turnstile only. Ignored for recaptcha3 and altcha | normal |
| theme | No | Widget theme. auto is Turnstile's automatic theme and the default look elsewhere. Ignored for recaptcha3 and altcha | auto |
| action | No | Action name. Optional for turnstile (up to 32 letters, numbers, - and _), defaults to submit for recaptcha3; checked on the server. Ignored for the others | |
| server | No | Where the form is handled: your own server, a serverless function, or a form service that checks the token itself | php |
| siteKey | No | Your public site key (letters, numbers, - and _). Leave empty for a YOUR_SITE_KEY placeholder. Ignored for altcha | |
| language | No | Widget language code such as fr or pt-BR; empty means automatic. Ignored for recaptcha3 and altcha | |
| provider | No | Which CAPTCHA | turnstile |
| threshold | No | recaptcha3 only: lowest score to accept, 0.1 to 0.9. Ignored for the form services, which run the check themselves | |
| useTestKey | No | Use the provider's official test site key, which always passes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | ||
| note | No | ||
| action | No | ||
| server | No | ||
| siteKey | No | ||
| summary | Yes | ||
| provider | No | ||
| warnings | No | ||
| threshold | No | ||
| verifyUrl | No | ||
| serverCode | No | ||
| source_url | Yes | The tool's page on hopi.co.uk (cite or open to check the figure) | |
| tokenField | No | ||
| providerName | No | ||
| secretEnvVar | No | ||
| usingTestKey | No | ||
| testSecretKey | No |