Skip to main content
Glama
SearxNG MCP Server

SearxNG MCP Server

by IceWreck

SearxNG MCP Server

A Model Context Protocol (MCP) server that provides search capabilities through SearxNG, the privacy-respecting metasearch engine.

PyPi: https://pypi.org/project/searxng-mcp-server/#description

Usage

Using uvx

You can also just pip install this but we recommend using uv.

# With command line argument (stdio transport)
uvx searxng-mcp-server --searxng-url https://searx.be

# With environment variable (stdio transport)
SEARXNG_URL=https://searx.be uvx searxng-mcp-server

# With HTTP transport on port 8080
uvx searxng-mcp-server --searxng-url https://searx.be --port 8080

# With HTTP transport using environment variable
SEARXNG_URL=https://searx.be MCP_PORT=8080 uvx searxng-mcp-server

Package link: https://pypi.org/project/searxng-mcp-server/

Using Docker/Podman

# With command line argument (stdio transport)
podman run --rm -i docker.io/icewreck/searxng-mcp-server:latest --searxng-url https://searx.be

# With environment variable (stdio transport)
podman run --rm -i -e SEARXNG_URL=https://searx.be docker.io/icewreck/searxng-mcp-server:latest

# With HTTP transport on port 8080
podman run --rm -i -e SEARXNG_URL=https://searx.be -p 8080:8080 docker.io/icewreck/searxng-mcp-server:latest --port 8080

Usage as Library

You can also use the SearxNG client directly in your Python projects. The client is fully async and requires async/await syntax.

For detailed examples, see the examples/client_example.py file in the repository.

The SearxNGClient can be easily integrated into custom AI agents as a search tool. All search methods are async and return structured response objects.

Related MCP server: SearXNG MCP Server

Available Tools

  • search_web: General web search with language and time filtering

  • search_images: Image search across multiple search engines

  • search_videos: Video search from various platforms

  • search_news: News search with time range filtering

  • fetch_url: Fetch content from a URL and convert it to markdown

Configuration

The server requires a SearxNG instance URL. You can provide it via:

  • Environment Variable: SEARXNG_URL=https://your-searxng-instance.com

  • Command Line Argument: --searxng-url https://your-searxng-instance.com

By default, the server uses stdio transport. To enable HTTP transport, set a port:

  • Environment Variable: MCP_PORT=8080

  • Command Line Argument: --port 8080

When a port is provided, the server listens on http://0.0.0.0:<port> using the streamable-http transport.

Optional: SEARXNG_TIMEOUT (default: 30), SEARXNG_USER_AGENT, LOG_LEVEL

Available Tools

5 tools
fetch_urlA

Fetch content from a URL (html, text or pdf) and convert it to markdown.

Args: url: The URL to fetch and convert to markdown

Returns: FetchUrlResponse with the markdown content and metadata

Inputs: url (required). Returns: Response model for URL fetching.

search_imagesB

Search for images using SearxNG.

Args: query: Image search query max_results: Maximum number of results to return (default: 10)

Returns: ImageSearchResponse with image search results

Inputs: query (required), max_results. Returns: Response model for image searches.

search_newsB

Search for news using SearxNG.

Args: query: News search query time_range: Time range filter ('day', 'week', 'month', 'year'). Use None for no time filtering. max_results: Maximum number of results to return (default: 10)

Returns: NewsSearchResponse with news search results

Inputs: query (required), time_range, max_results. Returns: Response model for news searches.

search_videosA

Search for videos using SearxNG.

Args: query: Video search query max_results: Maximum number of results to return (default: 10)

Returns: VideoSearchResponse with video search results

Inputs: query (required), max_results. Returns: Response model for video searches.

search_webA

Search the web using SearxNG.

Args: query: Search query string language: Language code for results (e.g., 'en', 'en-US', 'fr', 'de'). Use None for no language preference. time_range: Time range filter ('day', 'week', 'month', 'year'). Use None for no time filtering. safesearch: Safe search filtering (True to enable, False to disable) max_results: Maximum number of results to return (default: 10)

Returns: WebSearchResponse with web search results

Inputs: query (required), language, safesearch, time_range, +1 more. Returns: Base model for web search responses.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct media type (web, images, videos, news) or action (fetch URL), with no overlap in purpose. Agents can clearly differentiate based on tool names and descriptions.

    Naming Consistency4/5

    The four search tools follow a consistent 'search_{media}' pattern, but 'fetch_url' uses a different verb, introducing a minor inconsistency. However, the naming is still intuitive and logical.

    Tool Count5/5

    With 5 tools covering the core search functionalities and URL fetching, the set is well-scoped for a search server. No tool feels unnecessary and no obvious missing categories for basic search.

    Completeness4/5

    The tool surface covers essential search types and URL fetching. However, some search tools lack optional filters (e.g., time_range or safesearch) that others have, creating slight feature gaps across the set.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables web search, image search, and news search through a self-hosted SearXNG instance. Provides privacy-focused meta-search capabilities aggregating results from multiple search engines.
      3
      176 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables web search capabilities via a SearXNG instance, allowing for filtered searches across categories like news, images, and science. It supports multi-language queries, time-range filtering, and safe search options to provide formatted results with metadata.
      1
      176 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to perform web searches and read URL content via a SearXNG instance.
      2
      13 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables web search through SearXNG instances, offering tools for general and category-specific queries, engine selection, time filtering, and engine discovery.
      MIT