mdn-observatory-mcp
Integrates with Mozilla's MDN HTTP Observatory API to scan a host's HTTP security headers, return its grade and score, list failed checks with point costs and fixes, show present and missing headers and grade history, compare up to 10 hosts, and inspect individual checks such as CSP, HSTS, XFO, XCTO, SRI, CORS, and HTTPS.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mdn-observatory-mcp
A Model Context Protocol server for the MDN HTTP Observatory, the free service that grades a website's security-related HTTP headers (Content-Security-Policy, HSTS, HTTPS redirect, cookies, framing, referrer and cross-origin policies). It needs no API key and is read-only.
The tools are shaped around review jobs rather than one tool per endpoint: one call returns the grade, the checks that cost points with a plain-text fix for each, the headers the site does and does not send, and the host's grade history. Several hosts can be ranked in one call. The raw answer for a single host is about 18 KB, mostly HTML fragments and a full response-header dump; the server returns the useful part in roughly a fifth of that.
Setup
Requires Python 3.12+ and uv.
git clone https://github.com/Ankur1911/mdn-observatory-mcp && cd mdn-observatory-mcp
uv sync
uv run mdn-observatory-mcp # stdio transportAdd it to any MCP client that launches stdio servers:
{
"mcpServers": {
"mdn-observatory": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mdn-observatory-mcp", "mdn-observatory-mcp"]
}
}
}For HTTP instead of stdio: MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 uv run mdn-observatory-mcp.
Related MCP server: web-doctor
Tools
All tools are read-only.
Tool | What it returns |
| One host (or a full URL; the path is ignored): grade (A+ to F), score, checks passed/failed, each failed check with the points it cost, what was found, what was wanted and a plain-text fix; checks that do not apply ( |
| Up to 10 hosts scanned three at a time and ranked by score: grade, score, failed checks and points lost. A host that cannot be scanned gets an error row instead of failing the call; malformed names are listed under |
| One check on one host in full: status, points, found versus wanted, what it means, the fix, a link to the MDN guide and the parsed data (CSP directives and sources, cookie flags, HSTS settings). Accepts short names such as |
Host names are normalised locally (scheme, path, port and credentials removed, lower-cased, IDN converted). IP addresses, localhost and single-label names are rejected without a request.
Configuration
All optional environment variables:
Variable | Default | Meaning |
|
| API root (for a self-hosted instance, proxy or test double) |
|
| Request timeout in seconds (scans of slow sites take a while) |
|
| Retries on HTTP 429, 502, 503, 504 and timeouts |
|
| Responses longer than this are cut with a notice |
|
|
|
Limits
The Observatory requests the site's public page from Mozilla's servers and reads response headers. It does not test application logic, dependencies or server configuration beyond headers, so a high grade is not a security assessment.
Only publicly reachable host names work. Hosts that do not resolve, refuse connections or answer with an unexpected status come back as an error from the service (HTTP 422).
The service allows one new scan per host per minute and returns the cached scan otherwise;
rescan=trueis subject to the same cooldown.Grades and scores follow the Observatory's current algorithm and can change when Mozilla updates it. The grade history comes from the service.
Only the public API is used. The older
http-observatory.security.mozilla.orgv1 API was shut down in October 2024 and is not supported.
Development
uv sync
uv run pytestTests mock all HTTP traffic with respx; no network access is needed. The mocked responses are real answers captured from the public API on 2026-11-30 (a site with an A+ grade and a site with an F grade); the unresolvable-host error body is reproduced from the same session. The rescan option calls POST /api/v2/scan, which is covered by mocks only and has not been run against the live service.
Licence
MIT. Author: Ankur Kapuriya. Not affiliated with or endorsed by Mozilla or MDN. Scan results come from the Observatory service; check its terms before redistributing them.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Grade a website's security headers, cookies and TLS from A+ to F, with fixes.
1Security grades, SSL/TLS, headers and uptime for your domains, plus a CI deploy gate.
Grade A-F, SSL, DNS and email checks of a domain, seen from the Internet. Public, read only.
1Grade a page's HTTP security headers, search penetration testing guides and send a pentest request for a person. The read tools need no authentication; request_pentest needs a free agent key.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAnalyze and score HTTP security headers (CSP, HSTS, CORS, cookies) with actionable fix recommendations for web applications.-
- AlicenseAqualityBmaintenanceEnables live website health checks including TLS, HTTPS, and security headers, returning an A-F grade with specific fixes.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables scanning any website's HTTP security headers to obtain Mozilla Observatory grades, detailed pass/fail test results with remediation guidance, and grade distribution context.78 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents and developers to audit any URL or domain for seven critical OWASP HTTP security headers, returning an A+ to F grade plus actionable Nginx, Apache, Caddy, and Cloudflare remediation snippets. It also probes /.well-known/security.txt and /security.txt to surface responsible vulnerability disclosure contacts, bug bounty scopes, and PGP keys.2MIT