RustXNG MCP

Local Rust metasearch based on SearXNG: agents get JSON results and read pages over MCP with a hard cap on response size

  • 961 ★ on the repository
  • Last commit
  • AGPL-3.0
MCP server

Extended access

Why this level

  • Search queries are sent to the selected external search engines.
  • `read_page` opens URLs from the results and loads third-party text into the agent context.
All reasons and checks

sahenjp/rustxng

Install

Manual install

set -eu
mkdir -p rustxng-download && cd rustxng-download
gh release download v0.26.0 --repo sahenjp/RustXNG \
  --pattern 'rustxng-v0.26.0-x86_64-unknown-linux-musl*' \
  --pattern LICENSE --pattern NOTICE
sha256sum --check rustxng-v0.26.0-x86_64-unknown-linux-musl.sha256
install -Dm755 rustxng-v0.26.0-x86_64-unknown-linux-musl "$HOME/.local/bin/rustxng"

The first README method: a prebuilt Linux x86_64 binary with checksum verification. macOS and Windows binaries are listed in the releases.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Search queries are sent to the selected external search engines.
  • `read_page` opens URLs from the results and loads third-party text into the agent context.

This is third-party code. Review the repository files before installing.

What it does

RustXNG is a self-hosted metasearch engine written in Rust and based on SearXNG. The server merges results from several search engines and fetches page text on request, so an agent works from sources instead of model memory. The `rustxng mcp` command starts an MCP server over stdio with two read-only tools: `search` and `read_page`. `search` returns five results by default, each snippet is cut to 500 characters, and the whole structured response fits in 12,000 characters and 24,000 bytes. `read_page` reads a page at a URL from the results, accepts an offset, and with a `query` adds up to three matching passages. The same results come from an HTTP API with JSON, CSV and RSS output and from a web interface on a local address.

Who it is for. Developers who run their own search for Claude Code, Codex or Cursor and want to cap how much result text reaches the model context.

Good fit when

  • An agent collects library documentation and reads only the relevant pages from the results.
  • A research run hits the context limit and search output has to be cut by characters.
  • Search must run on your own machine without signing up for paid search APIs.
  • Queries are in Japanese: the project has separate quality measurements for Japanese results.

Not a fit when

  • Queries cannot be sent to external search engines: the server passes them to the selected providers.
  • Results must come from Google: its engines and integrations were removed from the project.
  • Pages are read through an outgoing proxy: `read_page` refuses in that case and waits for a direct connection.

Example request

Find three sources on the Tokio runtime, show the links and read the documentation page, noting whether the text was truncated.

MCP

Transport
stdio
Authentication
not required

Limitations

Results depend on external engines: some adapters, such as Yahoo! JAPAN and Mojeek HTML, are off by default pending a permission review. `read_page` accepts only URLs that search returned in the same session. Response limits count characters and bytes, and token budgets are still planned. The AGPL-3.0-or-later license requires publishing the source of a modified version run as a network service. The published v0.26.0 release listens on port 8888 while a fresh build from the repository uses 29483, so set the port explicitly in commands.

How to disable. Remove the `rustxng` entry from the MCP client configuration and stop the server process. The binary sits in the directory chosen at install time, for example `~/.local/bin/rustxng`.

FAQ

How do I connect RustXNG to Claude Code?

Register the `rustxng mcp` command as a stdio MCP server in the client. After a restart the agent can use the `search` and `read_page` tools.

How does `search` differ from `read_page`?

`search` returns ranked snippets with links, while `read_page` loads page text from a URL in the results and accepts an offset so a long document is read in parts.

How do I limit response size?

In the HTTP API set `max_results` from 1 to 200 and use `include_domains` or `exclude_domains`. In MCP the default is five results, and the `truncated` and `next_offset` fields show that more is available.

Are API keys required?

Most engines need no keys. Paid providers with authentication are added separately, with their own keys and pricing.

Where do search queries go?

To the external engines selected for the request. The server itself runs locally, and `/healthz` checks only the process, not engine availability.

Discussion

No questions or reviews yet.

An MCP server for private web search through your SearXNG instance: search with pagination and filters, page and PDF reading

MCP serverExtended access1.4KRepository stars

Keyless web search for agents: a Rust service over HTTP or MCP merges DuckDuckGo, Brave and Yahoo results into one JSON.

MCP serverBroad access135Repository stars

MCP server for web search and crawling: SearXNG and You.com plus clean Markdown from pages, sites and logged-in areas

MCP serverExtended access190Repository stars

Local web search for an agent with no API keys: results are ranked on your machine and only the relevant passages come back

MCP serverExtended access151Repository stars

An MCP server searches the web with Grok, retains sources and extracts page content through available retrieval providers.

MCP serverExtended access453Repository stars

SearXNG AI Kit gives agents web search across 180+ engines through a CLI and an MCP server, with no search API key

MCP serverExtended access110Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
RustXNG (this card)nonot required961
SearXNG MCP Servernonot required1,358connects an agent to an existing SearXNG instance; RustXNG gathers results itself and has an MCP mode
DuckDuckGo Search MCP Servernonot required1,580queries a single search service, DuckDuckGo; RustXNG merges results from several engines

README in short

The project reimplements the SearXNG idea in Rust and ships as release binaries, a Docker image and a source build. The repository holds SealQA measurements, separate checks for Japanese queries and an installation guide written for the agent itself.

README badge

Report a problem