Skip to content
MCP server

Security Headers

Grades a site's security headers and explains each one, over stdio

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
0.3.0
Listing updated
2 days ago

About Security Headers

Security Headers is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

Scoring is explicit: CSP carries 25 points, HSTS 20, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Set-Cookie 10 each, and Permissions-Policy, COOP and CORP 5 each. Grades run from A+ (95% with no failing header) down to F. A Content-Security-Policy sent in report-only mode earns nothing because it is not enforced.

The live check sends a HEAD request (falling back to GET on 405 or 501) to a public http(s) URL and never downloads the body. It validates every redirect hop and refuses localhost, .local, .internal, private, loopback, link-local, CGNAT and cloud-metadata addresses. The README warns that this does not defeat DNS rebinding between the check and the connection.

It is one of ten small servers in the dev-mcp-servers repository, ships as a pinned container image and sends no telemetry. The README is blunt that a good grade means headers are configured well, not that the application is secure.

Install

Run in a terminal

claude mcp add mcp-security-headers -- docker run -i --rm ghcr.io/basitalisandhu/mcp-security-headers:0.3.0

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-security-headers": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-security-headers:0.3.0"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-security-headers": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-security-headers:0.3.0"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-security-headers": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-security-headers:0.3.0"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-security-headers": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-security-headers:0.3.0"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-security-headers": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-security-headers:0.3.0"
      ]
    }
  }
}

Tools this server provides (3)

Taken from the project documentation; the running server may differ.

check_url_headers
Requests a public URL and grades its response headers, following validated redirects.
grade_headers
Grades headers you supply, with no network call.
explain_header
Explains one header with its recommended value and a reference.

What it does

Live header check
Fetches a public URL with up to 10 validated redirects and a 10 second timeout per request.
Offline grading
Grades headers you already have, such as curl -I output, without any network access.
Weighted scoring
Combines per-header weights into a letter grade from A+ to F.
Per-header explanations
Returns the purpose, a recommended value and a reference for any single header.
Private-address refusal
Blocks internal, loopback, link-local and cloud-metadata targets, including names that resolve to them.

Good for

  • Auditing a staging site's CSP and HSTS before launch
  • Grading headers pasted from a curl -I run during a code review
  • Explaining an unfamiliar response header to a teammate
  • Checking cookie attributes and information-disclosure headers on a public page

Pricing

Open source

MIT licence; free to run

Prices change. Check basitalisandhu.github.io before you buy.

Security Headers FAQ

Does it download page bodies?

No. It sends a HEAD request and only reads response headers.

Can it scan internal hosts?

No. Localhost, private ranges and cloud-metadata addresses are refused, including hostnames that resolve to them.

How do I install it?

Run the pinned container image ghcr.io/basitalisandhu/mcp-security-headers:0.3.0 with docker. The README says it is not on npmjs.com yet.

Does a good grade mean the site is secure?

No. The README says it only shows the headers are configured well.

Is Security Headers free?

Yes. Security Headers is open source, so you can use and self-host it for free.

How do I add Security Headers to Claude Code?

Run this command in your terminal: claude mcp add mcp-security-headers -- docker run -i --rm ghcr.io/basitalisandhu/mcp-security-headers:0.3.0

What are the best alternatives to Security Headers?

The closest alternatives to Security Headers are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Security Headers

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools