Jorge Turbica / blog · Blog ← All articles ES · Leer en español
AI

Repo of the day: RustXNG, a Rust SearXNG that gives your agents web search over MCP

A self-hosted Rust metasearch engine with a JSON API and MCP server: web search and page reading for agents without paying Tavily or Exa.

962 stars in a little under four weeks: RustXNG was created on October 18, 2026, and its latest commit landed on November 11. It's a Rust rewrite of the SearXNG idea aimed at one specific client, AI agents, which need to search the web and read pages without paying for a search API.

What it is

A self-hosted metasearch engine: it keeps no web-scale index of its own, but fans each query out to external providers and merges the results into one ranked list. What it adds on top is the agent layer: a JSON API with filters (include_domains, exclude_domains, time_range, language) and, on request, each page's text (include_raw_content=1), with a per-result status (ok, robots_blocked, fetch_failed…) so the client knows whether to retry or give up.

It also ships an MCP server with two read-only tools: search, which returns up to 10 results, and read_page, which extracts text from a URL that search returned earlier in the same session, with pagination and a character or token budget. That restriction is a sound security call: the agent can't make it fetch an arbitrary URL. When reading pages it checks that the destination and redirects aren't private addresses, and it honors robots.txt.

There are three profiles. standard (the default) uses 34 keyless sources the author has reviewed and documented; clean only searches local indexes built with rustxng-index or from Wikipedia dumps; full adds HTML providers whose terms may forbid automated access, plus Exa's paid API. It's licensed AGPL-3.0-or-later, same as SearXNG.

Getting started

Per the README, install it with Cargo (Rust 1.89+ and a C toolchain), from the release binaries, or with Docker:

bash
cargo install --git https://github.com/sahenjp/RustXNG.git --tag v0.31.2 --locked
rustxng --bind 127.0.0.1 --port 29483

curl --fail --get 'http://127.0.0.1:29483/search' \
  --data-urlencode 'q=tokio runtime documentation' \
  --data 'format=json' --data 'max_results=5'

To hook it up to an agent, run rustxng mcp (or rustxng mcp --profile clean to keep searches off the internet). It binds to 127.0.0.1 by default, and the README requires access controls before exposing it to another network. It exposes /healthz, /stats and /metrics; note that the first only checks the process, not whether providers are answering.

What I like and what I don't

I like how candid the README is. It publishes its own numbers and then tempers them: after swapping providers over permission concerns, the standard profile finds the reference page in the top five for 67–69 out of 100 questions, down from 84 with the previous setup. It warns that everything was measured by one maintainer, on one machine and one network, and that you shouldn't read it as beating Exa or Tavily. It also documents what each provider allows, which almost nobody bothers to do.

What I don't: it's a month-old project with 78 forks and fast-moving releases (it's at 0.31.2), so expect the API to shift. JavaScript-rendered pages need an optional Firefox renderer and PDFs need Poppler; neither is enabled in the release binary. And the full profile is a legal risk the author flags in the README: running a private instance doesn't override a search engine's terms.

RustXNG vs. SearXNG

SearXNG is the go-to free metasearch engine and RustXNG's declared foundation; RustXNG keeps its engine fallback behavior for compatibility.

RustXNGSearXNG
FocusSearch and page reading for agentsPrivate metasearch for people
LanguageRust, single binaryPython
Default sources34 reviewed, no search-engine HTMLBroad list of search engines
LicenseAGPL-3.0-or-laterAGPL-3.0
Maturity962 stars, created October 202639,496 stars, since 2021

If you want a private search engine for your team, SearXNG is still the option with years of use and a community behind it. If what you need is local web search for an agent without paying for an API like Tavily or Exa, RustXNG ships page text, per-result error statuses and an MCP server out of the box.

Sources

Jorge Turbica

Software Engineer and SRE. I write about the real challenges I run into in production.

See portfolio ↗