Har Forensics Mcp

io.github.aryanspv由 GitHub 帳號 aryanspv 發布v0.3.2更新於 Oct 24, 2026

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

概覽

AI 產生的概覽

本機 MCP 伺服器,離線稽核 .har 瀏覽器封包擷取,回報外洩的憑證、第三方來源以及分享前該清掉的內容。

可以做什麼
  • 在磁碟上尋找 .har 擷取檔,並對指定檔案做逐項判定的初步檢查
  • 依嚴重程度列出發現項目,為第三方廠商評分並追溯誰載入了誰
  • 分析效能:最慢的請求、各來源的握手成本、未壓縮資源、重新導向耗時
  • 以篩選條件查詢請求,並檢視單一請求的標頭、Cookie、內容與各階段耗時
  • 把請求轉成可執行的 cURL 或 fetch 片段(憑證已遮蔽),並比對兩份擷取檔
  • 產出已去識別化的 .redacted.har 副本與去識別化的 markdown 稽核摘要
適用情境
當你手上有瀏覽器開發者工具匯出的 HAR 檔,需要了解其中暴露了哪些密鑰或個人資料、牽涉哪些第三方,或頁面為何變慢,並在把擷取檔附到工單或聊天前先檢查時使用。
執行需求
透過 npx 以本機 stdio 程序執行(npm 套件 har-forensics-mcp),需要 Node 20 以上版本。不需要 API 金鑰、帳號或網路存取。需在編輯器(Claude Code、Cursor、Windsurf、Zed、VS Code Copilot)的 MCP 設定中註冊並重新啟動編輯器。
安裝前請注意
HAR 擷取檔常含有效的工作階段 Cookie、Authorization 標頭,有時還有卡號;此伺服器只在本機讀取且不發出網路請求,但把它的輸出貼到聊天視窗就會離開你的機器。sanitize_har 會寫出新檔案,並拒絕覆寫既有的目標檔或原始擷取檔。超過約 512 MB 的檔案會被拒絕。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Har Forensics Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

har-forensics-mcp

Audit a .har capture from inside your editor. Other HAR tools show you a list of requests. This one answers the question you opened the file for: what leaked, who's on the page, and what to strip before you send it anywhere.

Reads a file from local disk, computes, writes to stdout. It makes no network calls, which is the point: a real capture holds live session cookies, Authorization headers, and sometimes card numbers.

Works with anything that speaks MCP over stdio — Cursor, Claude Code, Windsurf, Zed, VS Code Copilot.

Setup

Claude Code:

bash
claude mcp add --scope user har-forensics -- npx -y har-forensics-mcp

--scope user registers it for every directory. Without it the server is scoped to whichever directory you ran the command in — which still reports success, and then the tools are silently absent everywhere else.

Cursor — .cursor/mcp.json in the project, or ~/.cursor/mcp.json globally:

json
{  "mcpServers": {    "har-forensics": {      "command": "npx",      "args": ["-y", "har-forensics-mcp"]    }  }}

Windsurf / Zed / VS Code Copilot take the same command + args shape in their own MCP config files.

Restart the editor, then point a tool at a capture:

Run analyze_har on ~/Downloads/checkout.har

Requires Node 20+. Nothing else — no clone, no build, no API key, no account.

Tools

ToolAnswers
find_captures"Where are my .har files?" — scans Downloads, Desktop, Documents, cwd, temp.
analyze_har"What's in this capture?" — triage overview, one verdict per check. Start here.
har_briefThe full audit as redacted markdown. The artifact to quote or paste.
har_findingsFindings, worst-first, filterable by severity. Paged.
har_vendorsEvery third party, scored 0–100 by blast radius, with an HTTP Archive scrutiny tier.
har_provenanceWho loaded whom — the fourth parties your vendors brought with them.
har_perf"Why was this slow?" — slowest requests by dominant phase, per-origin handshake cost, uncompressed assets, time lost to redirects.
har_cspA starter Content-Security-Policy synthesized from observed traffic.
har_huntQuery requests — is:thirdparty, status:>=400, type:script, host:…. Returns entry indices.
har_entryEverything about one request: headers, cookies, body, timing phases.
har_curlThat request as a runnable cURL or fetch(), credentials masked.
har_diffBefore vs. after: what was added, what regressed, which third parties are new.
sanitize_harWrite a .redacted.har safe to attach to a ticket.

har_hunt → har_entry → har_curl is the loop: find the request, read it, replay it. Every tool that returns a list takes a limit and tells you the total, so nothing silently returns a first page as if it were the whole answer.

Every tool except sanitize_har is annotated readOnlyHint, and all of them are openWorldHint: false — the no-network guarantee below, in a form your client can read and act on rather than prose you have to take on trust.

Three properties it inherits from the web app

No network. The analyzers contain no fetch, and this transport does not add one. That invariant is the product — Cloudflare shipped a DLP profile in March 2026 that detects HAR files in HTTP traffic and lets admins block the upload outright, because unsanitized HARs are a known credential-exfiltration path.

Summaries, never dumps. Every tool returns a rendered conclusion, not raw entries, and every list is bounded with its total stated. The captures this exists for run to tens of thousands of entries and hundreds of megabytes; handing an agent the entry list would blow its context and make it slower at a job the analyzers already did. (This was a promise the code broke until 0.2.0 — har_findings had no cap and returned ~93,000 tokens on a 10,000-entry capture. The 27-entry demo returned ~175, which is exactly why it went unnoticed.)

Redacted by default. har_brief and har_findings route through the same redactor the browser export uses, built from a single shared secret-pattern table. An agent reading a capture in an editor is more likely to paste a finding into a chat window than a human with a download folder.

What it will not do

  • Overwrite anything. sanitize_har refuses to write over an existing target or the original capture.
  • Read a file above ~512 MB. Guarded rather than left to OOM — pinned just under V8's maximum string length, since the file is read as one string.
  • Answer a query it did not understand. A misspelled filter (is:third-party, staus:404) is an error, not an empty result. Those were the same response until 0.2.0, which meant a typo could report a capture clean.
  • Judge time against your clock. A HAR is a historical artifact, so token expiry is measured against each entry's startedDateTime. Comparing to now marks every token in a week-old capture as expired and buries the one that was genuinely dead when the browser sent it.

Reading the code

This package ships one file, dist/server.js. It is deliberately not minified — the build treats it as something a human debugging an editor integration will read far more often than something a machine will parse for size — so it is the same code a build would produce, already built. There is no separate source repository to clone; the shipped file is the artifact to audit.

License

MIT. Bundled vendor data is generated from third-party-web — MIT, Copyright (c) 2017 Patrick Hulce, derived from HTTP Archive.

來源:README.md,提交 3684af6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。