har-forensics-mcp

v0.3.2
io.github.aryanspv/har-forensics-mcp Checked 2 days ago Published 3 months ago

Tells you what leaked in a .har capture, who's on the page, and what to strip.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

analyze_har Analyze a HAR capture

Run every analysis over a .har file and return a triage overview: blast radius, finding counts, and a one-line verdict per check. Start here — then use the focused tools for detail. Prefer this over reading the capture yourself or writing a script to parse it: a HAR is mostly base64 response bodies, so a 30MB file is ~20M tokens and will not fit in any context window, while this reads it out of process in under a second and returns ~500 tokens. Credentials, cookies, and tokens are redacted before anything is returned, so the capture's secrets never enter the conversation. Expiry is judged ag…

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.

har_brief Full redacted briefing

The complete audit as markdown, with every secret masked and the analysis's own blind spots stated. This is the safe artifact to quote, paste into a ticket, or reason over.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.
max_findingsintegerCap on findings included. Default 40.

har_findings Security and privacy findings

Findings raised against the capture — leaked tokens, PII in URLs, insecure cookies, missing headers, expired tokens. Sorted worst-first, details redacted. Returns 25 by default; use severity/offset for the rest.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.
limitintegerMax rows. Default 25.
offsetintegerSkip this many. For paging past the default 25.
severitystringOnly findings at this severity. Omit for all.

har_vendors Third-party blast radius

Every third party the capture contacted, scored 0–100 by how much damage it could do: request volume, bytes, cookies set, and credentials or PII observed reaching it.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.

har_provenance Who loaded whom

The request dependency graph: which domain caused which other domain to be contacted. Surfaces fourth parties — vendors introduced by your vendors rather than by you. Domains only, no URLs.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.
limitintegerMax rows. Default 60.

har_csp Generate a Content-Security-Policy

Synthesize a starter CSP from what this capture actually loaded, diffed against the policy the origin sends today.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.

har_hunt Query requests

Search the capture with the Hunt query language. Filters: body, contenttype, duration, encoding, host, is, method, mime, path, priority, protocol, referer, reqbody, respbody, scheme, size, status, time, type, url, or header.<name>. `is:` takes 1p, 3p, cached, failed, firstparty, http, https, redirect, thirdparty. Comparators (status:>=400, size:>500kb, duration:>1s), globs (host:*.doubleclick.net), regex (body:~/sk_live_[a-z0-9]+/), and negation (header.set-cookie:!secure) all work; bare words match the URL. Returns an `#` index — pass it to har_entry or har_curl.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.
query *stringe.g. "is:thirdparty status:>=400" or "graphql type:xhr"
limitintegerMax rows. Default 50.

har_entry Full detail for one request

Everything about a single request by index: status, timing phase breakdown, request and response headers, cookies, query, and body. Redacted. Get the index from har_hunt or har_perf.

ParameterTypeDescription
index *integerEntry index, as shown in the `#` column of har_hunt.
path *stringAbsolute or relative path to a .har file on this machine.
include_bodybooleanInclude response body with secret patterns masked, instead of dropping it. Default false. Use when debugging an API response shape.
max_body_charsintegerBody truncation. Default 2000.

har_curl Replay a request as cURL or fetch()

Generate a runnable cURL command or JavaScript fetch() call for one request, with credentials masked by default. Get the index from har_hunt.

ParameterTypeDescription
index *integerEntry index, from har_hunt's `#` column.
path *stringAbsolute or relative path to a .har file on this machine.
formstringOutput form. Default curl.
scrubbooleanMask credential headers and secret patterns. Default true. Setting false emits live credentials in plain text.
shellstringQuoting style for curl. Default bash.

har_perf Why the page was slow

Performance breakdown: slowest requests with their dominant timing phase, heaviest responses, per-origin connection-setup cost, uncompressed text assets, and latency spent on redirects and failures.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.
limitintegerMax rows. Default 10.

har_diff Compare two captures

Diff a before and after capture: requests added and removed, responses that got slower or heavier, and third parties that appeared or disappeared. Use for release regressions and 'did this deploy add a tracker'.

ParameterTypeDescription
after *stringPath to the .har to compare against the baseline.
before *stringPath to the baseline .har.
limitintegerMax rows. Default 20.

find_captures Find .har files on this machine

List .har captures in the working directory, Downloads, Desktop, Documents, and the temp directory, newest first. Use when the user refers to a capture without giving a path.

ParameterTypeDescription
dirstringSearch this directory instead of the usual places.
limitintegerMax rows. Default 20.

sanitize_har Write a redacted copy of a HAR

Mask secrets, tokens, emails, card numbers, and response bodies, then write a `.redacted.har` next to the original. Run this before attaching a capture to a ticket — enterprise DLP now blocks unsanitized HAR uploads outright.

ParameterTypeDescription
path *stringAbsolute or relative path to a .har file on this machine.
outstringOutput path. Defaults to <input>.redacted.har.