
hardly
io.github.b1tninjaPublished by GitHub account b1tninjav1.0.0Updated Oct 29, 2026
Generic HAR analysis MCP server: index and query captures without burning tokens on raw files.
Overview
Indexes browser HAR captures into SQLite and exposes small, redacted, paginated tools so an assistant can map endpoints, auth flows and data shapes.
- What you can do
- Open and index HAR captures, then get session overviews, site briefs and reports with severity findings
- List and inspect endpoints, forms, labels, data and media kinds, and how credentials and authentication work
- Export findings as OpenAPI specs or client code, writing files only when overwrite is allowed
- Drive a real browser to capture HARs headlessly or interactively, with confirmation required
- Guide the assistant with task plans, mode selection, help topics, prompts and bundled docs
- When to use it
- Useful when you have a large HAR capture and want an assistant to reverse-engineer an API, document endpoints, find an auth flow or build a client SDK without reading the raw file. Also fits when only a URL is known and a capture must be recorded first.
- Requirements
- Local Python 3.10+ process, typically run with uvx hardly serve over stdio; pip, pipx or uv tool install also work. Browser capture needs the capture extra plus a Playwright Chromium install, and headed capture needs a display. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open hardly in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
hardly
[PyPI] [Python] [CI] [License: MPL-2.0]
A generic, content-neutral CLI and MCP server for reading and capturing HAR files and turning them into what a client SDK needs: endpoints, forms and labels, data and media kinds, and how credentials and authentication work.
Why
Browser HAR captures are often tens of megabytes. Agents that read them burn tokens and still miss structure. hardly streams a HAR into SQLite once, then exposes small, redacted, paginated tools over MCP (and a matching CLI). Bodies are truncated, secrets are redacted, lists are paginated: you hardly need the whole file.
hardly knows technologies (HTML forms, ASP.NET WebForms, GraphQL, OAuth/OIDC, cookies/CSRF, bot walls, ArcGIS REST...) and resource kinds (JSON, CSV, HTML tables, PDF, images...), not any particular site. Downstream SDKs keep their own recipes and vocabularies. See docs/scope.md.
Install
To work on hardly itself: pip install -e ".[dev]" (CONTRIBUTING.md).
Python 3.10+. Give an output path to save; otherwise nothing is written. Everything lives in
memory unless you pass output_path (hardly session open HAR -o index.db). Python:
with open_session(har) as s: ... (integrating.md).
60-second quick start
For agents, start with hardly_guide_task_plan(goal, har_path, url) (CLI:
hardly guide task-plan --goal ...): it returns an ordered plan with example calls and the current
environment state.
Names tell the effect
The CLI and the MCP server share one vocabulary: the command is the tool name without hardly_
(hardly_session_open is hardly session open HAR, hardly_send_entry is hardly send entry HAR 12 --confirm).
Merged tools take a sections list, for example hardly_auth_report(sections=['credentials', 'cookies']). Reference: docs/tools.md (71 tools), docs/cli.md
(commands); stability promise: docs/api-stability.md.
Three modes
After any capture, continue in archive mode on the returned session_id. hardly never evades
captchas or bot walls: it identifies them and tells you to stop, ask a person, or re-run elsewhere
(docs/gate-policy.md). Details: docs/capture.md.
Install and run without cloning
MCP client config for the published package:
Browser capture needs a local install ([capture] extra, then python -m playwright install chromium;
headed capture needs a display). The container image ghcr.io/b1tninja/hardly (multi-arch, built on each
release) is for archive/headless analysis only; mount your working directory at /workspace.
Release and verification details: docs/releasing.md.
MCP setup (Cursor and others)
Local venv (recommended; headed capture needs a display):
On Windows use ...\\.venv\\Scripts\\python.exe. hardly serve starts the same server.
Docker (offline analysis only; mount your working directory):
Host paths under the mount map to /workspace/.... To skip building locally, use the published
image ghcr.io/b1tninja/hardly:latest in place of hardly-mcp:latest.
Agent onboarding
hardly_guide_task_plan,hardly_guide_mode,hardly_server_status(stale MCP? restart the server),hardly_guide_help(topic).- MCP prompts:
analyze_har,discover_apis,capture_portal,document_api,find_auth_flow,reverse_engineer_api,build_client_sdk,diagnose_blocked_capture,verify_client. - MCP resources:
hardly://cheatsheetandhardly://docs/<name>for the bundled docs. - Agent Skill:
hardly skill install [--dest DIR](default~/.claude/skills/hardly), orhardly skill print. Source: skills/hardly.
Documentation
Library use
Development and tests
Live soak against public demo sites (no private HARs): hardly soak live --list, then
hardly soak live (or --ids datatables-ajax,quotes-login,…). Catalog covers loopback
WebForms/token login, HTML/AJAX tables, form logins, GraphQL, and JSON/OpenAPI — see
hardly.live_targets and docs/test-targets.md.
CONTRIBUTING.md, AGENTS.md; release notes in
CHANGELOG.md.
Security
HAR files often contain live passwords and session tokens. hardly redacts by default, but treat captures as secrets: do not commit or share them, and rotate credentials if one leaked. Use hardly only on targets you are authorised to access. See SECURITY.md.
License
MPL-2.0. Generated output (stubs, OpenAPI, reports) is not covered; see NOTICE.md.
Source: README.md at commit 5d8ee69
Tools
0Version history
1- v1.0.0LatestOct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts