High-performance metasearch engine library written in Rust. Queries 29 search
engines across 8 categories in parallel, impersonates real browsers over
HTTP/2 (wreq), merges, deduplicates and ranks results locally, and exposes
the same engine to Rust, Python, a REST API, an MCP server for AI agents and
a web frontend.
Multi-engine meta-search library written in rust, with TLS/browser impersonation, ranked dedup, answer extraction, CLI, MCP server, Prometheus metrics, and a Tavily-compatible drop-in REST API. Ships prebuilt binaries, crates `phrona`, `phrona-api`, `phrona-cli`, `phrona-mcp`, `phrona-python` + PyPI package `phrona`.
ดาว
2
เครื่องมือ
—
อัปไทม์
—
crates/phrona core library
crates/phrona-api REST API server (axum)
crates/phrona-mcp MCP server for AI agents (rmcp, stdio + TCP)
crates/phrona-cli phrona: single CLI to everything (search, server, MCP)
crates/phrona-python Python bindings (pyo3)
examples/ runnable Rust and Python examples
crates/phrona-api/assets/ Material 3 style static web app
scripts/ upstream drift monitor
docs/ full documentation
Each package has its own README with a quick start, so check the crates.io or
PyPI page of the one you need.
Quick start (CLI)
cargo run -p phrona-cli -- search "rust programming" --max-results 10
cargo run -p phrona-cli -- suggest rus
cargo run -p phrona-cli -- serve # REST 8080 + MCP-over-TCP 8081
phrona is the all-in-one entry point: search, suggest, extract, grounding,
engine listing, availability tests (phrona test), the full REST server, MCP
over stdio (phrona mcp) or TCP (phrona serve), and shell completions. See
docs/cli.md.
Quick start (Rust)
use phrona::{search_sync, SearchOptions};
let resp = search_sync(SearchOptions::new("rust programming"))?;
for r in resp.web() {
println!("{} {}", r.title, r.url);
}
Async:
use phrona::{SearchClient, SearchOptions};
let client = SearchClient::new()?;
let resp = client.search(SearchOptions::new("rust programming")).await?;
Quick start (REST API)
cargo run -p phrona-api # listens on 127.0.0.1:8080
curl "localhost:8080/v1/search?q=rust&max_results=5"
Pre-built wheels are published to PyPI for CPython 3.9-3.14 on linux
(x86_64 / aarch64), macOS (x86_64 / arm64) and Windows (x86_64), plus an
sdist for everything else (needs a Rust toolchain + uv build / maturin).
No musllinux wheels (btls-sys requires a musl C++ toolchain).
Quick start (MCP)
cargo run -p phrona-mcp # stdio JSON-RPC
cargo run -p phrona-cli -- mcp # same, via phrona
cargo run -p phrona-cli -- serve # also serves MCP over TCP 8081
Point your MCP client (Claude Desktop, claude-code, Cursor...) at the
phrona-mcp binary. Twelve tools: web_search, image_search,
news_search, video_search, book_search, code_search,
papers_search, archives_search, suggest, fetch_page,
search_grounded, list_engines.
Impersonated HTTP/2 with TLS fingerprint spoofing via wreq profiles
(Chrome 100-149, Firefox 139-148, Safari 26, Edge 148, Opera 131, OkHttp).
Search merging: cross-engine dedup (tracking parameters stripped), ranking
(cross-engine agreement + position + query text match), suggestions and
per-engine error reporting in every response.
Full sync and async APIs, SearchClient reuse with shared token caches
(DDG vqd, Startpage sc), time ranges, safesearch, regions, per-engine
filter strings, proxies.
REST API with Tavily-compatible /search endpoint, AI grounding endpoint,
page extraction, availability probing (/v1/test), suggestions and health.
MCP server with compartmentalized tools and grounded search for RAG.
Python bindings with the full search surface.
Web frontend: one static page with full-parameter search (engines,
category, safesearch, region, language, time range, filters, page,
JSON view, per-engine report) and a Tools tab that runs every CLI
capability in the browser (suggest, extract, ground, engines, test).
Fixture-based parser tests: 25 of 29 captured pages are
verified-parseable live captures (see crates/phrona/tests/fixtures/);
the suite is fully network-independent.
Upstream drift monitor: scripts/watch_upstream.sh + the
upstream-watch GitHub workflow report when any of the 8 upstream
projects moves past its pinned commit, so broken parsers are caught
early (see docs/upstream.md).
Tag-driven releases: push vX.Y.Z and the release workflow builds
binaries for Linux/Windows/macOS plus the Python wheel and publishes a
GitHub Release (see docs/releasing.md).
With that enabled, when one of those engines is blocked phrona briefly
runs your installed Chromium-family browser headless (or downloads the
official chrome-headless-shell into ~/.cache/phrona/browser/ once -
no packages, no privileges), stores the resulting session in
phrona.cookies.json next to your config and retries. Sessions are
reused across restarts; nothing interactive ever happens.
Prefer to stay fully static? Pin cookies yourself in
phrona.yaml (engines.bootstrap_cookies), pass them ad hoc via
--cookie engine=..., or run phrona bootstrap [engines] manually -
qwant in particular is pure HTTP and only needs such a cookie.
Startpage (Anubis), Mojeek (ALTCHA) and the DuckDuckGo verticals have
their anti-bot flows solved fully natively. When an upstream changes its
flow, the companion webrief tool
captures it for reverse engineering. See
docs/engines.md for the per-engine status table.
Multi-engine meta-search library written in rust, with TLS/browser impersonation, ranked dedup, answer extraction, CLI, MCP server, Prometheus metrics, and a Tavily-compatible drop-in REST API. Ships