# Nab

> Token-lean web microfetch for LLM agents: any URL → clean markdown via CLI, MCP server, and Claude Code plugin. Real browser-cookie auth, passkeys, anti-bot reach, on-by-default prompt-injection defense, plus on-device multimodal ASR/OCR. A single Rust binary — not a browser.

- **Type:** MCP server
- **Install:** `agentstack add mcp-mikkoparkkola-nab`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [MikkoParkkola](https://agentstack.voostack.com/s/mikkoparkkola)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MikkoParkkola](https://github.com/MikkoParkkola)
- **Source:** https://github.com/MikkoParkkola/nab
- **Website:** https://crates.io/crates/nab

## Install

```sh
agentstack add mcp-mikkoparkkola-nab
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# nab

[](https://github.com/MikkoParkkola/nab/actions/workflows/ci.yml)
[](https://crates.io/crates/nab)
[](https://crates.io/crates/nab)
[](https://docs.rs/nab)
[](https://www.rust-lang.org)
[](LICENSE.md)
[](https://modelcontextprotocol.io)
[](https://glama.ai/mcp/servers/MikkoParkkola/nab)
[](https://insiders.vscode.dev/redirect/mcp/install?name=nab&config=%7B%22command%22%3A%22nab-mcp%22%7D)
[](cursor://anysphere.cursor-deeplink/mcp/install?name=nab&config=%7B%22command%22%3A%22nab-mcp%22%7D)

Token-optimized web fetcher + multilingual ASR + URL watcher. MCP 2025-11-25 compliant. Rust. macOS arm64 first, cross-platform.

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](#security-prompt-injection-defense).

Everything is a single local Rust binary. No cloud backend, no API keys by default, output shaped for LLM context windows.

## Quick start

**Tell your AI assistant** (recommended):

> Read https://github.com/MikkoParkkola/nab and install nab as my web fetching and audio analysis MCP server

Your agent will install the binary, wire itself up, and start fetching. Works in Claude Code, Cursor, Windsurf, and any AI with terminal access.

**Or install and try manually:**

```bash
brew install MikkoParkkola/tap/nab                            # install
nab fetch https://news.ycombinator.com                        # fetch as markdown
nab models fetch fluidaudio                                   # download ASR model
nab analyze interview.mp4 --diarize                           # transcribe + identify speakers
nab watch add https://status.openai.com --interval 5m         # subscribe to changes
```

## Features

| Command | What it does |
|---------|--------------|
| `nab fetch ` | 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 ` | 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 ` | 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 ` | Monitor a URL and push notifications via subscribable MCP resources. RSS for the entire web. Conditional GETs, semantic diff, adaptive backoff. |
| `nab models fetch ` | 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). |
| `nab-mcp` | MCP 2025-11-25 server. stdio + Streamable HTTP. 12 tools, 4 prompts, 2+N resources, structured logging, sampling, roots, elicitation. |
| `nab::content::ocr` | 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](https://www.theregister.com/research/2026/05/29/chatgpt-prompt-injection-turns-web-pages-into-phishing-lures/5248137) 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 personal and non-commercial use** under [PolyForm Noncommercial 1.0.0](LICENSE-EE.md); **commercial / business use requires a commercial license** (see [COMMERCIAL.md](COMMERCIAL.md) and the [License](#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](https://github.com/MikkoParkkola/nab/releases/latest). 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):

```bash
shasum -a 256 -c checksums-sha256.txt --ignore-missing
chmod +x nab-aarch64-apple-darwin
mv nab-aarch64-apple-darwin /usr/local/bin/nab
xattr -d com.apple.quarantine /usr/local/bin/nab 2>/dev/null || true
```

### From crates.io (compiles from source)

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
**and** `cargo 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.

## MCP Configuration

Add to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):

```json
{
  "mcpServers": {
    "nab": {
      "command": "nab-mcp"
    }
  }
}
```

Or use the auto-installer:

```bash
nab mcp install                        # Claude Desktop (default)
nab mcp install --client claude-code   # Claude Code
nab mcp install --client cursor        # Cursor
nab mcp install --client windsurf      # Windsurf
nab mcp install --client codex         # OpenAI Codex CLI
nab mcp install --client vscode        # VS Code Copilot
nab mcp install --client zed           # Zed
nab mcp install --dry-run              # preview without writing
```

Also supported: `gemini`, `amazon-q`, `lm-studio`.

See [MCP integration](#mcp-integration) below for the full list of tools, capabilities, and HTTP transport.

## Claude Code plugin

This repository includes a local Claude Code plugin in [plugin/](plugin/README.md). 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 ` for existing browser sessions and `nab fetch --1password ` 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 ` | `auto`, `brave`, `chrome`, `firefox`, `safari`, `edge`, `none` |
| `--1password` / `--op` | 1Password credential lookup + auto-login |
| `--proxy ` | HTTP or SOCKS5 proxy |
| `--format ` | `full` (default), `compact`, `json` |
| `--raw-html` | Skip markdown conversion |
| `--readability` | Force readability extraction for generic HTML pages |
| `--max-output-tokens ` | 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 ` `-d ` | HTTP method + body |
| `-o ` | 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.

```bash
nab watch add https://news.ycombinator.com --interval 10m
nab watch add https://example.com/pricing --interval 1h --selector "table.pricing"
nab watch add https://api.openai.com/status --interval 5m --notify-on regression
nab watch list
nab watch logs 
nab watch remove 
```

Per-watch options:

| Flag | Default | Description |
|------|---------|-------------|
| `--interval ` | 1h | Polling interval (`5m`, `1h`, `24h`) |
| `--selector ` | none | CSS selector to scope diff to one element |
| `--notify-on ` | `any` | `any`, `regression`, `semantic` |
| `--diff ` | `semantic` | `text`, `semantic`, `dom` |

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 fully compliant with MCP protocol version `2025-11-25`.

### Quick setup (recommended)

```bash
nab mcp install                        # Claude Desktop (default)
nab mcp install --cl

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MikkoParkkola](https://github.com/MikkoParkkola)
- **Source:** [MikkoParkkola/nab](https://github.com/MikkoParkkola/nab)
- **License:** MIT
- **Homepage:** https://crates.io/crates/nab

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-mikkoparkkola-nab
- Seller: https://agentstack.voostack.com/s/mikkoparkkola
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
