Skip to main content
Glama

searxlens-mcp

An MCP server for web search via SearXNG, built for research-style workflows: it can fan a topic out across several related queries and merge the results, not just answer one query at a time.

Inspired by the broader mcp-searxng ecosystem.

Tools

A single search against SearXNG. Supports count, language, categories, time_range, pageno, and min_score (drops results below a relevance threshold, when the instance reports scores). Results are cached in-memory for SEARXLENS_SEARCH_CACHE_TTL_MS.

Takes 2+ related queries, runs them in parallel, and merges the results:

  • deduplicates by normalized URL (ignores utm_* tracking params, trailing slashes, and fragments)

  • a URL surfaced by more than one sub-query is ranked above one found by only a single sub-query — cross-query agreement is treated as a stronger signal than any one engine's relevance score

  • ties are broken by SearXNG's own score, when present

Good for "research this topic from a few angles" prompts, where a single query would miss results that a slightly different phrasing would catch.

read_url

Fetches a URL and extracts its readable text — strips <script>, <nav>, <footer>, etc., and picks the largest remaining content block (a light readability heuristic, not a full port of Mozilla Readability). Cached for SEARXLENS_URL_CACHE_TTL_MS.

Related MCP server: Web Search MCP Server

Configuration

Variable

Default

Description

SEARXNG_URL

http://localhost:8080

One instance, or several separated by ; for failover (tried in order).

SEARXLENS_DEFAULT_RESULTS

8

Default results for web_search.

SEARXLENS_MAX_RESULTS

20

Hard ceiling on count.

SEARXLENS_SEARCH_CACHE_TTL_MS

300000 (5 min)

Search result cache TTL. 0 disables.

SEARXLENS_URL_CACHE_TTL_MS

900000 (15 min)

read_url cache TTL. 0 disables.

SEARXLENS_MAX_MULTI_QUERIES

6

Max sub-queries per multi_search call.

SEARXLENS_REQUEST_TIMEOUT_MS

10000

Timeout per outbound HTTP request.

Your SearXNG instance needs JSON output enabled — in settings.yml:

search:
  formats:
    - html
    - json

Install & run

npm install
npm run build

MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "searxlens": {
      "command": "node",
      "args": ["/absolute/path/to/searxlens-mcp/build/index.js"],
      "env": { "SEARXNG_URL": "http://localhost:8080" }
    }
  }
}

Roadmap

Rough priority order for what's next — not committed, just notes for whoever picks this up:

  • HTTP transport (MCP_HTTP_PORT), for remote/shared deployments

  • Instance capability discovery (/config) tool

  • HTML fallback when an instance rejects format=json

  • Real test suite (currently just a manual smoke script) + CI

  • Docker image

  • Optional: rank fusion in multi_search using reciprocal rank fusion instead of raw hit-count, for more principled merging

License

MIT

Available Tools

3 tools
read_urlA

Fetch a URL and extract its readable text (boilerplate stripped), for reading an article found via search in more depth.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to fetch.
max_lengthNoMax characters to return (default 4000).

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that the tool fetches a URL and returns boilerplate-stripped readable text, which is good. However, it does not mention potential failure modes, handling of non-HTML content, external network side effects, or any constraints—leaving some behavioral gaps.

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?

A single, tightly worded sentence conveys the action, the output format, the key behavioral detail (boilerplate stripping), and the intended use case. Every word earns its place.

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 two-parameter tool with fully documented parameters and no output schema, the description is largely sufficient: it explains the output (readable text), the processing (boilerplate stripped), and the workflow context. It only lacks explicit alternative routing and edge-case behavior.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters are already documented. The description adds no parameter-level meaning beyond what the schema provides, so the baseline of 3 is appropriate.

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 a specific verb-resource pair ('Fetch a URL and extract its readable text') and states that it strips boilerplate. This clearly distinguishes it from the sibling search tools, which find content rather than fetch and read a specific URL.

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 phrase 'for reading an article found via search in more depth' gives a clear contextual trigger: use this after search, when a result needs deeper reading. It does not explicitly name the alternatives or state when not to use it, but the intended workflow is inferable from the sibling names and the stated purpose.

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. 3 tool updatesv0.1.0
    • First observedmulti_search
    • First observedread_url
    • First observedweb_search

TDQS

A4.1/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clear, non-overlapping purpose: web_search for single precise queries, multi_search for exploratory multi-query research, and read_url for fetching page content. The descriptions explicitly contrast the two search tools, leaving no ambiguity.

Naming Consistency4/5

web_search and multi_search follow a consistent [modifier]_search pattern, while read_url uses a verb_noun pattern. The naming is predictable and readable, with only a minor deviation in the third tool's structure.

Tool Count5/5

Three tools is a well-scoped set for a search-and-read server. Each tool serves a distinct need without redundancy, and the count feels appropriately minimal yet complete for the stated purpose.

Completeness4/5

The toolset covers the core workflow of searching (both single and multi-query) and reading results. Minor gaps like advanced search filters or pagination are not included, but these are optional conveniences rather than essential dead ends for basic research.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Provides web search capabilities using SearxNG, allowing AI assistants like Claude to search the web with a privacy-respecting metasearch engine.
    1
    11
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables web search across multiple search engines (DuckDuckGo, Bing, Startpage) with parallel execution and result deduplication. Also provides web page content extraction capabilities.
    2
    -
  • 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