All notable changes to mcp-searxng are documented here. Versions follow Semantic Versioning.
- DNS-resolved private-address SSRF in
web_url_readblocked (GHSA-mrvx-jmjw-vggc): The URL reader previously validated only the literal hostname string, so a public-looking hostname that DNS-resolves to a private, loopback, or link-local address (for example a domain pointing at127.0.0.1/10.0.0.0/8or a cloud metadata endpoint like169.254.169.254) bypassed the SSRF guard. Direct (no-proxy) reads now validate every resolved DNS answer before connecting and pin the connection to the validated address, closing the DNS-rebinding window. TheMCP_HTTP_ALLOW_PRIVATE_URLS=trueopt-out still applies. When a URL-reader proxy is configured the proxy performs DNS resolution, so those deployments must rely on egress/firewall controls (documented inSECURITY.md). - Unbounded response-body read in
web_url_readcapped (GHSA-xcqx-9jf5-w339): The page-size limit was advisory only — a server using chunked transfer encoding, a failing/absent HEAD response, or a body larger than its reportedContent-Lengthcould force the entire response into memory (denial of service). The body is now read through a bounded stream that enforcesURL_READ_MAX_CONTENT_LENGTH_BYTES(default 5 MB) against the decompressed size and stops once the cap is exceeded, before any conversion or caching.
- HTML-search fallback (
SEARXNG_HTML_FALLBACK=true): Opt-in compatibility mode for SearXNG instances that disable JSON output. When a search hits a403/404or a non-JSON response, it is automatically retried withoutformat=jsonand results (title, URL, snippet) are parsed from the regular HTML results page and markedsourceFormat: "html". Triggers strictly on format rejections — never on401,5xx, network, or timeout errors. Enabling JSON on a SearXNG instance you control remains the recommended setup; see the README troubleshooting section.
undiciupgraded to 7.28.0 — resolves two HIGH advisories affecting 7.0.0–7.27.2: GHSA-vmh5-mc38-953g (TLS certificate validation bypass in the SOCKS5 ProxyAgent) and GHSA-pr7r-676h-xcf6 (cross-user information disclosure via shared-cache whitespace bypass).form-dataupgraded to 4.0.6 — clears a CRLF-injection advisory (GHSA-hmw2-7cc7-3qxx) in the test toolchain.
-
enginesparameter onsearxng_web_search: A comma-separated list routes a search to specific SearXNG engines (e.g.google,bing,duckduckgo) instead of the category defaults. Omitting it preserves the previous behaviour. -
Validated & normalized
categories/engines: Values are now trimmed and matched case-insensitively against the connected instance's live/config, and the canonical names are sent to SearXNG. Unknown values are rejected up front with the available options listed — fixing silent search degradation from miscased or invalid engine/category names. -
Configurable URL cache controls:
CACHE_TTL_MSsets the URL cache TTL (default86400000ms = 24 h) andCACHE_MAX_ENTRIESsets the maximum cached URLs (default500). -
Bounded URL cache eviction: URL cache entries now track hit counts and use LFU eviction with oldest-entry tie-breaking, keeping the cache within the configured size limit.
- URL cache TTL default: The URL cache now reuses cached pages for up to 24 h within a running server unless entries expire or are evicted. Previous default was 60 s.
-
Least-privilege Docker workflow permissions:
security-events: writeis now isolated to a dedicated image-scan job in both the publish and rebuild workflows, withid-token: writeconfined to the publish/sign job and workflow-level permissions kept read-only. -
Patched bundled
hono: Pinned the transitivehonodependency to ≥ 4.12.25 (via npmoverrides) to resolve CVE-2026-54290 — a CORS middleware flaw that reflected any origin with credentials — in the published Docker image.
- Added a CI workflow that runs lint plus unit and integration tests on every pull request and push to
main.
-
searxng_suggestionstool: Returns search autocomplete suggestions from the SearXNG instance. Useful for exploring related queries before committing to a full search. -
searxng_instance_infotool: Discovers the capabilities of the connected SearXNG instance — enabled engines, supported categories, available languages, and safe-search settings. -
JSON response format:
searxng_web_searchaccepts a newresponse_formatparameter ("text"or"json"). The"json"format returns raw structured data instead of the formatted Markdown text, enabling programmatic result processing. -
Search metadata in text output:
searxng_web_searchtext responses now include SearXNG answers, spelling corrections, infoboxes, and autocomplete suggestions when the instance returns them — giving richer context alongside the ranked web results.
-
Metadata (answers, corrections, infoboxes) is now preserved in text output even when
min_scorefilters out all web results. Previously the metadata was silently dropped. -
Unresponsive engines are no longer listed in text output.
-
searxng_suggestionsandsearxng_instance_inforequests now route through the configured search proxy and default TLS dispatcher, matching the behaviour ofsearxng_web_search.
-
Result count control:
num_resultsparameter onsearxng_web_search(1–20) lets callers request only as many results as they need.SEARXNG_MAX_RESULTSenv var sets an operator-level hard cap that applies even whennum_resultsis omitted — useful for reducing token spend across all callers. -
Token budget limits:
SEARXNG_MAX_RESULT_CHARSenv var truncates each search result snippet to a character limit (appending…) before returning.URL_READ_MAX_CHARSenv var sets a defaultmaxLengthfor URL reads when the caller omits it — both controls are recommended for local models with small context windows. -
HEAD preflight for URL reader: A fast HEAD request is made before every URL fetch to check
Content-Length. If the server reports a size aboveURL_READ_MAX_CONTENT_LENGTH_BYTES(default 5 MB), the download is blocked and a descriptive message withreadHeadings/sectionpagination hints is returned instead of downloading an unbounded body. -
categoriesparameter onsearxng_web_search: Routes searches to specific SearXNG categories —general,news,images,videos,it,science,files,social media. Omitting the parameter uses the SearXNG instance default (general). -
Configurable search defaults:
SEARXNG_DEFAULT_LANGUAGEandSEARXNG_DEFAULT_SAFESEARCHenv vars set operator-level defaults for language and safe-search level. Per-call parameters still take precedence. InvalidSEARXNG_DEFAULT_SAFESEARCHvalues (not0,1, or2) are logged and ignored. -
Configurable timeouts:
SEARXNG_TIMEOUT_MScontrols the search request timeout andFETCH_TIMEOUT_MScontrols the URL reader fetch timeout (both default to10000ms). -
Lite tool schemas (
SEARXNG_LITE_TOOLS=true): When set, registers minimalquery-only andurl-only tool schemas instead of the full parameter list. Reduces context overhead for local models with small context windows while still forwarding any extra arguments the caller provides.
- Pinned the npm trusted publishing installer step in the publish workflow to a full commit SHA to guard against tag-swap supply-chain attacks.
- Docker images are now signed with Cosign (keyless OIDC). Verify a published image with:
cosign verify docker.io/isokoliuk/mcp-searxng:latest \ --certificate-identity-regexp 'https://github.com/ihor-sokoliuk/mcp-searxng/.github/workflows/docker-publish.yml@.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com - Expanded fuzz test coverage: search parameter handling and URL read arguments are now fuzz-tested on every CI run.
- Tightened GitHub Actions workflow permissions to least-privilege and switched to reproducible
npm ciinstalls in the publish pipeline.
test:coveragescript now enforces the coverage threshold mechanically.- Gitignored AI process artifacts (plans, drafts) so they can never be committed.
- Docker base image (
node:lts-alpine) is now pinned by digest and bumped automatically via Dependabot. - Added a weekly rebuild workflow: when upstream patches the base image, the published Docker image is rebuilt from the latest release tag, re-scanned with Trivy, and republished under the same version tags. Published images now embed the
org.opencontainers.image.base.digestOCI label for auditability.
- Expanded
SearXNGWebresponse interface to include all fields returned by the API. - Search requests now use
AbortControllerto enforce the configured timeout and prevent hanging.
- Pinned all GitHub Actions workflow steps to full commit SHAs to guard against tag-swap supply-chain attacks.
- Added CodeQL static analysis, Trivy Docker image scanning, and ClusterFuzzLite continuous fuzzing.
- Added Dependabot for automated npm and GitHub Actions dependency updates.
- Verified
mcp-publisherbinary integrity with SHA-256 checksum before use.
- Hotfix: corrected
binentry inpackage-lock.jsonthat caused install failures in some environments.
- Server silently exiting when launched via
npx, Claude Desktop, opencode, or mcpo (#91). Root cause: theisMainModulepath comparison introduced in v1.2.0 fails when Node runs through an npm.bin/symlink. Replaced with a dedicatedsrc/cli.tsentrypoint — works on every Node version and invocation method.
- Breaking: HTTP server now binds to
127.0.0.1by default instead of0.0.0.0. Operators who need network-wide access must opt in withMCP_HTTP_HOST=0.0.0.0. - Added
express-rate-limitto all HTTP routes — configurable viaMCP_RATE_WINDOW_MS,MCP_RATE_INIT_MAX,MCP_RATE_SESSION_MAX.
- Hotfix for issue #91 (server exit on npx invocation).
weekoption forsearxng_web_searchtime_rangeparameter.min_scorefilter parameter forsearxng_web_search.
- Added
MCP_HTTP_AUTH_TOKENbearer token authentication for HTTP transport. - Enabled TLS certificate verification options (
MCP_TLS_*).
- Minor stability fixes for HTTP transport.
MCP_HTTP_HOSTenvironment variable to customise server address binding.
- URL fetch tool (
web_url_read) reliability improvements.
- Escape user input in
extractSectionregex to prevent ReDoS (CWE-1333) (#71). - Add
mcp-protocol-versionto CORSallowedHeaders(#77).
- Improved
searxng_web_searchtool description to prevent LLM usingpromptinstead ofquery(#80).
- Create a new
McpServerper HTTP session to preventAlready connectedcrash (#66).
- Enhanced
SEARXNG_URLvalidation, error handling, and documentation (#64).
- Updated all dependencies to latest versions to address known vulnerabilities.