# RustXNG

> Self-hosted Rust metasearch engine based on SearXNG that serves search results and page text to AI agents via a JSON API or MCP.

RustXNG is a self-hosted metasearch engine written in Rust and based on SearXNG, published on GitHub by sahenjp. It combines results from external search providers and can fetch page text for AI agents through a JSON API or a built-in MCP server. The latest release listed is v0.30.0.

## What It Is

RustXNG is a metasearch and grounding engine for AI agents and other automated clients. It does not maintain a web-scale search index; instead it queries external providers and can add a local index of selected sites built with `rustxng-index`, plus separately imported Wikipedia dumps. Each result contains a title, URL, snippet and source metadata, and the search endpoint can also return CSV, RSS and HTML, with a web interface alongside.

## Agent and MCP workflow

Running `rustxng mcp` starts an MCP server exposing two read-only tools. `search` returns up to 10 ranked results, and `read_page` retrieves text from a URL returned by `search` in the same session, optionally selecting up to three passages relevant to a query. Output is paginated with offsets and bounded by character and byte budgets, with optional tokenizer-based payload budgets. Page fetching checks for non-public addresses, follows robots.txt, and the README advises treating returned web text as untrusted.

## Search profiles and providers

The Standard profile uses keyless providers plus local indexes. The Clean profile searches only prebuilt local crawl and Wikipedia-dump indexes without external search-provider requests. The Full profile adds further HTML providers, including ones with restrictive or unverified automation terms, and the billed Exa Search integration. The README stresses that Full is not a permission bypass and that provider terms still apply.

## Setup path

Install from release binaries (Linux, macOS, Windows), with Cargo (Rust 1.88+ and a C toolchain), or via a Docker image. The server binds to loopback by default and settings can be overridden with a TOML file. Optional extras include Poppler for PDF text extraction and a Firefox renderer for JavaScript-rendered pages. The project is licensed AGPL-3.0-or-later.

## Features
- Metasearch across external search providers
- JSON API with CSV, RSS and HTML output
- Built-in MCP server with search and read_page tools
- Page text extraction with query-relevant passages and pagination
- Token-budgeted MCP output
- Local site index via rustxng-index and Wikipedia dump import
- Standard, Clean and Full search profiles
- Domain include/exclude, language and time-range filters
- robots.txt compliance and non-public address checks
- Health and metrics endpoints
- Docker image and self-update check

## Integrations
MCP, SearXNG, Wikipedia, Exa Search, Poppler, Docker

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
v0.30.0

## Links
- Website: https://github.com/sahenjp/RustXNG
- Documentation: https://github.com/sahenjp/RustXNG/blob/main/docs/AGENT-SETUP.md
- Repository: https://github.com/sahenjp/RustXNG
- EveryDev.ai: https://www.everydev.ai/tools/rustxng
