SearXNG MCP Server logo

SearXNG MCP Server

CommunityPopular
ihor-sokoliuk

Private web search for AI assistants via SearXNG — supports Claude, Cursor, and any MCP client

Publisherihor-sokoliuk
Repositorymcp-searxng
LanguageTypeScript
Forks
163
Stars
1.3K
Available tools
4
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    SearXNG MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 4 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    1.3K stars and 163 forks from the linked repository.

🔍 SearXNG MCP Server

Privacy-respecting web search for AI assistants — use an operator-controlled or trusted SearXNG instance with Claude, Cursor, and more.

GitHub Stars npm version npm downloads Docker Pulls License: MIT OpenSSF Scorecard OpenSSF Best Practices mcp-searxng MCP server GitHub MCP Registry

An MCP server that integrates the SearXNG API, giving AI assistants web search capabilities.

✨ Featured in the GitHub MCP Registry.

Quick Start

You need an existing SearXNG instance with JSON search enabled. This project connects an MCP client to SearXNG; it does not install SearXNG. Use an instance you operate or trust. Start with the self-hosted or public-instance guide if needed.

Choose how to connect:

Your setupStart here
Client starts the server locallyInstall Node.js 22 or later, then use the NPX example below or your client recipe.
Client starts a Docker containerUse the Docker/STDIO recipe in Installation.
You have an independently running HTTP serviceUse your client's HTTP recipe with the full /mcp URL.
You need to operate an HTTP serviceFollow the HTTP server guide.

For clients using mcpServers JSON (such as Claude Desktop), add:

json
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "mcp-searxng"],
      "env": { "SEARXNG_URL": "https://search.example.com" }
    }
  }
}

Replace the example URL with your SearXNG base URL. Other clients use different configuration shapes: choose your client recipe. Leave MCP_HTTP_PORT unset for local STDIO. Docker also needs environment forwarding into the container.

Reload the client, inspect its MCP tool inventory, then ask it to search for SearXNG documentation. A simple tool call is searxng_web_search with {"query":"SearXNG"}. Discovery alone does not test SearXNG connectivity. If the call fails, start with troubleshooting.

Features

  • Search with pagination, filters, direct answers and full or compact text/JSON output.
  • Read HTML, structured text and bounded PDF text; inspect headings or selected sections.
  • Discover instance capabilities and get query suggestions.
  • Optional replica failover/fan-out, HTML fallback, caching, proxies and browser solvers.
  • Local STDIO or Streamable HTTP, with static bearer and optional OAuth protection.

See the tool guide for capabilities and limits, configuration reference for settings, and historical deployment measurements for bounded resource-planning evidence.

Why mcp-searxng?

As of 2026-07-29, the capability comparison below reflects the official Brave MCP, Exa MCP, and Firecrawl MCP projects. “Pagination” means an exposed page or offset control. “Self-hosted” means the search service can run under your control. “Free / No API key” means this MCP server does not require a paid search-vendor API key; you still operate or select the underlying SearXNG instance.

Brave MCPExa MCPFirecrawl MCPmcp-searxng
Web Search✓✓✓✓
Read URL✗✓✓✓
Pagination✓✗✓✓
Self-hosted✗✗Partial✓
Free / No API key✗✗✗✓

Privacy depends on the SearXNG deployment. An operator-controlled instance can avoid trusting a third-party search operator, while a public instance receives the query and may log it. SearXNG and this MCP integration do not by themselves provide anonymity.

How It Works

MCP client → mcp-searxng → SearXNG → search engines

The client either starts its own STDIO process or connects to an HTTP service. SEARXNG_URL identifies the SearXNG service, not the MCP endpoint. URL reading fetches the selected website directly. A semicolon-separated replica list is supported for interchangeable SearXNG deployments; see replica configuration.

STDIO is the default. Legacy Streamable HTTP sessions are stateful by default: clients should send DELETE /mcp when finished, then reinitialize if a later request receives HTTP 404 for the terminated session. Modern HTTP requests and the MCP_HTTP_STATELESS=true legacy mode are sessionless; see HTTP transport configuration.

Tools

ToolUse it to
searxng_web_searchFind sources and refine results
searxng_search_suggestionsComplete or refine a query
searxng_instance_infoInspect categories, engines and defaults
web_url_readRead a known URL as text/Markdown

The tool guide contains examples and the full parameter reference. The optional research workflow explains how to inspect sources and cite evidence.

Installation

For NPX and npm installs, Node.js 22 or later is required. The Docker image includes its Node.js runtime.

bash
npm install -g mcp-searxng
json
{
  "mcpServers": {
    "searxng": {
      "command": "mcp-searxng",
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL"
      }
    }
  }
}

Pre-built image:

bash
docker pull isokoliuk/mcp-searxng:latest

Image signatures can be verified with Cosign — see SECURITY.md for instructions.

json
{
  "mcpServers": {
    "searxng": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "SEARXNG_URL",
        "isokoliuk/mcp-searxng:latest"
      ],
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL"
      }
    }
  }
}

To pass additional env vars, add -e VAR_NAME to args and the variable to env. For browser-solver integration, pass FLARESOLVERR_URL, BYPARR_URL, or both and make the configured services reachable from this container. Dual mode has a fixed FlareSolverr-first order and no automatic reverse failover. Safe rendered HTML and explicit Byparr PDF content are read directly; ambiguous content uses guarded replay, with bounded failover for eligible read failures. See URL Reader Controls for the complete behavior and Docker Compose example.

Build locally:

bash
docker build -t mcp-searxng:latest -f Dockerfile .

Use the same config above, replacing isokoliuk/mcp-searxng:latest with mcp-searxng:latest.

docker-compose.yml:

yaml
services:
  mcp-searxng:
    image: isokoliuk/mcp-searxng:latest
    stdin_open: true
    environment:
      - SEARXNG_URL=${SEARXNG_URL:?Set SEARXNG_URL in the environment}
      # Add optional variables as needed — see CONFIGURATION.md

The tracked Compose file is intentionally STDIO-only and publishes no network ports; MCP clients launch it with an absolute Compose-file path and docker compose run --rm -T, not docker compose up. The -T flag prevents pseudo-TTY allocation so MCP JSON-RPC stays on raw standard input and output. Compose fails before launch unless the MCP client supplies SEARXNG_URL.

MCP client config:

json
{
  "mcpServers": {
    "searxng": {
      "command": "docker",
      "args": [
        "compose",
        "-f", "/absolute/path/to/docker-compose.yml",
        "run", "--rm", "-T", "mcp-searxng"
      ],
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL"
      }
    }
  }
}

If you previously used the tracked file as an HTTP service on port 8080, put the HTTP settings in an untracked docker-compose.override.yml:

yaml
services:
  mcp-searxng:
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      - MCP_HTTP_PORT=8080
      - MCP_HTTP_HOST=0.0.0.0

Here 0.0.0.0 is the container-side bind address; the host-side port remains loopback-only. This override has no authentication and is only a temporary single-host migration path. Before adding co-located containers or exposing the service beyond the local machine, follow the hardened deployment guidance.

HTTP Transport

Run HTTP independently, then connect the client. See the HTTP server guide for local checks, static bearer authentication, OAuth requirements and deployment verification.

Configuration

For the default local setup, SEARXNG_URL is the required setting. Optional modes such as hardened HTTP and OAuth have companion requirements. Use the configuration reference for environment variables, defaults, caching, timeouts, proxies, TLS, and limits.

Optional MCP OAuth

An HTTP deployment can use OAuth with an external authorization provider. See authentication choices. Static bearer authentication and SearXNG Basic Auth protect different connections.

Troubleshooting

SymptomNext check
Server absent or disconnectedClient/process startup
HTTP auth, session or proxy errorHTTP connection
Tools appear but search failsSearXNG connection
Empty, poor or stale resultsFilters, upstream metadata and cache
URL/PDF failure or timeoutURL reading

403 Forbidden from SearXNG

JSON output may be disabled, or an access-control layer may have denied the request. Follow the direct checks before changing settings. A working browser page does not prove the JSON API works.

Can't enable JSON? (HTML fallback)

SEARXNG_HTML_FALLBACK=true can retry 403/404/non-JSON search responses as HTML. Parsing is best-effort and metadata is limited; compact output omits fallback markers. Read the public-instance guidance before enabling it on a service you do not control.

For a bug report, collect a minimal reproduction and relevant errors.

Documentation

Find a guide by task. These links open current main-branch documentation. Unreleased behavior is labeled; consult the matching Git tag when investigating an older version.

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE for details.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "ihor-sokoliuk-mcp-searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ]
    }
  }
}

Available Tools

  • searxng_web_search

    Searches the web using SearXNG and returns a list of results, each with a title, URL, and content snippet. CRITICAL: The required parameter name is exactly query (not prompt, q, or any other name). Calls an external SearXNG instance; availability depends on the SEARXNG_URL configuration. Use pageno to paginate results; combine time_range and language to narrow scope. To read the full text of a result URL, follow up with web_url_read.

  • searxng_search_suggestions

    Returns autocomplete suggestions from the configured SearXNG instance. Use this to refine vague or partial queries before searching.

  • searxng_instance_info

    Discovers capabilities from all reachable configured SearXNG instances via /config, including categories.common/available, engines.common/available, defaults, locales, and plugins.

  • web_url_read

    Fetches a URL and returns readable content as markdown. Content-type aware: HTML is converted to markdown; JSON is pretty-printed; plain text, YAML, TOML, and XML are returned as fenced readable text. PDF text extraction is supported with bounded input, output, page count, time, concurrency, and memory; OCR is not supported. Binary, media, archive, and octet-stream downloads other than PDFs are intentionally rejected instead of being returned as raw bytes. When the operator configures browser solvers, mcp-searxng attempts FlareSolverr first and then Byparr only after a busy or transient-unavailable acquisition; cache hits bypass acquisition and a final busy or unavailable provider uses one uncached direct-fetch fallback. Three modes: (1) Full content — omit filtering params; use startChar/maxLength to paginate large pages. (2) Section extraction — set section to return content under a specific heading. (3) Headings only — set readHeadings: true to list all headings (mutually ex

Use SearXNG MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once SearXNG MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add SearXNG MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the SearXNG MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "ihor-sokoliuk-mcp-searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the SearXNG MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the SearXNG MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use SearXNG MCP Server to help me with this task?
SearXNG MCP Server
Sure. I read it.
Here is what I found using SearXNG MCP Server.

Frequently asked questions

What is the SearXNG MCP Server MCP server used for?

SearXNG MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use SearXNG MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use SearXNG MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use SearXNG MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With SearXNG MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect SearXNG MCP Server MCP to TypingMind?

SearXNG MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does SearXNG MCP Server MCP provide in TypingMind?

SearXNG MCP Server exposes 4 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use SearXNG MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If SearXNG MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Server Configuration

Current server configuration and environment variables

Usage Guide

How to use the MCP SearXNG server effectively

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇