har-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@har-mcpLoad sample.har and find all unique API endpoints along with their authentication methods."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HAR Analysis MCP Server
A local, read-only MCP Server that parses and analyzes HAR (HTTP Archive) files for AI agents.
Give your AI agent eyes into HTTP traffic — without exposing secrets or leaving your machine.
⚠️ Disclaimer: This was a weekend vibe-coding project, built almost entirely through AI-assisted pair programming. It works, but it's not production-hardened. There may be security holes, edge cases, and rough edges. If you find bugs, open an issue — or better yet, open a PR. Don't trust it with anything you can't afford to lose.
Why?
When reverse-engineering APIs, debugging web apps, or analyzing traffic, you need to understand what's happening in the network layer. HAR files capture all HTTP traffic, but they're huge JSON blobs that don't fit in an LLM's context.
This MCP server solves that: it parses the HAR locally and exposes 18 targeted tools that let an AI agent query exactly the parts it needs — one request at a time, with secrets automatically redacted.
Related MCP server: py-har-mcp
Features
Load & parse HAR 1.2 files (handles missing fields, compressed bodies, base64 content)
Smart search across all requests/responses with scope filters
Endpoint discovery — unique API endpoints with normalization (
/users/123→/users/{id})Value tracing — follow tokens, session IDs, JWTs across the entire traffic
Authentication detection — Bearer, Basic, cookies, CSRF, JWT, OAuth, API keys
Request comparison — diff two requests across all dimensions
Request chain inference — login → profile → order flows (heuristic, not definitive)
API pattern detection — REST, GraphQL, JSON API, WebSocket, SSE
cURL export — with automatic secret redaction
Security first — no network access, no code execution, path traversal protection
Project Structure
har-mcp/
├── har_mcp/
│ ├── __init__.py
│ ├── __main__.py # python -m har_mcp entry point
│ ├── server.py # MCP server — tool registration & wiring
│ ├── har_parser.py # HAR 1.2 parsing, decompression, URL normalization
│ ├── analyzer.py # Smart analysis (auth, patterns, chains, comparison)
│ ├── models.py # Data models for HAR structures
│ ├── security.py # Path validation, secret redaction, content sanitization
│ ├── storage.py # In-memory storage backend
│ └── config.py # Environment variable configuration
├── tests/
│ ├── conftest.py
│ ├── test_parser.py
│ ├── test_security.py
│ ├── test_tools.py
│ └── fixtures/
│ └── sample.har # Fake sample HAR for testing
├── sample.har # Fake sample HAR (example.com only)
├── setup.py
├── requirements.txt
└── README.mdRequirements
Python 3.11+
Installation
# Clone the repo
git clone https://github.com/user/har-mcp.git
cd har-mcp
# Install in editable mode (recommended)
pip install -e .
# Or install dependencies only
pip install -r requirements.txtConfiguration
All configuration via environment variables:
Variable | Default | Description |
| (unrestricted) | Restrict file access to this directory — strongly recommended |
|
| Maximum HAR file size in bytes |
|
| Max body chars returned to LLM |
|
| Redact sensitive headers/cookies by default |
|
| Threshold for switching to SQLite backend |
|
| Logging level |
MCP Client Setup
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"har-analysis": {
"command": "python",
"args": ["-m", "har_mcp.server"],
"env": {
"HAR_ALLOWED_ROOT": "/path/to/your/har-files"
}
}
}
}On Windows, use the full Python path if python isn't found:
{
"mcpServers": {
"har-analysis": {
"command": "C:\\Users\\you\\AppData\\Local\\Programs\\Python\\Python313\\python.exe",
"args": ["-m", "har_mcp.server"],
"env": {
"HAR_ALLOWED_ROOT": "C:\\path\\to\\har-files"
}
}
}
}Claude Code
Add to your project's .mcp.json or run:
claude mcp add har-analysis -- python -m har_mcp.serverCursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"har-analysis": {
"command": "python",
"args": ["-m", "har_mcp.server"]
}
}
}VS Code (Cline / Roo Code)
Add to MCP settings in your VS Code config.
Available Tools
Phase 1 — Discovery
Tool | Description |
| Load a HAR file from disk, returns |
| List requests with filters (method, domain, path, status, search, limit, offset) |
| Full request details — headers, cookies, query params, postData |
| Full response — status, headers, cookies, content, timings |
| Full-text search across URL, headers, request body, response body |
| Unique endpoints with counts and status codes |
| All domains with request counts |
| Aggregate stats — methods, status codes, response times, sizes |
Phase 2 — Analysis
Tool | Description |
| Deep endpoint analysis — parameter classification, header patterns |
| Diff two requests across URL, headers, cookies, query, body, response |
| Find 4xx/5xx/failed requests |
| Find requests exceeding a time threshold |
| Trace where a specific value (token, cookie, ID) appears |
| Extract authentication mechanisms from the traffic |
| Infer request relationships (timing, cookies, tokens) |
Phase 3 — Advanced
Tool | Description |
| Detect REST, GraphQL, SSE, WebSocket, form submission |
| Browser page flow overview — API calls vs static assets |
| Convert request to cURL command (secrets redacted by default) |
Example Workflow
1. Load the HAR file
→ load_har("recording.har")
→ Returns: har_id, version, request_count, domains
2. Get an overview
→ get_statistics(har_id)
→ See methods, status codes, avg response time, largest responses
3. Find all API endpoints
→ list_endpoints(har_id)
→ GET /api/users (12x, [200])
→ POST /api/login (3x, [200, 401])
4. Search for authentication
→ search_requests(har_id, query="token", scope="all")
→ Find where tokens appear in headers, bodies, cookies
5. Trace a specific token
→ trace_value(har_id, value="eyJ...")
→ See it first appear in POST /login response, then used in subsequent requests
6. Analyze the auth flow
→ analyze_auth(har_id)
→ Detects: Bearer token, session cookie, CSRF token
7. Compare two similar requests
→ compare_requests(har_id, request_a=5, request_b=8)
→ See what changed (different query params, different response)
8. Export as cURL
→ export_request_as_curl(har_id, request_id=12)
→ Ready-to-run command with secrets redactedSecurity Model
Protection | Description |
Local only | Zero outbound HTTP requests — everything stays on your machine |
Read-only | HAR files are never modified |
Path traversal | File access validated against |
No code execution | HAR content is never evaluated (no JS, HTML, SQL execution) |
Secret redaction |
|
Binary content | Only metadata returned for images/PDFs/etc., never raw binary |
Body truncation | Large bodies truncated with |
Log sanitization | Secrets stripped from all log output |
To see unredacted values, pass redact_secrets: false to get_request or get_response.
Testing
# Install test dependencies
pip install -e ".[dev]"
# Run all tests (111 tests)
pytest tests/ -v
# Run specific test file
pytest tests/test_parser.py -v
pytest tests/test_security.py -v
pytest tests/test_tools.py -v
# Run with coverage
pytest tests/ --cov=har_mcpLimitations
SQLite backend for very large HARs (>100MB) is planned but not yet implemented
WebSocket frame content is not parsed
Request chain inference is heuristic — relationships are inferred, not definitive
Some non-standard compressed bodies may not decode
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
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
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
AI Visibility and Content Intelligence tools for Claude and MCP-compatible agents.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to call web APIs extracted from HAR files, turning browser traffic into MCP tools.181MIT
- AlicenseAqualityCmaintenanceAn MCP server for parsing and analyzing HAR files, enabling AI assistants to inspect network traffic with automatic redaction of sensitive authentication headers.7MIT
- AlicenseNot gradedqualityCmaintenanceProfessional MCP server for HAR (HTTP Archive) network captures, enabling AI agents to extract endpoints, detect secrets, generate code, and export to Postman/OpenAPI.26MIT
- AlicenseAqualityAmaintenanceEnables AI agents to inspect Shadow Monitor capture files locally, with tools to load bundles, find errors, search network requests, and replay user actions.1171MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/karimi-mohammad/har-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server