searxng-search-mcp
Provides tools for interacting with a SearXNG instance, enabling web search with ranked results, instant answers, query suggestions, and configurable search parameters such as categories, language, time range, engines, safesearch, and result limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@searxng-search-mcpsearch the web for news about the EU AI Act from the past week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
searxng-search-mcp
An MCP server that exposes SearXNG web search and search suggestions to AI clients, distributed via npx.
Tools
Tool | Description |
| Full web search: ranked results, instant answers, and query suggestions. |
| Autocomplete suggestions for a partial query. |
searxng_web_search parameters
Parameter | Type | Description |
| string | Required. Search query. |
| string | Comma-separated categories, e.g. |
| string | Result language as BCP-47 code, e.g. |
| string | One of |
| integer | Page number, 1-based (default 1). |
| string | Comma-separated SearXNG engine names to use instead of categories. |
| integer |
|
| integer | Maximum number of results to return, clamped to 1-50 (default from |
searxng_suggest parameters
Parameter | Type | Description |
| string | Required. Partial query to complete. |
Related MCP server: SearXNG MCP Server
Requirements
Node.js >= 20
A SearXNG instance with the JSON format enabled. Most public instances block the JSON API (403), so a self-hosted instance is the supported path — see Running a local SearXNG instance.
Configuration
Environment variable | Required | Default | Description |
| yes | — | Base URL of your SearXNG instance, e.g. |
| no |
| Request timeout in milliseconds. |
| no |
| Default maximum number of results, clamped to 1-50. |
Usage
All clients use the same command: npx -y searxng-search-mcp, configured with the SEARXNG_URL environment variable.
Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"searxng-search-mcp": {
"command": "npx",
"args": ["-y", "searxng-search-mcp"],
"env": {
"SEARXNG_URL": "http://localhost:8888"
}
}
}
}Claude Code
claude mcp add searxng-search-mcp --env SEARXNG_URL=http://localhost:8888 -- npx -y searxng-search-mcpopencode
opencode.json:
{
"mcp": {
"searxng-search-mcp": {
"type": "local",
"command": ["npx", "-y", "searxng-search-mcp"],
"enabled": true,
"environment": {
"SEARXNG_URL": "http://localhost:8888"
}
}
}
}Cursor
.cursor/mcp.json:
{
"mcpServers": {
"searxng-search-mcp": {
"command": "npx",
"args": ["-y", "searxng-search-mcp"],
"env": {
"SEARXNG_URL": "http://localhost:8888"
}
}
}
}VS Code
.vscode/mcp.json:
{
"servers": {
"searxng-search-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "searxng-search-mcp"],
"env": {
"SEARXNG_URL": "http://localhost:8888"
}
}
}
}Running a local SearXNG instance
SearXNG disables the JSON output format by default. The instance must be configured to allow it, otherwise search requests return 403. This repository ships a ready-to-use Docker Compose setup.
docker-compose.yml:
services:
searxng:
image: docker.io/searxng/searxng:latest
ports:
- "8888:8080"
volumes:
- ./searxng:/etc/searxng
restart: unless-stoppedsearxng/settings.yml:
use_default_settings: true
server:
secret_key: "searxng-search-mcp-dev-instance-change-me"
search:
formats:
- html
- jsonStart and verify:
docker compose up -d
curl 'http://localhost:8888/search?q=test&format=json'The curl command must return a JSON object with a results array. If it returns 403, json is missing from search.formats in settings.yml — the two files above are the exact fix.
Troubleshooting
403 Forbidden — the JSON format is not enabled on the instance. Add
jsontosearch.formatsin the SearXNGsettings.ymland restart (see above).429 Too Many Requests — the instance rate limiter is throttling requests. Self-host an instance, or add your IP to the limiter
pass_iplist insettings.yml.Timeout / network error — check that
SEARXNG_URLpoints at a reachable instance and adjustSEARXNG_TIMEOUT_MSif the instance is slow.
Development
npm install # installs and builds (prepare script)
npm test # unit + tool + e2e tests (uses a mock SearXNG server)
npm run test:e2e # e2e only: builds, then spawns dist/index.js against a mock
docker compose up -d
SEARXNG_INTEGRATION_URL=http://localhost:8888 npm run test:integrationSmoke-test the server with the MCP Inspector. This lists the server's tools (Inspector v2 sanitizes inherited env, so SEARXNG_URL must be passed via -e):
npx -y @modelcontextprotocol/inspector --cli node dist/index.js -e SEARXNG_URL=http://localhost:8888 --method tools/list --format jsonOmit --method to open the interactive web UI instead.
Publishing
Releases are published to npm by .github/workflows/publish.yml when a v* tag is pushed. It uses npm trusted publishing (tokenless OIDC) with provenance.
One-time maintainer setup:
Enable 2FA on your npm account.
Configure a trusted publisher on npmjs.com bound to this repository and the
publish.ymlworkflow.Make the repository public before the first release — npm provenance requires a public GitHub repository.
The workflow runs on Node 24, which ships npm >= 11.5 (required for tokenless trusted publishing).
License
Available Tools
2 toolssearxng_suggestCRead-only
Get search query autocomplete suggestions from the SearXNG instance.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Partial search query |
Output Schema
| Name | Required | Description |
|---|---|---|
| suggestions | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds essentially nothing beyond the purpose — no rate-limit, latency, or instance-behavior context — and the output schema handles return values, leaving this sentence with no incremental behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler or redundancy. It is tight, though its brevity is also the source of its missing guidance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter read tool with an output schema and clear annotations, the description covers the core purpose adequately. It falls short only on routing guidance versus the sibling search tool, which an agent would benefit from.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With one parameter and 100% schema description coverage, the schema already documents 'query' as a 'Partial search query'. The description's phrase 'search query autocomplete suggestions' mirrors that meaning without adding format, length, or example detail, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Get') and resource ('search query autocomplete suggestions'), which is clearly distinct from the sibling searxng_web_search. It does not explicitly name the sibling to sharpen the contrast, but the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use, when-not-to-use, or alternative guidance. An agent must infer from the word 'autocomplete' alone that this is for query-completion rather than result retrieval; searxng_web_search is never referenced.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searxng_web_searchBRead-only
Search the web through a SearXNG instance. Returns ranked results, instant answers, and query suggestions.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| pageno | No | Page number, 1-based (default 1) | |
| engines | No | Comma-separated SearXNG engine names to use instead of categories | |
| language | No | Result language as BCP-47 code, e.g. 'en', 'tr-TR', or 'all' | |
| categories | No | Comma-separated categories, e.g. 'general' (default), 'images', 'videos', 'news', 'it', 'music', 'science', 'files', 'social media' | |
| safesearch | No | 0 off, 1 moderate, 2 strict | |
| time_range | No | Restrict to results from this period | |
| max_results | No | Max results to return, 1-50 (default from SEARXNG_MAX_RESULTS or 20) |
Output Schema
| Name | Required | Description |
|---|---|---|
| query | Yes | |
| answers | Yes | |
| results | Yes | |
| suggestions | Yes | |
| unresponsiveEngines | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety and reach profile is covered. The description adds a useful but generic statement about output shape ('ranked results, instant answers, and query suggestions'), yet says nothing about pagination behavior, rate limits, result ordering, or whether suggestion-vs-result content is separable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, purpose front-loaded, zero redundancy. Nothing could be cut without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description does not need to explain return values, and the annotation pair covers read-only/open-world semantics. What is missing is a one-line note on the search's relationship to searxng_suggest and any hint about pagination, which would make an already well-structured definition complete for a filter-rich search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and each of the 8 parameters carries its own description (engine names, BCP-47 language, category list, safesearch scale, time_range enum, max_results default). The description contributes no parameter-level meaning beyond the schema, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('Search the web through a SearXNG instance') and names the source system, so the core purpose is unambiguous. It does not, however, differentiate itself from the sibling searxng_suggest — and its mention of 'query suggestions' as a return value arguably muddies that boundary rather than clarifying it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus searxng_suggest, nor any note about when to prefer it (e.g., retrieving documents vs. autocomplete). No prerequisites, exclusions, or context for the many filter parameters are offered.
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.
2 tool updates
v0.1.0- First observed
searxng_suggest - First observed
searxng_web_search
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one performs web searches, the other provides autocomplete suggestions. There is no overlap or ambiguity.
Both names follow a consistent pattern: searxng_<action> (searxng_web_search and searxng_suggest). The naming is predictable and readable.
With only 2 tools, the surface is thin for a search server. While each tool earns its place, the lack of additional features like pagination or site-specific search makes it borderline.
The tools cover basic search and suggestions but miss common operations like advanced search parameters, result filtering, or pagination. This is a notable gap for a search-oriented server.
Maintenance
Related MCP Connectors
Web search, agentic search, news, page retrieval, sitemaps, and trending topics through Search1API.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Serper MCP — wraps the Serper Google Search API (serper.dev)
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform privacy-respecting web searches through SearXNG, with support for multiple search engines, categories, and advanced filtering options.296 npm27MIT
- AlicenseAqualityDmaintenanceEnables 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.1296 npmMIT
- AlicenseAqualityAmaintenanceEnables privacy-friendly web searches through the SearXNG engine, with support for multiple engines, categories, languages, time ranges, and configurable result counts.1444 PyPIAGPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to run privacy-friendly web, news, image, and video searches through their own SearXNG instance, with autocomplete, instance/engine discovery, and pagination, language, time-range, SafeSearch, engine, and domain filters. It also fetches pages and returns clean readable text, stripping headers, footers, navigation, sidebars, ads, and comment sections by default while letting the agent re-include them per call.34 npmMIT