Make your AI coding agent check security headers and SSL expiry before it says "deployed"
Coding and ops agents are happy to call a deploy "done" once the build passes. A quick last check catches the boring failures that bite later: the site isn't on HTTPS, the certificate expires next week, or the standard s
Coding and ops agents are happy to call a deploy "done" once the build passes. A quick last check catches the boring failures that bite later: the site isn't on HTTPS, the certificate expires next week, or the standard security headers are missing.
Disclosure: I run SiteDoctor, the MCP server used below. It has a free tier (25 credits, no signup), and this post shows exactly what it checks and what it doesn't.
What gets checked
| Check | How it's reported | Score impact (security, max 25) |
|---|---|---|
| HTTPS | Critical issue if the URL isn't https | -10 |
| SSL certificate |
https_valid and ssl_days_remaining; high-severity issue under 14 days |
-6 when < 14 days |
| Strict-Transport-Security | "Missing header" when absent | -4 |
| Content-Security-Policy | same | -4 |
| X-Frame-Options | same | -3 |
| X-Content-Type-Options | same | -2 |
| Referrer-Policy | same | -2 |
| Permissions-Policy | same | -1 |
| Server header with a version | "Server version exposed" | -1 |
The same scan_website call also scores SEO, performance, mobile readiness and broken links.
Real output
scan_website({"url": "https://manhourplan.com/"}), captured from the live server on 2026-11-21. My own homepage was missing a CSP header, and the scan said so (trimmed):
{
"url": "https://manhourplan.com/",
"score": 91,
"grade": "A",
"categories": {"seo": 28, "performance": 22, "security": 21, "mobile": 10, "content_links": 10},
"metrics": {"https": true, "https_valid": true, "ssl_days_remaining": 57, "response_ms": 132},
"issues": [
{"cat": "security", "sev": "medium", "msg": "Missing header: CSP"},
{"cat": "seo", "sev": "low", "msg": "Title length 77 chars (ideal 30-60)"},
{"cat": "performance", "sev": "low", "msg": "No Cache-Control header on HTML"}
]
}
Scope (what it doesn't do)
- Headers are checked for presence only. A weak CSP still counts as present.
- The SSL check reads the certificate on port 443. It doesn't test protocol versions or cipher suites.
- One URL per call. It isn't a monitor; schedule the call yourself if you want expiry alerts.
Connect it
Endpoint: https://manhourplan.com/doctor/mcp (Streamable HTTP, official registry name com.manhourplan/sitedoctor).
Claude Code:
claude mcp add --transport http sitedoctor https://manhourplan.com/doctor/mcp
Cursor (~/.cursor/mcp.json) or any client that takes a remote URL:
{ "mcpServers": { "sitedoctor": { "url": "https://manhourplan.com/doctor/mcp" } } }
Then ask the agent to call register_free_key and pass the returned key as api_key. A full scan costs 3 credits, so the free key covers about 8 scans.
Prompts that work
- "Before you mark the deploy done, run SiteDoctor scan_website on the production URL and fix any security issues it lists."
- "Check these 20 client sites and tell me which certificates expire within 30 days." (60 credits)
- "Which of our landing pages are missing HSTS or CSP?"
If you need more than the free credits, packs are $9 (1,000), $29 (10,000) and $99 (100,000), paid by card on the SiteDoctor page. Full guide: original post.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.