Token-optimized HTTP client for LLMs: fetches any URL as clean markdown. CLI and MCP server.
MCP Server: io.github.MikkoParkkola/nab
The io.github.MikkoParkkola/nab MCP server provides a token-optimized HTTP client for LLMs. It fetches any URL and returns the content as clean Markdown. The project includes both a CLI and an MCP server, targeting URL-to-Markdown workflows for language model applications.
๐ ๏ธ Key Features
Token-optimized HTTP client for LLMs
Fetches any URL
Outputs content as clean Markdown
Provides both CLI and MCP server
๐ Use Cases
Convert web pages to clean Markdown for LLM ingestion
Retrieve remote content for downstream processing in an MCP tool workflow
โก Developer Benefits
Markdown-formatted text output for model-friendly inputs
Works over HTTP to obtain content from arbitrary URLs
MCP server interface alongside a CLI
โ ๏ธ Limitations
No additional constraints, supported protocols, or configuration details are provided in the available data
Token-optimized web fetcher + multilingual ASR + URL watcher. MCP 2025-11-25 and 2026-07-28 (partial: a call that does not wait). Rust. macOS arm64 first, cross-platform.
demo
nab is a single Rust binary that does three things very well: it fetches any URL as clean markdown (with your real browser cookies and anti-bot evasion), it analyzes any audio or video file with on-device multilingual ASR and speaker diarization, and it watches any URL for changes and pushes notifications when content moves. Everything runs locally. There are no API keys to set up by default. The output is shaped for LLM context windows.
Why nab
Token-lean by design. nab returns only what an LLM actually needs โ clean markdown, BM25-lite query-focused extraction, and structure-aware token budgets โ cutting the token cost of web research instead of dumping raw HTML into your context window.
Multimodal, fully on-device. Transcribe and diarize any audio or video (FluidAudio / Parakeet TDT v3 on the Apple Neural Engine โ 131ร realtime on a 2-hour clip, 25 EU languages, word-level timestamps, optional Qwen3-ASR for zh/ja/ko/vi) and OCR images via Apple Vision (15 languages, ~10โ50 ms). No cloud, no API keys.
Authenticated reach. Real browser cookies, 1Password auto-login with TOTP/MFA, WebAuthn passkeys, fingerprint spoofing and WAF evasion โ reach internal dashboards, SaaS apps, and paywalled research with the same command as a public URL.
Watch the web. Subscribe to any URL via MCP resources โ conditional GETs, semantic diff, adaptive backoff. RSS for the entire web.
Prompt-injection defense, on by default. Hidden instructions addressed to your AI are surfaced to you, not silently executed by your model โ see Security.
Everything is a single local Rust binary. No cloud backend, no API keys by default, output shaped for LLM context windows.
Fetch any URL as clean markdown. HTTP/3, browser cookie injection (Brave / Chrome / Firefox / Safari / Edge / Dia), 1Password auto-login, fingerprint spoofing, fetch-time YARA-X redaction for prompt-injection/exfil signatures, 12 site providers. MCP fetch also supports query-focused extraction, readability, and token budgets.
nab browser <url>
Explicit opt-in browser rendering for JS-heavy pages through a configured Chrome DevTools Protocol WebSocket endpoint. No Chromium is bundled and default nab fetch never auto-launches a browser or remote provider.
nab analyze <video|audio>
Transcribe and diarize. FluidAudio (Parakeet TDT v3) on Apple Neural Engine, 131x realtime on a 2-hour clip, word-level timestamps, 25 EU languages, optional Qwen3-ASR for zh/ja/ko/vi, optional active reading via MCP sampling.
nab watch add <url>
Monitor a URL and push notifications via subscribable MCP resources. RSS for the entire web. Conditional GETs, semantic diff, adaptive backoff.
nab models fetch <name>
Persistent install of inference model binaries. Supports fluidaudio (default on macOS Apple Silicon), sherpa-onnx (cross-platform Parakeet TDT, ~30ร realtime CPU), and whisper (universal fallback, whisper-large-v3-turbo, 99 langs).
Apple Vision OCR engine. 15 languages. Apple Neural Engine accelerated. ~10-50 ms per image. macOS only.
Security: prompt-injection defense
Web pages increasingly carry instructions written for the AI, not for you โ concealed in HTML comments, display:none / aria-hidden text, data-ai / data-mcp / data-agent attribute payloads, or WebMCP manifests. Fetch such a page with a naive tool and those hidden instructions land straight in your model's context, where they can be acted on. This is the prompt-injection-as-phishing class of attack.
nab treats every fetched page as hostile input and runs two local, non-networked guards before any content reaches your agent โ on by default, no flag, no setup:
Secure Ingestion guard โ detects and strips machine-targeted markup that is invisible to humans (AI-addressed comments, hidden display:none / aria-hidden text, agent-only data-* payloads, WebMCP advertisements) and reports each detection at Info / Warn / Block severity, so you see what a page tried to tell your agent instead of it being silently executed.
YARA-X signature guard โ scans every returned body for prompt-injection, exfiltration, secret-leak, and obfuscation signatures, redacting matched sections by default. Set NAB_YARA_ACTION=refuse to block the fetch outright (or NAB_YARA_BYPASS=1 as an audited emergency opt-out).
The net effect: hidden instructions become visible to you, not executed by your model โ a strong reason to point your agent at nab fetch instead of a built-in web-fetch tool.
Licensing: both guards are Enterprise Edition modules โ free for nonprofit and other permitted noncommercial use under PolyForm Noncommercial 1.0.0 and the additional nonprofit permission in COMMERCIAL.md. Commercial use outside those permissions requires a commercial license (see the License section).
Installation
Homebrew (macOS, recommended)
bash
brew tap MikkoParkkola/tap
brew install nab
Pre-built binary (no Rust toolchain required)
Most users want this path โ these are ready-to-run binaries; nothing is compiled on your machine.
If you have cargo-binstall, it fetches the right pre-built binary automatically:
bash
cargo binstall nab
Otherwise download directly from GitHub Releases. Both the nab CLI and the nab-mcp server ship for every platform below, alongside checksums-sha256.txt:
Platform
CLI binary
MCP server binary
macOS Apple Silicon
nab-aarch64-apple-darwin
nab-mcp-aarch64-apple-darwin
macOS Intel
nab-x86_64-apple-darwin
nab-mcp-x86_64-apple-darwin
Linux x86_64 (glibc)
nab-x86_64-unknown-linux-gnu
nab-mcp-x86_64-unknown-linux-gnu
Linux x86_64 (static musl)
nab-x86_64-unknown-linux-musl
nab-mcp-x86_64-unknown-linux-musl
Linux ARM64 (glibc)
nab-aarch64-unknown-linux-gnu
nab-mcp-aarch64-unknown-linux-gnu
Linux ARM64 (static musl)
nab-aarch64-unknown-linux-musl
nab-mcp-aarch64-unknown-linux-musl
Windows x64
nab-x86_64-pc-windows-msvc.exe
nab-mcp-x86_64-pc-windows-msvc.exe
Example install for macOS Apple Silicon (substitute the filename for your platform):
Builds nab locally โ requires the Rust toolchain (1.95 or newer) and takes a few minutes:
bash
cargo install nab
From source
bash
git clone https://github.com/MikkoParkkola/nab.git
cd nab
cargo install --path .
Avoiding duplicate installs
If you install nab through more than one channel (for example a Homebrew tap
andcargo install), the copy that wins depends on PATH order. On many
setups /opt/homebrew/bin comes before ~/.cargo/bin, so a Homebrew binary can
shadow a newer cargo-installed one โ and nab --version then reports the older
version.
Run the built-in diagnostic to see every nab on your PATH, which one wins,
and their versions:
bash
nab doctor
If the binary on your PATH is the stale one, its doctor may predate this
command; invoke the newer install by full path to diagnose, e.g.
~/.cargo/bin/nab doctor. To resolve, keep a single install channel
(brew uninstall nab or cargo uninstall nab), or reorder PATH so the
directory of the install you want comes first.
See Tools for the full tool list and MCP integration for capabilities and HTTP transport.
Claude Code plugin
This repository includes a local Claude Code plugin in plugin/. It bundles nab MCP auto-registration with the Claude Elite research, url-insight, wayback, ia, and oreilly skills.
bash
claude --plugin-dir ./plugin
The plugin exposes the /nab workflow shape for fetch, authenticated Brave-cookie fetches, archive retrieval, and multi-source research. It keeps nab's auth-aware path front and center: nab fetch --cookies brave <url> for existing browser sessions and nab fetch --1password <url> for 1Password/TOTP flows.
Usage
Fetch
bash
# Basic fetch โ auto-detects browser, returns markdown
nab fetch https://example.com
# Use cookies from a specific browser
nab fetch https://github.com/notifications --cookies brave
# 1Password auto-login (TOTP/MFA supported)
nab fetch https://internal.company.com --1password
# Google Workspace (Docs, Sheets, Slides) with comments
nab fetch --cookies brave "https://docs.google.com/document/d/DOCID/edit"# Output JSON with confidence scores
nab fetch https://example.com --format json
# Batch fetch with parallelism
nab fetch --batch urls.txt --parallel 8
# Explicit browser rendering for JS-heavy pages
NAB_BROWSER_CDP_WS=wss://... nab browser https://example.com
nab fetch https://example.com --render --browser-cdp-url wss://...
Common flags for fetch:
Flag
Description
--cookies <browser>
auto, brave, chrome, firefox, safari, edge, none
--1password / --op
1Password credential lookup + auto-login
--proxy <url>
HTTP or SOCKS5 proxy
--format <fmt>
full (default), compact, json
--raw-html
Skip markdown conversion
--readability
Force readability extraction for generic HTML pages
--max-output-tokens <n>
Apply an output token envelope; returned markdown uses 80% for headroom
--remote-fallback
Opt in to remote thin-content recovery via r.jina.ai; avoid for internal, authenticated, or sensitive URLs
--render / --interactive
Opt in to configured CDP browser rendering for JS-heavy pages; requires NAB_BROWSER_CDP_WS or --browser-cdp-url
--diff
Show what changed since the last fetch
-X <method>-d <data>
HTTP method + body
-o <path>
Write body to file
MCP fetch additionally supports focus, readability, max_tokens, and session parameters for query-focused extraction, readability extraction, structure-aware token budgets, and persistent encrypted cookie sessions.
Analyze
nab analyze transcribes audio and video files locally. The default backend on macOS arm64 is FluidAudio, which runs Parakeet TDT v3 on the Apple Neural Engine.
bash
# Download the ASR model (~600 MB, one-time)
nab models fetch fluidaudio
# Transcribe a video
nab analyze interview.mp4
# Add speaker diarization (PyAnnote community-1)
nab analyze interview.mp4 --diarize
# Force a language hint (BCP-47)
nab analyze podcast.mp3 --language fi# Word-level timestamps
nab analyze talk.mp4 --word-timestamps
# Active reading: nab uses MCP sampling to look up references mentioned in the audio
nab analyze interview.mp4 --active-reading
# Expose speaker embeddings for matching against hebb's voiceprint database
nab analyze interview.mp4 --diarize --include-embeddings
# Output JSON
nab analyze podcast.mp3 --format json
Real numbers from a 2 h 09 m English audio file (Karen Hao interview, MacBook Pro M-series):
Metric
Value
Wall time
59.6 s
Realtime factor
131x
FluidAudio mean confidence
97.18 %
Audio extraction (ffmpeg)
~650x realtime
Backend
Platform
Languages
Diarization
fluidaudio (default on macOS arm64)
macOS arm64
25 EU languages, +zh/ja/ko/vi via Qwen3-ASR (opt-in)
PyAnnote community-1
sherpa-onnx
Linux/x86, macOS, Windows
Parakeet ONNX, 25+ langs
sherpa-onnx pyannote-seg-3.0
whisper-rs
Universal fallback
whisper-large-v3-turbo, 99 langs
none
Watch
nab watch turns any URL into a subscribable resource. MCP clients receive notifications/resources/updated when the content changes.
The poller uses conditional GETs (If-None-Match, If-Modified-Since), so 304 responses cost effectively nothing. Watches with five consecutive failures auto-mute. Adaptive backoff applies on 429 and 503.
Models
bash
nab models list # show installed model versions
nab models fetch fluidaudio # download FluidAudio binary + Parakeet weights
nab models update fluidaudio # check for upstream updates
nab models verify fluidaudio # checksum + smoke test
Both whisper and sherpa-onnx ship as cross-platform fallbacks alongside the macOS-default fluidaudio backend.
MCP integration
nab-mcp is a native Rust MCP server. It runs over stdio (default) or Streamable HTTP. It is not fully compliant with 2026-07-28. A call that does not wait is served on that revision, including fetch, fetch_batch, submit, auth_lookup, fingerprint, validate, benchmark, watch_create, watch_list, and watch_remove. login, analyze, and task are served only when that call would not elicit or sample. A 2026-07-28 call that would elicit or sample returns a JSON-RPC error and does not wait. Sessions, elicitation, sampling, and tasks stay on 2025-11-25. A 2026-07-28 request needs no initialize and no session id. On HTTP that call sends the matching mcp-protocol-version header. On stdio the success or the JSON-RPC error may be the first message. A crates.io build has no SDK patch, so that nab-mcp compiles without the 2026 hook and does not serve 2026-07-28.
Also supported: gemini, amazon-q, lm-studio. This auto-detects the nab-mcp binary path, backs up your existing config, and adds the nab entry. Restart your client after installing.
Manual setup
Add to your MCP client configuration (~/.config/claude/mcp.json or equivalent):
validate โ Run the validation test suite against real websites (HTTP/2, HTTP/3, TLS 1.3, 1Password)
benchmark โ Time URL fetches over multiple iterations with min/avg/max stats
analyze โ Transcribe and diarize audio/video with multilingual ASR
watch_create โ Create a URL watch that emits MCP resource notifications when content changes
watch_list โ List active URL watches with their IDs, URLs, and polling status
watch_remove โ Remove a URL watch by ID
Builds compiled with the opt-in task Cargo feature also expose task, an experimental web-task entry that fetches and screens a seed URL and returns the API endpoints it discovers.
Site providers
nab detects URLs for 12 platforms and uses APIs or stable structured page data instead of broad HTML scraping.
Provider
URL pattern
Method
Twitter / X
x.com/*/status/*
FxTwitter API
Reddit
reddit.com/r/*/comments/*
JSON API
Hacker News
news.ycombinator.com/item?id=*
Firebase API
GitHub
github.com/*/*/issues/*, */pull/*
REST API
Google Workspace
Docs, Sheets, Slides
Export API + OOXML
YouTube
youtube.com/watch?v=*, youtu.be/*
oEmbed
Wikipedia
*.wikipedia.org/wiki/*
REST API
StackOverflow
stackoverflow.com/questions/*
API
Mastodon
*/users/*/statuses/*
ActivityPub
LinkedIn
linkedin.com/posts/*
oEmbed
Instagram
instagram.com/p/*, */reel/*
oEmbed
Substack
*.substack.com/p/*, substack.com/*/p/*
Article DOM (.available-content)
If no provider matches, nab falls back to standard HTML fetch + markdown conversion.
Architecture
nab is built around a small set of orthogonal subsystems: cmd/ (CLI), bin/mcp_server/ (MCP server), content/ (HTML / PDF / OCR pipeline), analyze/ (ASR + diarization + vision), watch/ (URL monitoring + subscriptions), auth/ (cookies + 1Password + WebAuthn), site/ (per-site providers), and the shared AcceleratedClient (HTTP/3 + connection pool + fingerprint store).
Locally generated master key for session encryption (non-Windows)
~/.nab/fingerprint_versions.json
Cached browser versions (auto-updates every 14 days)
~/.local/share/nab/watches/
URL watch state
~/.local/share/nab/models/
Installed inference model binaries
~/.nab/telemetry/
Daily heartbeat stamp and this product's install id
~/.revaluator/machine-id
Random id shared by the products on this machine
Optional plugin configuration at ~/.config/nab/plugins.toml. See docs/getting-started.md for plugin examples.
Environment variables
Variable
Purpose
HTTPS_PROXY / https_proxy
HTTPS proxy URL
HTTP_PROXY / http_proxy
HTTP proxy URL
ALL_PROXY / all_proxy
Proxy for all protocols
RUST_LOG
Logging level (e.g., nab=debug)
NAB_SSRF_ALLOW_PRIVATE
Set to 1/true to allow fetching private/internal addresses (RFC 1918, IPv6 ULA, CGN). Off by default. Loopback and cloud-metadata addresses stay blocked
NAB_SSRF_ALLOWLIST
Comma-separated CIDR/IP allowlist exempting only those private ranges (e.g. 10.252.0.0/16,192.168.1.5). Empty by default; preferred over the blanket flag above
NAB_KEYCHAIN_INTERACTION
Set to never for background automation: macOS Keychain reads cannot open UI, and prompt-capable Python cookie fallback is disabled
NAB_NO_TELEMETRY
Set to anything other than 0 or false to skip the daily heartbeat. NO_TELEMETRY and DO_NOT_TRACK do the same
NAB_TELEMETRY_ENDPOINT
Replace the heartbeat URL. An empty value leaves the default
ffmpeg for analyze and stream commands: brew install ffmpeg
1Password CLI (optional, for credential integration): see 1Password docs
Contributing
See CONTRIBUTING.md for development setup, code style guidelines, testing instructions, and pull request process.
Responsible use
This tool includes browser cookie extraction and fingerprint spoofing capabilities. They are intended for legitimate use cases โ accessing your own authenticated content, automated testing, sites where you have authorization. Use responsibly.
Troubleshooting
MCP server not connecting? Run nab-mcp directly in your terminal to see errors. Verify the binary exists with which nab-mcp. If installed via cargo install nab, both nab and nab-mcp should be on your $PATH.
Cookie extraction failing? Grant Full Disk Access to your terminal in System Settings > Privacy & Security > Full Disk Access (macOS). Browser cookies are stored in protected directories. Use --cookies brave to target a specific browser. Background tools that must never show a Keychain authorization dialog can run NAB_KEYCHAIN_INTERACTION=never nab .... Plaintext cookies and credentials that macOS can provide silently still work; credentials that require approval are unavailable, and Nab fails closed instead of invoking a prompt-capable fallback.
ASR model not found? Run nab models fetch fluidaudio to download the model (~542 MB). The model directory is ~/.nab/models/. Use nab models list to see what's installed.
Fetch returning HTML instead of markdown? Some sites block automated access. Try nab fetch URL --cookies brave to use your browser session, or nab fetch URL --1password for sites that need login.
Fetch returning thin content from a JavaScript app? Default nab fetch stays local-first and HTTP-only. For pages that need DOM execution, configure an external CDP endpoint with NAB_BROWSER_CDP_WS or --browser-cdp-url, then run nab browser URL or nab fetch URL --render. Remote browser providers may receive the URL and rendered page content; local browser cookies are not automatically available to remote browsers.
YARA-X guard redacted a fetch?nab fetch and MCP fetch scan returned bodies by default before saving or returning content. NAB_YARA_ACTION=refuse blocks instead of redacting. NAB_YARA_BYPASS=1 is an audited emergency opt-out.
"too many open files" on watch? Increase your ulimit: ulimit -n 4096. The default macOS limit (256) is too low for many concurrent watches.
src/security/ โ Secure Ingestion guard for stripping machine-targeted HTML directives and hidden metadata
crates/nab-yara-engine/ โ fetch-time YARA-X signature guard for prompt injection, exfiltration, secrets, and obfuscation
What this means in practice:
The MIT core is free for commercial and noncommercial use under MIT. EE modules remain free for nonprofit and other permitted noncommercial/public-benefit uses; sponsorship is optional.
Commercial use of EE modules outside those free-use permissions requires a separate commercial license for one organization and one named Mikko Parkkola product (nab), not each customer application or repository.
GitHub Sponsors: USD 100/month for a small business with up to five people in the whole organization, counting working owners, employees, and regular contractors; USD 500/month without a headcount limit. Separate direct-invoice offers are EUR 100/month and EUR 500/month, not currency conversions.
Both commercial tiers include internal use of the same published features with no per-tool, server, agent, or call charges. Support, SLA, unpublished repository access, resale, and third-party hosting rights are not included.
Optional support: Coffee USD 5 one-time, Supporter USD 5/month, or Sustainer USD 25/month. These support tiers do not purchase commercial rights.
Read COMMERCIAL.md for the complete licensing, eligibility, registration, free-use, and custom-payment rules, or email mikko.parkkola@iki.fi for direct invoicing and custom terms.
All releases prior to v0.9.0 remain entirely MIT and stay MIT forever.
Install
Configuration
Environment variables
NAB_SSRF_ALLOW_PRIVATE
Set to allow fetching private/internal IP addresses (corporate dashboards). Never unblocks loopback, link-local/cloud-metadata, or other always-denied ranges. Off by default.
NAB_SSRF_ALLOWLIST
Comma-separated list of private IP/CIDR ranges to exempt from the SSRF guard (e.g. 10.252.0.0/16,192.168.1.5). Narrower, preferred alternative to NAB_SSRF_ALLOW_PRIVATE. Empty by default.
NAB_WEBMCP_STRICT
Set to a truthy value to require fetched pages advertising a WebMCP manifest to match NAB_WEBMCP_OPT_IN before ingestion is allowed (defense against prompt injection via fetched content). Off by default.
NAB_WEBMCP_OPT_IN
Comma-separated allowlist consulted when NAB_WEBMCP_STRICT is enabled. Empty by default.
NAB_STATE_DIR
Overrides the directory used to persist session/cookie state (default: ~/.nab).
NAB_KEYCHAIN_INTERACTION
Controls whether cookie extraction may prompt macOS Keychain for authorization. Set to 'never' in automated/headless callers so a background fetch cannot open a GUI dialog.
NAB_OP_BIN
Path to the 1Password CLI binary used for credential retrieval during the login tool (default: op).
NAB_MCP_CLI_BIN
Path to the mcp-cli binary used for MCP-based credential retrieval (default: mcp-cli).
NAB_NO_TELEMETRY
Set to anything other than 0 or false to skip the daily heartbeat. NO_TELEMETRY and DO_NOT_TRACK do the same.
NAB_TELEMETRY_ENDPOINT
Replace the daily heartbeat URL. An empty value leaves the default.