Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Nb Search

БесплатноНе проверен

Unified web search, URL-to-Markdown reader & deep research for AI agents — TypeScript SDK, CLI, 3-tool MCP server & Agent Skill (zero-key + BYOK, RRF fusion).

GitHubEmbed

Описание

Unified web search, URL-to-Markdown reader & deep research for AI agents — TypeScript SDK, CLI, 3-tool MCP server & Agent Skill (zero-key + BYOK, RRF fusion).

README

nb-search — Give your agent a wider world.

Unified web search, URL-to-Markdown extraction, RRF multi-source fusion, and async deep research for AI agents and TypeScript apps.

npm version CI Node.js License: MIT Docs

Quick start · MCP & Skill · Sources · Comparison · Docs

English · 简体中文

Wiring separate MCP servers for Exa, Tavily, Firecrawl, Context7, and Playwright burns 15k–35k context tokens before your first prompt, scatters API keys across assistant configs, and breaks on single-key 429 limits or 60-second stdio timeouts. @nb-corp/nb-search replaces that stack with one 3-tool MCP server (~1.4k tokens), an Agent Skill (~110 idle tokens), a CLI, and a TypeScript SDK—all running locally or against your self-hosted nb-search-cloud service.

Your agent or app → nb-search → search engines, documents and research providers

Why nb-search?

  • Context economy: Load 3 MCP tools (search, fetch, capabilities, ~1.4k schema tokens) or mount the Agent Skill (~110 tokens at rest) instead of 20+ vendor tool definitions.
  • Zero-key instant start + 34 built-in providers: Search the web (duckduckgo.search), Hacker News (hackernews.search), Wikipedia (wikipedia.search), GitHub (github.repositories), and library docs (context7.docs) or read URLs (direct.fetch + jina.reader) immediately with zero keys—then plug in Exa, Tavily, Brave, Firecrawl, Perplexity, Serper, Kagi, Bocha, DeepSeek, Linkup, Nimble, Octen, You.com, Valyu, Parallel, Keenable, TinyFish, Grok, Zhipu, SearXNG, opt-in Zhihu, or declarative custom-http endpoints.
  • RRF multi-source fusion: Query multiple engines in parallel (--lanes exa.search,tavily.search,brave.search), canonicalize URLs, deduplicate hits, and rank with Reciprocal Rank Fusion and per-source provenance.
  • 32-key rotation & failover: Supply comma-separated key pools per provider with automatic 429 Retry-After cooldowns, 402 quota-exhaustion skipping, 401/403 quarantine, and bounded 5xx retries.
  • Direct-first URL credit protection: Static HTML, GitHub raw/API responses, npm metadata, and PyPI JSON resolve locally via Defuddle (direct.fetch) first—surfacing Cloudflare or bot walls explicitly instead of wasting paid scrape credits.
  • Detached async jobs without 60s timeouts: Run 10–15 minute deep research (tavily.research, gma.research), site crawls (tavily.crawl), and headless Chromium renders (browser.render) via run/get/read/cancel.

Quick start

Requires Node.js >= 24.15. Install globally and run three zero-key commands right away:

npm install -g @nb-corp/nb-search

nb-search search "WebAssembly component model"
nb-search search "react useOptimistic" --lane context7.docs
nb-search fetch "https://nodejs.org/en/about/releases/" --pipeline direct.fetch

Every command writes structured 3.0 JSON to stdout:

{
  "schema_version": "3.0",
  "action": "run",
  "execution": "sync",
  "status": "succeeded",
  "documents": [
    {
      "url": "https://nodejs.org/en/about/releases/",
      "source_lane": "direct.fetch",
      "content": "# Node.js Releases\n..."
    }
  ]
}

Public DuckDuckGo HTML challenges or rate limits fail explicitly rather than returning fake empty results, and errors never silently switch to a paid provider. Add your own keys to unlock RRF multi-engine fusion or detached async research:

export NB_SEARCH_EXA_API_KEY="YOUR_API_KEY"
export NB_SEARCH_TAVILY_API_KEY="YOUR_API_KEY"

nb-search search "PostgreSQL logical replication latency" --lanes exa.search,tavily.search --freshness py
nb-search search "2026 WebAssembly server runtime benchmarks" --lane tavily.research --execution async --idempotency-key wasm-2026
nb-search search get "<job_id>" --wait 240000
nb-search search read "<job_id>" --all

MCP & Agent Skill

MCP Server (Claude Code / Codex / Cursor)

Add nb-search-mcp to your host's mcpServers config (env is optional for zero-key sources):

{
  "mcpServers": {
    "nb-search": {
      "command": "npx",
      "args": ["-y", "--package=@nb-corp/nb-search", "nb-search-mcp"],
      "env": {
        "NB_SEARCH_TAVILY_API_KEY": "YOUR_API_KEY",
        "NB_SEARCH_EXA_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Agent Skill & TypeScript SDK

  • Agent Skill (~110 idle tokens): After npm install -g @nb-corp/nb-search, point your agent's skill directory to $(npm root -g)/@nb-corp/nb-search/skills/nb-search (or node_modules/@nb-corp/nb-search in a project; see SKILL.md).
  • TypeScript SDK: Install npm install @nb-corp/nb-search (enable skipLibCheck: true in tsconfig.json; integration details):
import { createNbSearchRuntime } from '@nb-corp/nb-search';

const runtime = createNbSearchRuntime();
const hits = await runtime.search({ action: 'run', query: 'SQLite WAL concurrency' });
const page = await runtime.fetch({
  action: 'run',
  source: { kind: 'url', url: 'https://nodejs.org/en/about/releases/' },
  pipeline: 'direct.fetch'
});

if (page.action === 'run' && page.execution === 'sync' && page.status === 'succeeded') {
  console.log(page.documents[0]?.content);
}
const catalog = await runtime.capabilities();

Supported sources

nb-search ships with 34 built-in providers and 55 default lanes (34 search lanes + 21 fetch pipelines), plus declarative custom-http and local script adapters. Full schemas, options, and endpoint contracts live in the Sources Catalog.

Category Built-in & Opt-in Providers Lane / Pipeline IDs Auth
Zero-Key Out-of-the-Box DuckDuckGo (default), Hacker News, Wikipedia, GitHub, Context7, Keenable (public mode), Direct Fetch (Defuddle), Jina Reader, Wayback Machine duckduckgo.search, hackernews.search, wikipedia.search, github.repositories, context7.docs, keenable.search, keenable.fetch, direct.fetch, jina.reader, wayback.fetch Keyless (optional token/key for higher GitHub, Context7, Jina, or Keenable limits)
BYOK Web, News & Regional Search Exa, Tavily, Brave (+ LLM Context), Firecrawl, Parallel, TinyFish, Perplexity, Octen, Serper (+ News), Nimble, You.com, Linkup, DeepSeek, Valyu, Kagi, Bocha, Zhipu, SearXNG, Zhihu (opt-in) exa.search, tavily.search, brave.search, brave.llm-context, firecrawl.search, parallel.search, tinyfish.search, perplexity.search, octen.search, serper.search, serper.news, nimble.search, you.search, linkup.search, deepseek.search, valyu.search, kagi.search, bocha.search, zhipu.search, searxng.search, zhihu.search, zhihu.global Provider API key (supports split search_base_url/fetch_base_url and auth_mode; searxng.search needs base_url; Zhihu requires explicit opt-in)
BYOK & Browser URL Reading Exa Contents, Tavily Extract, Firecrawl Scrape, Parallel Extract, TinyFish Fetch, Perplexity Context, Octen Extract, Serper Scrape, Nimble Extract, You.com Extract, Linkup Fetch, DeepSeek Fetch, Valyu Contents, Kagi Extract, OpenAI-Compatible Fetch, Playwright Render, Local File/Inline exa.contents, tavily.extract, firecrawl.scrape, parallel.extract, tinyfish.fetch, perplexity.context, octen.extract, serper.scrape, nimble.extract, you.extract, linkup.fetch, deepseek.fetch, valyu.contents, kagi.extract, oac.fetch, browser.render (async), direct.local (no egress) Provider API key (browser.render uses optional playwright >= 1.50.0)
Synthesis, Crawl, Deep Research & Custom Providers Exa / Tavily / Grok / OAC / opt-in Zhihu Synthesis, Tavily Crawl, Tavily Research, Grok Multi-Agent Research, Declarative custom-http, Local Script exa.synthesis, tavily.synthesis, grok.synthesis, grok.x-synthesis, oac.synthesis, zhihu.synthesis, tavily.crawl, tavily.research, gma.research, custom-http (sync, SSRF-guarded), custom .js/.ts (example) Provider key/endpoint, declarative HTTP config, or trusted local module

Built-in URL routing (kiki-common-direct@1) pins known plain-text raw.githubusercontent.com files, api.github.com repository/README/release JSON, npm package metadata, and PyPI JSON to direct.fetch only—never appending paid fallbacks unless your fetch.routing.rules explicitly ask for them. Set NB_SEARCH_CONFIG_COMPAT=tolerant (or compat: "tolerant") when sharing one config across older/newer builds to downgrade unknown providers/lanes into structured warnings instead of startup failures. URL routing & host APIs →

Multi-key rotation & quota inspection

Pass up to 32 distinct comma-separated keys in any credential variable (NB_SEARCH_TAVILY_API_KEY="key-one,key-two"). Keys default to round-robin, or fail over in strict order with "key_strategy": "priority":

{
  "schema_version": "4",
  "provider_instances": {
    "tavily.default": { "key_strategy": "priority", "balance_ttl_ms": 600000 }
  }
}

Both strategies quarantine 401/403 keys for the runtime's lifetime, cool 429 keys using Retry-After (or 60s), skip 402 exhausted keys until TTL expiry or manual refresh, and retry 5xx/network errors twice before rotating. In the local SDK, call await runtime.keyUsage({ provider_instance_id: 'tavily.default', refresh: true }) to inspect redacted key state and remaining quota for supported providers without exposing secret values. See Configuration & Multi-Key Rotation for provider-specific meter rules.

How it compares

Capability Stacking 4–5 Vendor MCPs Multi-Vendor BYOK Wrappers (mcp-omnisearch) Keyless Scrapers (open-webSearch) @nb-corp/nb-search
Context Overhead ~15k–35k tokens across 20+ tools ~4k–8k tokens across per-vendor tools ~1k–2k tokens ~1.4k tokens (3-tool MCP) / ~110 tokens (Skill)
Zero-Key Start No (keys required per server) No (API keys required upfront) Yes (public HTML scraping only) Yes (DuckDuckGo, GitHub, Context7, Defuddle, Jina, Wayback) + BYOK
Multi-Engine RRF Fusion Manual prompt-level merging Single provider per call Multi-engine HTML without API provenance URL canonicalization + RRF + per-source provenance
Multi-Key 429 Failover None Single key per provider None (IP rate-limited) Up to 32 keys/provider, Retry-After cooldown & 402 skip
URL Credit Protection Every URL hits paid scraper Direct vendor scrape call Basic HTML fetch Defuddle Direct-first + ordered URL routing + challenge detection
>60s Async Research & Render Hits 60s MCP stdio timeout Sync call timeouts on long tasks Not supported Detached run/get/read/cancel jobs (up to 60 min)

FAQ

MCP server or Agent Skill—which should I pick? Use the Agent Skill in CLI-capable coding agents (Claude Code, Codex, OpenCode) to keep idle context near ~110 tokens. Use nb-search-mcp in desktop or IDE hosts (Claude Desktop, Cursor) that expect MCP stdio tools.

Does nb-search silently fall back to paid APIs when a free source fails? Never. Search errors on duckduckgo.search or explicit lanes fail closed, and Direct-only URL routes (raw.githubusercontent.com, api.github.com, npm, PyPI) never append paid scrapers unless you configure a custom chain.

When should I use nb-extract or paper-search-cli instead? Use nb-search for web discovery, URL reading, RRF fusion, and deep research. Route local PDF/Office/OCR document conversion and asset export to nb-extract, and DOI/arXiv/patent/citation graphs to paper-search-cli.

How can a team share keys without distributing .env files? Deploy nb-search-cloud and connect the same CLI (--profile cloud) or SDK (createNbSearchRemoteClient()) over HTTP Protocol v1.

From source & deeper docs

To build and verify from a git checkout ([email protected]):

git clone https://github.com/NB-Corp/nb-search.git
cd nb-search
pnpm install --frozen-lockfile && pnpm build
node scripts/nb-search.mjs capabilities

Documentation · Configuration · URL Fetch & Routing · Async Jobs · CLI Reference · Runtime Contract · llms.txt

Found a broken source or integration gap? Open an issue (keep credentials out of reports). MIT · Built by NB-Corp

from github.com/NB-Corp/nb-search

Установка Nb Search

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/NB-Corp/nb-search

FAQ

Nb Search MCP бесплатный?

Да, Nb Search MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Nb Search?

Да, требуются переменные окружения: NB_SEARCH_EXA_API_KEY, NB_SEARCH_TAVILY_API_KEY. Unyly подставит их в конфиг при установке.

Nb Search — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Nb Search в Claude Desktop, Claude Code или Cursor?

Открой Nb Search на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Nb Search with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development