Skip to main content
Glama
CACTUSCASH

mcp-headers

by CACTUSCASH

mcp-headers

An MCP server that lets Claude scan a website's HTTP security headers and grade them A–F.

Add it to Claude Desktop or Claude Code, then just ask:

"How are example.com's security headers?"

Claude calls the scan_security_headers tool, which fetches the site server-side, checks it against the OWASP secure-headers set, and hands back a grade plus the exact header to add for anything that's missing — so the model isn't guessing.

Security-header grade for https://example.com/: D (64/100)

❌ Content-Security-Policy — No CSP; nothing constrains where scripts load from.
    fix: Content-Security-Policy: default-src 'self'; object-src 'none'; base-uri 'self'
✅ Strict-Transport-Security — HSTS enforced (730 days).
❌ X-Frame-Options — Missing; page can be framed for clickjacking.
    fix: X-Frame-Options: SAMEORIGIN
...

Why

Language models are confidently wrong about live sites — they'll "remember" a CSP that isn't there. This server makes that one thing checkable: it reads the actual response and grades it deterministically, so Claude can give a real answer instead of a plausible one. It's a small, focused example of the pattern I like — give the model a narrow, reliable tool instead of asking it to know everything.

Related MCP server: Sekrd Security Scanner

The tool

Tool

Input

Returns

scan_security_headers

url (string)

An A–F grade, per-header pass/warn/fail, and a copy-paste fix for each gap

It grades seven headers (CSP, HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, Cross-Origin-Opener-Policy), penalises stack-disclosing headers (X-Powered-By, versioned Server), follows redirects, and times out after 10 seconds.

Install

npm install
npm run build

Then point your MCP client at the built server.

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "headers": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-headers/dist/index.js"]
    }
  }
}

Claude Code:

claude mcp add headers node /absolute/path/to/mcp-headers/dist/index.js

Restart the client and ask it to scan a site.

How it's built

  • TypeScript, ESM, no framework — just the official @modelcontextprotocol/sdk and zod for the tool schema.

  • One tool, one file (src/index.ts). The grading logic is a pure function so it's easy to read and extend.

  • Talks stdio, so it runs anywhere an MCP client can spawn a process.

License

MIT © Sa'ood Williams

Available Tools

1 tool
scan_security_headersA

Fetch a website and grade its HTTP security headers A–F against OWASP best practices, listing what is missing and the exact header to add.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe website URL to scan, e.g. 'example.com' or 'https://example.com'.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It conveys that the tool actively fetches a site, grades its headers, and reports recommended fixes, but it does not disclose behavior on timeouts or unreachable URLs, whether redirects are followed, or that the scan is a live outbound request observable by the target. Core behavior is clear; edge-case behavior is not.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single ~24-word sentence with the action front-loaded ('Fetch a website and grade...') and every clause earning its place: the methodology (OWASP), the grading scale (A–F), and the output shape (missing headers + exact header to add). There is zero waste and no repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no annotations and no output schema, the description adequately explains the operation and the return content (grade, missing headers, recommended header). It omits only negative-path behavior such as how unreachable sites or invalid URLs are handled, which is a minor gap at this low complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the url parameter is already well documented with format examples ('example.com' or 'https://example.com'). The description's 'Fetch a website' adds no parameter-level meaning beyond what the schema provides, so the baseline 3 for high schema coverage applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names specific verbs ('fetch', 'grade'), a specific resource ('HTTP security headers'), a standard ('OWASP best practices'), a grading scale ('A–F'), and the concrete deliverable ('what is missing and the exact header to add'). An agent knows precisely what this tool does and what output to expect without any inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies its usage context — auditing a website's security header posture — through a clear statement of function, but it never explicitly states when to use it, when not to, or any prerequisites. No sibling tools exist to differentiate from, so no routing guidance is possible, but explicit scenario guidance is still absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Exactly one tool exists, so there is no possibility of selecting between overlapping tools. The purpose is clear and unique.

Naming Consistency5/5

The tool name follows a clean verb_noun pattern (scan_security_headers) that aligns with its function. No conflicting conventions are present.

Tool Count3/5

One tool is borderline for a server focused on security headers; it covers a narrow task but feels thin for a general 'headers' server. Not excessively large, yet minimal.

Completeness4/5

The tool fully accomplishes its stated purpose of fetching and grading security headers, including actionable missing headers. Minor gap: no raw header output or batch scanning, but core functionality is sound.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that gives Claude and other AI agents the ability to audit any public URL's HTTP security headers. What it checks: * HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy * HTTPS enforcement and redirect chain depth * Presence of security.txt, robots.txt, sitemap.xml Payment model: * 0.05 USDC per scan, paid automatically on Base via the x402 proto
    2
    16
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables deep security auditing of web applications directly from AI IDEs including Cursor and Claude Code. Scans URLs for vulnerabilities, returns security scores with SHIP/BLOCK verdicts, and provides specific fix prompts for remediation.
    3

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CACTUSCASH/mcp-headers'

If you have feedback or need assistance with the MCP directory API, please join our Discord server