Skip to main content
Glama
momoaftabi

qa-sec-scan-mcp-server

by momoaftabi

qa-sec-scan-mcp-server

An MCP server that passively scans HAR files — the kind QA automation already produces (e.g. via Playwright's recordHar option) — for common security issues.

It never sends network requests of its own. It only analyzes HTTP traffic that already happened, captured in a .har file you point it at. That makes it safe to run against any environment, including production, since it can't cause side effects.

What it catches

Rule

Category

Severity

HDR-001

Missing Strict-Transport-Security header

Medium

HDR-002

Request made over plaintext HTTP

High

COK-001

Session cookie missing Secure/HttpOnly/SameSite

High

DATA-001

Secret/credential pattern in response body

Critical

DATA-002

Sensitive-looking parameter in the URL

Medium

DATA-003

Luhn-valid payment card number in response body

Critical

CORS-001

CORS reflects the request's Origin unconditionally

High

CORS-002

Wildcard CORS origin combined with credentials

Critical

Related MCP server: Risk Audit MCP

Setup

npm install
npm run build

Producing a HAR file from your test suite

This scanner needs response headers, cookies, and response bodies to work — so however you generate the HAR, make sure content isn't stripped out.

Playwright

const context = await browser.newContext({
  recordHar: { path: "test-results/network.har" },
  // defaults: mode "full", content "embed" for a .har path — includes headers, cookies, and bodies.
  // Don't override to mode: "minimal" or content: "omit", or the rules that inspect
  // response bodies (DATA-001, DATA-002, DATA-003) and cookies (COK-001) will have nothing to check.
});

// ... run your test, make requests via `context` or any page created from it ...

await context.close(); // the HAR is only written to disk once the context closes

If you're using the Playwright Test runner rather than driving browser/context by hand, the equivalent is setting recordHar in your project's use config, or per-test via test.use({ recordHar: { path: "..." } }).

Other tools that can emit HAR (mitmproxy, browser DevTools' "Save as HAR", har-recorder style middlewares) work too — harParser.ts reads the standard HAR 1.2 format, it isn't Playwright-specific.

Using this MCP with an AI client

For interactive, AI-assisted triage — asking an assistant to scan a HAR and explain what it finds, the way this project was built and tested — add the server to your MCP client's config (e.g. Claude Desktop):

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

Restart your client after any rebuild. MCP clients keep a long-lived server process running; a tsc rebuild overwrites the files on disk but does not restart the already-running process, so it'll keep serving stale code until you restart the client.

Tool: secscan_scan_har

Args:

  • harFilePath (string) — absolute path to a .har file

  • response_format ("markdown" | "json", default "markdown")

Returns a scan summary (counts by severity) plus a list of findings, each with the rule that fired, the offending request, evidence, and a remediation suggestion. Text responses are capped at the 50 highest-severity findings (worst first); the full, untruncated result set is always available via the tool's structured content, for any client reading that instead of the text.

In practice: point your AI client at a HAR file your test suite produced and ask it to scan for security issues — no manual invocation syntax needed, the assistant calls the tool for you.

Using this as a CI gate (no AI client needed)

If you want a deterministic pass/fail check in your pipeline instead — build fails if any critical finding shows up — use the bundled CLI, which runs the same scan logic directly without going through the MCP protocol at all:

npm run gate -- path/to/network.har

Exits 0 if there are no critical findings, 1 if there are (or if the HAR couldn't be scanned at all — the gate fails closed on errors rather than silently passing).

Example as a step in a CI workflow that already runs Playwright:

- name: Run Playwright tests
  run: npx playwright test

- name: Security gate on captured HAR
  run: npm run gate -- test-results/network.har

If your suite produces multiple HAR files (one per test, say), loop the gate command over each path rather than hardcoding one.

Development

npm run dev    # tsx watch — fast iteration, does NOT type-check
npm run build  # tsc — the real correctness gate for the code itself

Architecture

HAR file → harParser.ts → Transaction[] → rules/*.ts (each independent) → scanEngine.ts → ScanReport │ ┌─────────────────────┴─────────────────────┐ │ │ src/tools/scanHar.ts src/cli.ts (MCP tool, for AI clients) (deterministic CI gate)

Parsers translate raw formats into a normalized Transaction. Rules never touch raw HAR shapes — they only see Transaction. The scan engine and rule set are shared between both consumers (the MCP tool and the CLI gate); only the presentation and exit-code logic differ.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

0Releases (12mo)
Commit activity

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

  • Compliance & security scan for your app: secrets, exposed files, headers, privacy, AI-disclosure.

  • Scan a website for vulnerabilities: OWASP Top 10, CVEs, SSL, headers - with plain-English fixes

  • Threat modeling, code/cloud/pipeline scanning, shadow-AI discovery, compliance checks and fixes.

  • Security, SEO and AI-visibility scanner for web apps · free scans and focused checks via MCP.

View all MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables ethical security testing and attack surface management through SSL certificate validation, CVE queries, subdomain enumeration, security header analysis, and comprehensive reconnaissance capabilities. Designed for authorized penetration testing workflows with responsible disclosure practices.
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables security scanning of code projects to identify common vulnerabilities like XSS, injections, SSRF, and path traversal issues. Provides local, offline scanning with severity-grouped results and actionable fix suggestions for improving code security.
    38
  • A
    license
    Not graded
    quality
    D
    maintenance
    Scan APIs for security vulnerabilities and get OWASP risk scores. Detects auth bypass, BOLA/IDOR, data exposure, prompt injection, and 12+ security categories.
    50
    Apache 2.0

View all related MCP servers

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/momoaftabi/qa-sec-scan-mcp-server'

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