SearXNG MCP Server

Web search and page reading through a SearXNG metasearch instance you run or trust

By Ihor Sokoliuk (individual) TypeScript Local · stdio Web searchBrowser automation

80 popularity score ★ 1.3k ↓ 16k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs SEARXNG_URL. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add searxng -e SEARXNG_URL=<SEARXNG_URL> -- npx -y mcp-searxng
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "env": {
        "SEARXNG_URL": "<SEARXNG_URL>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "env": {
        "SEARXNG_URL": "<SEARXNG_URL>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "searxng": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "env": {
        "SEARXNG_URL": "<SEARXNG_URL>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.searxng]
command = "npx"
args = ["-y", "mcp-searxng"]

[mcp_servers.searxng.env]
SEARXNG_URL = "<SEARXNG_URL>"
Gemini CLITerminal
gemini mcp add --scope user -e SEARXNG_URL=<SEARXNG_URL> searxng npx -- -y mcp-searxng
Local (container)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs SEARXNG_URL. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add searxng -e SEARXNG_URL=<SEARXNG_URL> -- docker run -i --rm -e SEARXNG_URL isokoliuk/mcp-searxng:latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "searxng": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SEARXNG_URL",
        "isokoliuk/mcp-searxng:latest"
      ],
      "env": {
        "SEARXNG_URL": "<SEARXNG_URL>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "searxng": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SEARXNG_URL",
        "isokoliuk/mcp-searxng:latest"
      ],
      "env": {
        "SEARXNG_URL": "<SEARXNG_URL>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "searxng": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SEARXNG_URL",
        "isokoliuk/mcp-searxng:latest"
      ],
      "env": {
        "SEARXNG_URL": "<SEARXNG_URL>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.searxng]
command = "docker"
args = ["run", "-i", "--rm", "-e", "SEARXNG_URL", "isokoliuk/mcp-searxng:latest"]

[mcp_servers.searxng.env]
SEARXNG_URL = "<SEARXNG_URL>"
Gemini CLITerminal
gemini mcp add --scope user -e SEARXNG_URL=<SEARXNG_URL> searxng docker -- run -i --rm -e SEARXNG_URL isokoliuk/mcp-searxng:latest

Settings 12

SEARXNG_URL Required: Base URL of your SearXNG instance, or several replicas separated by semicolons; may embed user:pass for Basic Auth.
AUTH_USERNAME Optional: HTTP Basic Auth user for the SearXNG instance when the URL carries none.
AUTH_PASSWORD Optional: HTTP Basic Auth password paired with AUTH_USERNAME.
SEARXNG_MAX_RESULTS Optional: Upper limit on results per search, 1 to 20.
SEARXNG_HTML_FALLBACK Optional: Set to true to parse HTML result pages when the instance refuses JSON.
HTTP_PROXY Optional: Proxy for outgoing requests; SEARCH_ and URL_READER_ variants set it per area.
HTTPS_PROXY Optional: Proxy for outgoing HTTPS requests.
MCP_HTTP_PORT Optional: Switches from STDIO to Streamable HTTP on this port.
MCP_HTTP_AUTH_TOKEN Optional: Static bearer token clients must send in hardened HTTP mode.
FLARESOLVERR_URL Optional: FlareSolverr service the URL reader can use for pages that block plain fetches.
BYPARR_URL Optional: Byparr service used as a browser solver, after FlareSolverr when both are set.
URL_READ_MAX_CONTENT_LENGTH_BYTES Optional: Largest response the URL reader will take, 5242880 by default.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

This server connects an MCP client to SearXNG, the open-source metasearch engine, so an assistant can search the web through an instance you pick instead of a paid search vendor's API. It does not ship SearXNG itself: you point it at an existing instance with SEARXNG_URL, and it calls that instance's JSON search interface.

There are four tools. One runs searches with page numbers, time range, language, safe-search level, category and engine filters, and a cap of up to 20 results per call, returned as full or compact text or JSON. One offers query suggestions, one reports which categories, engines and defaults the instance has, and one fetches a given URL and turns HTML, plain or structured text, or a PDF into Markdown, with options to read only headings, one section or a character range.

It runs over STDIO by default, from npx or a Docker image, or as a long-running Streamable HTTP service with an optional static bearer token or OAuth through an outside authorization provider. Optional extras cover a semicolon-separated list of replica instances, an HTML fallback for instances whose JSON output is switched off, per-area proxies, in-process caches, and FlareSolverr or Byparr browser solvers for pages that block plain fetches.

The makers point out that privacy rests on the instance: a public SearXNG instance sees every query and may log it, and neither SearXNG nor this server makes you anonymous.

What it needs

RuntimeNode.js 22+orDocker

A reachable SearXNG instance with JSON output enabled, set in SEARXNG_URL (self-hosted or a public one you trust). Node.js 22 or later for npx or a global npm install; the Docker image carries its own runtime. FlareSolverr or Byparr only if you want browser-solver fetching.

Limits

Search returns at most 20 results per call. The URL reader handles HTML, text-like formats and PDFs up to 500 pages; other binary, media and archive files are refused, PDFs get no OCR, and scanned or password-protected PDFs return only a short explanation. Fetched content is capped at 5 MiB by default (16 MiB at most for PDFs), PDF parsing has a 30-second budget and only two PDFs are parsed at once per process. The HTML fallback parses results on a best-effort basis with limited metadata. Combining engine and time-range filters fails unless every engine supports time ranges.

Who it suits

Suits people who want web search for an assistant without a search-vendor API key or bill, especially those who already run SearXNG or are willing to host it, and who also want pages and PDFs read as Markdown from the same server. It is read-only and runs on your own machine or server. If you do not want to run or choose a SearXNG instance, the README itself compares it with the Brave, Exa and Firecrawl MCP servers, which use hosted vendor APIs with keys; pick one of those when a managed index matters more than self-hosting.

Tools 4

searxng_web_search
Search the web via SearXNG with paging, time range, language, safe-search, category and engine filters
searxng_search_suggestions
Get autocomplete suggestions to complete or refine a query
searxng_instance_info
List the instance's categories, engines, locales, plugins and defaults
web_url_read
Fetch a URL and return HTML, text or PDF content as Markdown, whole or by section

Similar servers