Skip to main content
Glama
SearXNG MCP Server

SearXNG MCP Server

by the-bao

SearXNG Web Search

searxng_search
Read-onlyIdempotent

Search the web through SearXNG across multiple engines, with presets and filters for categories, engines, language, time range, and safe search.

Instructions

Search the web using SearXNG metasearch engine. Aggregates results from multiple search engines (Google, Bing, DuckDuckGo, Wikipedia, etc.) for comprehensive results.

Supports filtering by category (news, images, videos, science, IT, etc.), specific engines, language, time range, and safe search.

Presets provide quick access to common search scenarios:

  • 'general' — all engines, no filter (default web search)

  • 'code' — GitHub + StackOverflow for code and programming questions

  • 'tech' — IT category for computer science and technology topics

  • 'academic' — science category + arXiv/PubMed/Google Scholar for papers and research

  • 'news' — news category, past month

When a preset is used, explicit categories/engines/time_range params still take precedence over preset defaults.

Args:

  • query (string, required): Search query. Supports syntax like site:, filetype:, etc.

  • preset ('general'|'code'|'tech'|'academic'|'news', optional): Quick search mode — see above

  • categories (string, optional): Filter by category ('general', 'news', 'images', 'videos', 'science', 'it', 'files', 'music', 'repos', 'packages')

  • engines (string, optional): Specific engines ('google', 'bing', 'duckduckgo', 'wikipedia', 'github', 'stackoverflow', 'arxiv', 'pubmed', 'youtube')

  • language (string, optional): Language code ('en', 'zh', 'ja', 'de', 'fr', 'es')

  • pageno (number, default 1): Page number (1-50)

  • time_range ('day'|'month'|'year', optional): Time filter for recent results

  • safesearch (number, default 0): 0=off, 1=moderate, 2=strict

  • response_format ('markdown'|'json', default 'markdown'): Output format

Returns structured search results including:

  • results[]: Array of {title, url, content, engine, engines[], score, category}

  • answers[]: Instant answers from SearXNG

  • suggestions[]: Related search suggestions

  • infoboxes[]: Summary info boxes with links and attributes

Examples:

  • "Search for Rust programming tutorials" -> query="Rust programming tutorials", preset="general"

  • "Find recent news about AI" -> query="AI", preset="news"

  • "Search GitHub for MCP servers" -> query="MCP server", preset="code"

  • "Find scientific papers about transformers" -> query="transformer model", preset="academic"

  • "What is WebAssembly?" -> query="What is WebAssembly", preset="tech"

Error Handling:

  • Returns "403 Forbidden" error if JSON format is not enabled in SearXNG settings

  • Returns connection error if SearXNG server is unreachable

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "searxng_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSearch query string. Supports search engine syntax like site:github.com, filetype:pdf, etc.
pagenoNoPage number for paginated results (default: 1).
presetNoSearch preset for common use cases. 'general' = all engines, no category filter; 'code' = search GitHub and StackOverflow for code and programming; 'tech' = IT category for computer science and technology; 'academic' = science category for papers and research (arXiv, PubMed, Google Scholar); 'news' = recent news from the past month. Leave empty to manually specify categories/engines.
enginesNoComma-separated list of search engines to use. Examples: 'google', 'bing', 'duckduckgo', 'wikipedia', 'github', 'stackoverflow', 'arxiv', 'pubmed', 'youtube'. Leave empty to use all enabled engines.
languageNoLanguage code for search results. Examples: 'en', 'zh', 'ja', 'de', 'fr', 'es'. Leave empty for default.
categoriesNoComma-separated list of search categories. Examples: 'general', 'news', 'images', 'videos', 'science', 'it', 'files', 'music', 'repos', 'packages'. Leave empty for general search.
safesearchNoSafe search level: 0=off, 1=moderate, 2=strict (default: 0).
time_rangeNoTime range filter. Only return results from the specified period. Use 'day' for very recent results, 'month' for results from the past month, 'year' for the past year.
response_formatNoOutput format: 'markdown' for human-readable, 'json' for structured data (default: 'markdown').markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, idempotent and non-destructive, so the safety profile is covered; the description adds real behavior beyond that — the 403 error when JSON output is not enabled server-side, connection failures, and the pagination ceiling. It stops short of noting rate limits or result-count caps, which is the main remaining gap.

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?

Front-loaded well — purpose, presets, then details — but the 'Args' section duplicates fields already fully documented in the schema (100% coverage), which is substantial wasted length. The preset list and examples earn their place; the per-parameter recap largely does not.

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

Completeness5/5

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

For a 9-parameter search tool with no output schema, the description covers the missing piece itself: the shape of results[], answers[], suggestions[] and infoboxes[]. Combined with preset semantics and error modes, an agent has everything needed to call and interpret it.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds semantics the schema only implies: explicit categories/engines/time_range override preset defaults, and query supports operators like site: and filetype:. The Args block otherwise restates the schema fields.

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?

States a specific verb and resource ('Search the web using SearXNG metasearch engine') and immediately scopes it as an aggregating metasearch across named engines. The preset list further pins down the tool's scope, so an agent can distinguish it from a lightweight suggestion tool like searxng_autocomplete without opening the schema.

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

Usage Guidelines5/5

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

The preset table is effectively a when-to-use map: 'code' for programming questions, 'academic' for papers, 'news' for recent news, and so on, each naming the engines/categories it implies. It also states the precedence rule when a preset is combined with explicit categories/engines/time_range, and gives five intent-to-call examples.

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

Deploy Server

Other Tools