SearXNG MCP Server
Provides web search and autocomplete through a SearXNG instance, with support for presets, categories, engines, language, pagination, time range, safesearch, and Markdown or JSON responses.
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 MCP Server find recent articles about AI regulation from the past month"
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 MCP Server
An MCP (Model Context Protocol) server that lets AI tools search the web via your SearXNG instance.
Prerequisites
Node.js >= 18
A running SearXNG instance with JSON format enabled in
settings.yml:
search:
formats:
- html
- json # Required for this MCP serverRelated MCP server: SearXNG MCP Server
Quick Start
Install via Claude Code
# Global (recommended, works in all projects)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp
# Project-level only
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcpManual
SEARXNG_BASE_URL=http://localhost:8080 npx -y @the-bao/searxng-mcpConfiguration
Environment Variable
Variable | Required | Description |
| Yes | Your SearXNG instance URL (e.g. |
MCP Client Setup
Add to your MCP client configuration. Examples for common clients:
Claude Code
# Global (recommended, works in all projects)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp
# Project-level only
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"searxng": {
"command": "npx",
"args": ["-y", "@the-bao/searxng-mcp"],
"env": {
"SEARXNG_BASE_URL": "http://localhost:8080"
}
}
}
}Cline / Roo Code (.vscode/mcp.json)
{
"servers": {
"searxng": {
"command": "npx",
"args": ["-y", "@the-bao/searxng-mcp"],
"env": {
"SEARXNG_BASE_URL": "http://localhost:8080"
}
}
}
}Cursor (.cursor/mcp.json)
{
"mcpServers": {
"searxng": {
"command": "npx",
"args": ["-y", "@the-bao/searxng-mcp"],
"env": {
"SEARXNG_BASE_URL": "http://localhost:8080"
}
}
}
}Tools
searxng_search
Search the web via SearXNG, aggregating results from Google, Bing, DuckDuckGo, Wikipedia, and 70+ other engines.
Parameter | Type | Default | Description |
| string | required | Search query (supports |
| string | — | Quick search mode: |
| string | — | Filter: |
| string | — | Specific engines: |
| string | — | Language code: |
| number | 1 | Page number (1-50) |
| string | — |
|
| number | 0 | 0=off, 1=moderate, 2=strict |
| string |
|
|
Presets provide one-click search mode switching. Explicit params (categories, engines, time_range) override preset values when both are provided.
Preset | categories | engines | time_range | Use case |
| — | — | — | General web search |
| — |
| — | Code & programming |
|
| — | — | IT & computer science |
|
|
| — | Papers & research |
|
| — |
| Recent news |
Examples:
searxng_search(query="Rust programming tutorial", preset="general")
searxng_search(query="AI", preset="news")
searxng_search(query="MCP server", preset="code")
searxng_search(query="transformer attention", preset="academic")
searxng_search(query="WebAssembly", preset="tech")searxng_autocomplete
Get search query suggestions.
Parameter | Type | Default | Description |
| string | required | Partial search query |
| string | — | Language code |
Docker Compose (SearXNG)
If you don't have SearXNG running yet:
services:
searxng:
image: searxng/searxng:latest
ports:
- "8080:8080"
volumes:
- ./searxng-settings.yml:/etc/searxng/settings.yml:roMake sure searxng-settings.yml has JSON format enabled:
use_default_settings: true
search:
formats:
- html
- json中文文档
SearXNG MCP 服务器
一个基于 MCP(模型上下文协议)的服务器,让 AI 工具通过你的 SearXNG 实例搜索网页。
前置要求
Node.js >= 18
一个运行中的 SearXNG 实例,并在
settings.yml中启用 JSON 格式:
search:
formats:
- html
- json # 本 MCP 服务器必须启用此项快速开始
通过 Claude Code 安装
# 全局安装(推荐,所有项目可用)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp
# 仅当前项目
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp手动运行
SEARXNG_BASE_URL=http://localhost:8080 npx -y @the-bao/searxng-mcp配置
环境变量
变量 | 必填 | 说明 |
| 是 | SearXNG 实例地址(如 |
MCP 客户端配置
将以下内容添加到你的 MCP 客户端配置中。以下是常见客户端的示例:
Claude Code
# 全局安装(推荐,所有项目可用)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp
# 仅当前项目
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcpClaude Desktop(claude_desktop_config.json)
{
"mcpServers": {
"searxng": {
"command": "npx",
"args": ["-y", "@the-bao/searxng-mcp"],
"env": {
"SEARXNG_BASE_URL": "http://localhost:8080"
}
}
}
}Cline / Roo Code(.vscode/mcp.json)
{
"servers": {
"searxng": {
"command": "npx",
"args": ["-y", "@the-bao/searxng-mcp"],
"env": {
"SEARXNG_BASE_URL": "http://localhost:8080"
}
}
}
}Cursor(.cursor/mcp.json)
{
"mcpServers": {
"searxng": {
"command": "npx",
"args": ["-y", "@the-bao/searxng-mcp"],
"env": {
"SEARXNG_BASE_URL": "http://localhost:8080"
}
}
}
}工具
searxng_search
通过 SearXNG 搜索网页,聚合 Google、Bing、DuckDuckGo、Wikipedia 等 70 多个搜索引擎的结果。
参数 | 类型 | 默认值 | 说明 |
| string | 必填 | 搜索关键词(支持 |
| string | — | 快捷搜索模式: |
| string | — | 分类过滤: |
| string | — | 指定引擎: |
| string | — | 语言代码: |
| number | 1 | 页码(1-50) |
| string | — | 时间范围: |
| number | 0 | 安全搜索:0=关闭、1=适中、2=严格 |
| string |
| 输出格式: |
预设(Presets) 提供一键切换搜索模式。当同时指定预设和显式参数(categories、engines、time_range)时,显式参数优先。
预设 | categories | engines | time_range | 适用场景 |
| — | — | — | 通用搜索 |
| — |
| — | 代码与编程 |
|
| — | — | IT 与计算机科学 |
|
|
| — | 论文与学术研究 |
|
| — |
| 近期新闻 |
示例:
searxng_search(query="Rust 编程教程", preset="general")
searxng_search(query="AI", preset="news") # 搜索近期 AI 新闻
searxng_search(query="MCP server", preset="code") # 搜索代码仓库
searxng_search(query="transformer attention", preset="academic") # 搜索学术论文
searxng_search(query="WebAssembly", preset="tech") # 搜索 IT 技术内容searxng_autocomplete
获取搜索关键词建议。
参数 | 类型 | 默认值 | 说明 |
| string | 必填 | 部分搜索关键词 |
| string | — | 语言代码 |
Docker Compose(SearXNG)
如果你还没有部署 SearXNG:
services:
searxng:
image: searxng/searxng:latest
ports:
- "8080:8080"
volumes:
- ./searxng-settings.yml:/etc/searxng/settings.yml:ro确保 searxng-settings.yml 启用了 JSON 格式:
use_default_settings: true
search:
formats:
- html
- json许可证
MIT
Available Tools
2 toolssearxng_autocompleteSearXNG AutocompleteARead-onlyIdempotent
Get search query autocomplete suggestions from SearXNG. Returns a list of suggested completions for a partial search query.
Args:
query (string, required): Partial search query
language (string, optional): Language code (e.g., 'en', 'zh')
Returns: Array of suggested search query completions.
Examples:
query="rust prog" -> ["rust programming", "rust programming language", "rust programming tutorial"]
Inputs: query (required), language.
searxng_searchSearXNG Web SearchARead-onlyIdempotent
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
Inputs: query (required), pageno, preset, engines, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: full web search versus query-completion suggestions. There is no realistic way an agent would confuse searxng_search with searxng_autocomplete.
Both tools use the same predictable searxng_<verb/action> pattern in snake_case. The naming is fully consistent and self-explanatory.
With only two tools the surface is quite thin, though for a search-engine wrapper it is a defensible minimal set. It sits at the borderline where a couple more operations (e.g. instance/config info) might be expected.
Search plus autocomplete covers the core lifecycle of a metasearch wrapper, including rich filtering and presets. Minor gaps exist around configuration or engine-discovery operations, but nothing that would block typical agent workflows.
Maintenance
Related MCP Connectors
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
The best web search for your AI Agent
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
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.27ISC
- AlicenseAqualityDmaintenanceEnables 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.31MIT
- 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.1MIT
- AlicenseAqualityBmaintenanceEnables privacy-friendly web searches through the SearXNG engine, with support for multiple engines, categories, languages, time ranges, and configurable result counts.1450 PyPI2AGPL 3.0