hardly
Click on "Deploy 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., "@hardlyopen capture.har and list the API endpoints it calls"
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.
hardly
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.
Related MCP server: astrolabe-mcp
Install
pip install hardly # or: pipx install hardly / uv tool install hardly
pip install 'hardly[capture]' && python -m playwright install chromium # optional: record HARsTo 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
hardly guide mode # which of the three modes fits
hardly session overview path/to/capture.har # counts per server, method and status
hardly session site-brief path/to/capture.har # one-screen digest of a server-rendered site
hardly endpoint list path/to/capture.har --host api.example.com
hardly session report path/to/capture.har # one-pass findings with severity
hardly write export path/to/capture.har --format openapi -o api.yaml
hardly write export path/to/capture.har --format client_python --host api.example.com -o client.pyFor 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).
First word | Meaning |
| sends requests to a real server; needs |
| writes a file; refuses to replace one unless |
| drives or reads a real browser |
anything else | only reads loaded data |
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
Mode | When | Entry |
archive | A HAR file already exists |
|
headless | Only a URL; an agent can drive the page |
|
interactive | Bot wall, captcha, MFA, complex UI |
|
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
uvx hardly serve # MCP server over stdio (archive mode)
uvx --from 'hardly[capture]' hardly browser --help # with the Playwright capture extra
pipx install 'hardly[capture]' # or install the CLI permanently
hardly skill install # copy the Agent Skill into ~/.claude/skills/hardlyMCP client config for the published package:
{ "mcpServers": { "hardly": { "command": "uvx", "args": ["hardly", "serve"] } } }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):
{
"mcpServers": {
"hardly": {
"command": "/path/to/hardly/.venv/bin/python",
"args": ["-m", "hardly"]
}
}
}On Windows use ...\\.venv\\Scripts\\python.exe. hardly serve starts the same server.
Docker (offline analysis only; mount your working directory):
python scripts/build_image.py # builds hardly-mcp:latest (Windows: scripts\deploy-docker.ps1){
"mcpServers": {
"hardly": {
"command": "docker",
"args": ["run", "--rm", "-i",
"-v", "/home/me/work:/workspace",
"-e", "HARDLY_WORKSPACE=/workspace",
"hardly-mcp:latest"]
}
}
}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
Doc | Contents |
Index of all docs | |
What is in and out of scope; change checklist | |
One-page quick reference | |
Sessions, index, redaction, modes | |
Capture to client SDK, step by step | |
| |
Target catalog, | |
Headless and interactive capture, recipes, env vars | |
What is detected, per technology | |
Data flow and design rules | |
Common first-use problems | |
Generated reference for every MCP tool | |
CLI grammar and every command (generated) | |
What is public and the v1 compatibility policy | |
How the v1 names were chosen; old to new names |
Library use
from hardly import open_session
with open_session("capture.har") as s: # in memory; pass output_path= to save the index
print(s.conn.execute("select count(*) from entries").fetchone()[0])Development and tests
pytest -q # offline; HARDLY_LIVE_CAPTURE=1 enables live Playwright tests
ruff check .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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
A paid remote MCP for AI agent browser MCP session, built to return verdicts, receipts, usage logs,
Capture, inspect & debug HTTPS traffic across iOS, Android, browsers & backends — 304 MCP tools.
Undetectable cloud browser sessions for AI agents and scrapers. Navigate, extract, click, captcha.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that drives a headless or interactive Playwright browser and records every HTTP request/response into a shared web-archive store, making captured traffic searchable.-

astrolabe-mcpofficial
AlicenseNot gradedqualityBmaintenanceEnables agents to call a website's own authenticated GraphQL and REST APIs directly as typed MCP tools, derived from captured browser sessions instead of scraping HTML.MIT
DOMRay MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to inspect active authenticated browser sessions and runtime state, capture user breadcrumbs and network/error telemetry, and generate Playwright/Cypress tests or MSW mock handlers through standard MCP tools.2MIT- AlicenseNot gradedqualityBmaintenanceEnables agents to control a browser over HTTP MCP to open pages, take screenshots, click coordinates, and record audio/video as WebM.MIT