JUHE API Marketplace
ihor-sokoliuk avatar
MCP Server

MCP-SearXNG

A Model Context Protocol Server for SearXNG

178
GitHub Stars
8/23/2025
Last Updated
MCP Server Configuration
1{
2 "name": "searxng",
3 "command": "npx",
4 "args": [
5 "-y",
6 "mcp-searxng"
7 ],
8 "env": {
9 "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL",
10 "HTTP_PROXY": "http://proxy.company.com: 8080",
11 "HTTPS_PROXY": "http://proxy.company.com: 8080"
12 }
13}
JSON13 lines

README Documentation

SearXNG MCP Server

An MCP server implementation that integrates the SearXNG API, providing web search capabilities.

SearXNG Server MCP server

smithery badge

Features

  • Web Search: General queries, news, articles, with pagination.
  • Pagination: Control which page of results to retrieve.
  • Time Filtering: Filter results by time range (day, month, year).
  • Language Selection: Filter results by preferred language.
  • Safe Search: Control content filtering level for search results.

Tools

  • searxng_web_search

    • Execute web searches with pagination
    • Inputs:
      • query (string): The search query. This string is passed to external search services.
      • pageno (number, optional): Search page number, starts at 1 (default 1)
      • time_range (string, optional): Filter results by time range - one of: "day", "month", "year" (default: none)
      • language (string, optional): Language code for results (e.g., "en", "fr", "de") or "all" (default: "all")
      • safesearch (number, optional): Safe search filter level (0: None, 1: Moderate, 2: Strict) (default: instance setting)
  • web_url_read

    • Read and convert the content from a URL to markdown
    • Inputs:
      • url (string): The URL to fetch and process

Configuration

Setting the SEARXNG_URL

  1. Choose a SearxNG instance from the list of public instances or use your local environment.
  2. Set the SEARXNG_URL environment variable to the instance URL.
  3. The default SEARXNG_URL value is http://localhost:8080.

Using Authentication

If you are using a password protected SearxNG instance you can set a username and password for HTTP Basic Auth:

  • Set the AUTH_USERNAME environmental variable to your username
  • Set the AUTH_PASSWORD environmental variable to your password

Proxy Support

The server supports HTTP and HTTPS proxies through environment variables. This is useful when running behind corporate firewalls or when you need to route traffic through a specific proxy server.

Proxy Environment Variables

Set one or more of these environment variables to configure proxy support:

  • HTTP_PROXY: Proxy URL for HTTP requests
  • HTTPS_PROXY: Proxy URL for HTTPS requests
  • http_proxy: Alternative lowercase version for HTTP requests
  • https_proxy: Alternative lowercase version for HTTPS requests

Proxy URL Formats

The proxy URL can be in any of these formats:

# Basic proxy
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080

# Proxy with authentication
export HTTP_PROXY=http://username:password@proxy.company.com:8080
export HTTPS_PROXY=https://username:password@proxy.company.com:8080

Usage Examples

With NPX:

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "mcp-searxng"],
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL",
        "HTTP_PROXY": "http://proxy.company.com:8080",
        "HTTPS_PROXY": "http://proxy.company.com:8080"
      }
    }
  }
}

With Docker:

{
  "mcpServers": {
    "searxng": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "SEARXNG_URL",
        "-e", "HTTP_PROXY",
        "-e", "HTTPS_PROXY",
        "isokoliuk/mcp-searxng:latest"
      ],
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL",
        "HTTP_PROXY": "http://proxy.company.com:8080",
        "HTTPS_PROXY": "http://proxy.company.com:8080"
      }
    }
  }
}

Note: If no proxy environment variables are set, the server will make direct connections as normal.

Usage with Claude Desktop

Installing via Smithery

To install SearxNG Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @ihor-sokoliuk/server-searxng --client claude

NPX

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL"
      }
    }
  }
}

NPM

npm install -g mcp-searxng

And then in your MCP config file:

{
  "mcpServers": {
    "searxng": {
      "command": "mcp-searxng",
      "env": {
        "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL"
      }
    }
  }
}

Docker

Using Pre-built Image from Docker Hub

docker pull isokoliuk/mcp-searxng:latest

Add this to your claude_desktop_config.json:

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

Build Locally

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

Use

Add this to your claude_desktop_config.json:

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

Running evals

The evals package loads an mcp client that then runs the src/index.ts file, so there is no need to rebuild between tests. You can see the full documentation here.

SEARXNG_URL=SEARXNG_URL OPENAI_API_KEY=your-key npx mcp-eval evals.ts src/index.ts

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Quick Install

Quick Actions

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source