HAR MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
HAR MCP — The Hard Way
Build an MCP server that lets an AI agent debug web performance from a browser's HAR export. Start from the raw JSON and end with an agent that can say "this request is slow because the server took 900 ms to answer, and here is the chain of requests that decided your load time", without ever being shown a password.
At the end you will have built a minimal version of har-mcp yourself, and you will understand the three things most MCP tutorials skip: reading data too big for memory, timing numbers that look simple and are not, and handing a model a file full of secrets safely.
Why this exists
Most MCP tutorials stop at a weather API. The hard part of a useful server is elsewhere:
a HAR file is 10–200 MB of nested JSON;
json.loadwould need gigabytesthe numbers inside have traps (
-1means "n/a",sslis insideconnect)the file contains every cookie and bearer token your browser sent
the model needs the three lines that matter, not 200 MB
Related MCP server: py-har-mcp
Who it is for
Developers who built a "hello world" MCP server and want a real one. You need Python 3.10+ and no knowledge of HAR.
The modules
# | Module | You build | Proof ( |
01 |
| the six facts the rest relies on | |
02 | an incremental reader | agrees with | |
03 | phases, totals, dominant phase | exact millisecond arithmetic | |
04 | a masker | planted fake secrets never survive; idempotent | |
05 | ASCII waterfall + critical path | exact columns, exact chain | |
06 | a 4-tool stdio server | called over real MCP, errors reach the client | |
07 | fuzz, leak sweep, scale, hostile files | all four |
Every module is prose (the why), runnable code, and a main.py that checks its own result
with assert. Later modules import the code written in earlier ones, so you build one
server step by step.
Run it
pip install -r requirements.txt # mcp, anyio
python verify.py # all seven modules, ~6 seconds
python verify.py 02 04 # just those
python verify.py --big # module 07 with a 100 MB file
python 03-timing-math/main.py # or any single moduleEach module also has a break-it.md: changes to make to the code to see exactly which
assertion catches them. Do those; the failures teach more than the passes.
What is deliberately missing
The finished har-mcp has seven tools (this builds four),
filters, a redirect-chain view, body previews, cache statistics, a --dir sandbox with
multiple roots, and a larger test suite. Everything it has that this does not is an elaboration
of something in these seven modules.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Website health, SEO, security-header, SSL and broken-link audits for AI agents.
71Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Agent tools: clean web screenshots/PDFs, PDF & image OCR to Markdown, PageSpeed audits, email checks
The web capability layer for AI agents: render, extract, DNS, SSL, WHOIS & more via x402.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to call web APIs extracted from HAR files, turning browser traffic into MCP tools.17 npm1MIT
- AlicenseAqualityDmaintenanceAn MCP server for parsing and analyzing HAR files, enabling AI assistants to inspect network traffic with automatic redaction of sensitive authentication headers.7MIT
- FlicenseNot gradedqualityDmaintenanceCaptures website HAR data via headless Chromium and provides 20 tools for performance/security auditing, API reverse engineering, and code generation.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to locally parse and analyze HAR files through read-only MCP tools, including searching requests, discovering endpoints, tracing values, detecting auth and API patterns, comparing requests, and exporting redacted cURL commands.-