Skip to main content
Glama

mcp_searxng

MCP server for privacy-respecting web search via SearXNG.

Requires pi-mcp-bridge to connect to pi.

Prerequisites

  • SearXNG instance running (default: http://localhost:8080/searxng)

Related MCP server: mcp_server_searXNG

Installation

pip install git+https://github.com/timaliev/mcp_searxng.git

Or via uv:

uv tool install git+https://github.com/timaliev/mcp_searxng.git

Configuration

With pi-mcp-bridge

In ~/.pi/agent/settings.json:

{
  "mcpBridge": {
    "servers": [
      {
        "name": "searxng",
        "command": "mcp-searxng",
        "args": [],
        "env": {
          "SEARXNG_URL": "http://localhost:8080/searxng"
        },
        "setupCommands": [
          "uv tool install --python 3.11 git+https://github.com/timaliev/mcp_searxng.git"
        ],
        "githubRepo": "timaliev/mcp_searxng",
        "versionCommand": "mcp-searxng --version"
      }
    ]
  }
}

Standalone MCP client

In ~/.mcp.json:

{
  "mcpServers": {
    "searxng": {
      "command": "mcp-searxng",
      "args": [],
      "env": {
        "SEARXNG_URL": "http://localhost:8080/searxng"
      }
    }
  }
}

Environment Variables

Variable

Default

Description

SEARXNG_URL

http://localhost:8080/searxng

SearXNG instance URL

Tools

Tool

Description

search_web

Web search with engine/category/language filters

search_news

News-only search

search_images

Image search with thumbnails

list_engines

List available/enabled SearXNG engines

Error Handling

All tools return a structured response with a success field. If SearXNG is unreachable or returns an error, success will be false with an error code and detail:

Error Code

Cause

ECONNREFUSED

SearXNG instance is not running or not reachable at the configured SEARXNG_URL

ESEARCH

SearXNG returned an HTTP error (e.g., 500)

EPROCESSING

Unexpected error while processing the request

Example error response:

{
  "success": false,
  "error": "ECONNREFUSED",
  "detail": "Cannot reach SearXNG at http://localhost:8080/searxng"
}

The server does not crash or exit — errors are returned inline so the agent can handle them gracefully.

Development

git clone https://github.com/timaliev/mcp_searxng.git
cd mcp_searxng
uv run mcp-searxng

Available Tools

4 tools
list_enginesA

List all available search engines from the SearXNG instance.

Args: enabled_only: If True (default), return only enabled engines.

ParametersJSON Schema
NameRequiredDescriptionDefault
enabled_onlyNo

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. It explains the parameter's effect (enabled_only filters to enabled engines by default), adding meaningful context beyond the schema. It does not mention return format or side effects, but for a simple list operation, the description is sufficiently transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with a concise Args block, front-loaded with the core purpose. Every sentence earns its place, and the format is clean and easy to parse. No unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one optional parameter, the description covers the essential purpose and parameter behavior. It lacks explicit return format details, but the tool's name and purpose make the output largely predictable. Adequate for the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, making the description the sole source of parameter meaning. The description explains 'enabled_only: If True (default), return only enabled engines,' which provides clear semantics beyond the schema's type and default fields. This fully compensates for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'List all available search engines from the SearXNG instance.' It uses a specific verb ('list') and identifies the resource ('search engines') and scope ('from the SearXNG instance'), which also distinguishes it from the sibling search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context is clear: this tool is for listing engines, distinct from the search operations of its siblings. Although there is no explicit 'when to use' or alternative guidance, the purpose is self-evident and the tool's role is well-differentiated by the description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_imagesA

Search images via SearXNG. Returns title, URL, thumbnail, and source.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the burden of disclosing behavior. It reveals the output fields (title, URL, thumbnail, source) but omits details about pagination, rate limits, error handling, or ordering of results. This adds some transparency but is not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, front-loading the main action and return types. Every word is purposeful, with no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter search tool, the description states the essential purpose and output fields, but lacks context about result formatting (e.g., list vs. object), pagination, or parameter usage. With no annotations or output schema, the agent is left partially informed about how to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for parameter meaning. It does not explain the query or max_results parameters beyond implying query is the search term; max_results is entirely unexplained. This leaves a significant gap for effective invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches images via SearXNG and enumerates the return fields (title, URL, thumbnail, source), distinguishing it from sibling search tools like search_web and search_news. The verb 'search' and resource 'images' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternative guidance is provided. The description implies usage for image searches based on the name and resource, but it does not contrast with search_web or search_news, leaving the agent to infer the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_newsC

Search news articles via SearXNG.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries all burden for behavioral disclosure. It indicates a read operation (search) but says nothing about result format, pagination, rate limits, or any side effects. Minimal transparency beyond the obvious.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short and front-loaded, but it is under-specified. It lacks essential details like parameter behavior and expected output, making it more sparse than appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple search tool with no output schema and no annotations, the description is incomplete. It doesn't explain return values, usage context, or any special behaviors, leaving the agent with minimal information to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description mentions no parameters. The parameter names (query, max_results) are self-explanatory, but the description fails to add any meaning or explain constraints that the schema doesn't cover.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches news articles via SearXNG, with a specific verb and resource. It implicitly differentiates from siblings like search_web and search_images by focusing on news, though it doesn't explicitly name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool instead of search_web or search_images. The description only states the function and provides no context, exclusions, or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_webB

Search the web via SearXNG. Optional: filter by engines, categories (general/news/images/science/files/social+media/videos).

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
enginesNo
languageNo
categoriesNo
max_resultsNo

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the search action and optional filters, but does not describe return format, pagination, or any side effects or permissions. This is insufficient for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded: a two-sentence summary that states the core action and then optional filters. Every word earns its place, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It covers the core purpose and two filtering options but fails to mention language and max_results, and does not indicate the shape of the returned results. The overall context is not adequately fleshed out.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate. It adds meaning for 'engines' and 'categories' (listing example category values), but omits 'language' and 'max_results' entirely. This leaves two of five parameters undocumented, resulting in incomplete semantic coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Search' and identifies the resource ('the web via SearXNG'), clearly conveying a general web search tool. It implicitly distinguishes from siblings by its broad scope, while sibling names like search_news and search_images indicate specialized variants.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions optional filters (engines, categories) but provides no explicit guidance on when to use this tool versus search_news or search_images, nor any exclusions or alternative recommendations. The usage context is only implied, not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv1.0.0
    • First observedlist_engines
    • First observedsearch_images
    • First observedsearch_news
    • First observedsearch_web

TDQS

A3.5/5.0

Scored across 4 tools

Disambiguation4/5

search_news and search_images are clearly distinct from search_web, but search_web can also filter by news/images categories, creating some overlap. The dedicated tools return specialized results, so the intent is mostly clear.

Naming Consistency5/5

All tools use snake_case with a consistent verb_noun pattern (search_web, search_news, search_images, list_engines). The naming is predictable and uniform.

Tool Count5/5

Four tools is well-scoped for a search server: general search, two specialized searches, and a utility for listing engines. Each tool earns its place without bloat.

Completeness4/5

Core search and engine listing are covered, but only news and images have dedicated specialized searches. Other categories (videos, science, etc.) are accessible via search_web, so no critical gaps exist, but dedicated support for all categories would be more complete.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables web search capabilities by integrating with a SearXNG instance to aggregate results from over 130 engines. It allows users to perform filtered searches across categories like news, science, and social media while supporting advanced parameters for language and time range.
    9
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A privacy-friendly web search MCP server using SearXNG, enabling searches across multiple engines and categories.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Privacy-focused web search MCP server using SearXNG with Streamable HTTP transport, supporting authentication and advanced search parameters.
    -