隐私优先的开源聚合搜索工具
简介
基于 MCP 协议的 SearXNG 搜索工具,通过自建实例实现隐私保护的网络检索,零外部依赖且代码透明可审计。
原始描述
Web search using SearXNG instance via MCP. Provides web search capability for agents with configurable SearXNG endpoint.
通过你的 Agent 添加
安装目录:searxng-search/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
searxng-search 是一款基于 MCP(Model Context Protocol)协议的网页搜索工具,允许用户通过自有或可信的 SearXNG 实例执行隐私友好的网络搜索。该 Skill 提供三种使用方式:通过 mcporter CLI 调用 MCP 服务器、直接运行 Bash 脚本,或直接使用 curl 访问 SearXNG API。
配置流程简单,仅需设置 SEARXNG_URL 环境变量指向个人 SearXNG 实例,即可通过 mcporter call searxng.web_search query="关键词" 完成搜索。支持 text、json、markdown 三种输出格式,便于不同场景下的结果处理。
显著优点
- 隐私优先架构:所有搜索请求直接发往用户自主控制的 SearXNG 实例,绕过商业搜索引擎的数据收集,符合 GDPR/CCPA 合规要求。
- 零第三方依赖:Python 服务端仅使用标准库实现,无 pip 依赖包,彻底消除供应链攻击风险。
- MCP 原生集成:作为标准 MCP Server,可与 Claude、Cursor 等支持 MCP 的 AI 助手无缝协作,扩展大模型的实时信息获取能力。
- 轻量可移植:代码仅 445 行(Python + Shell),支持快速部署在本地、VPS 或容器环境中。
- 透明可信:MIT 开源协议,无混淆代码或网络行为,安全审计评级 A 级(82 分)。
潜在缺点与局限性
- 基础设施依赖:必须自行部署或获取可信的 SearXNG 实例,对技术门槛有一定要求;公共实例可用性不稳定。
- 功能相对基础:仅支持标准网页搜索,不具备图片/视频搜索、搜索建议、结果排名优化等高级特性。
- 无内置容错机制:Bash 脚本缺少超时控制,网络波动时可能挂起;错误提示较为简略。
- HTTPS 非强制:当前版本接受 HTTP 协议配置,存在中间人攻击风险,需用户自行确保实例启用 TLS。
适合人群
- 隐私敏感用户:希望避免搜索记录被商业平台追踪的技术爱好者
- 自托管爱好者:已部署或计划部署 SearXNG、HomeLab 基础设施的用户
- AI 工作流搭建者:需要将实时搜索结果集成到 Claude、Cursor 等 MCP 客户端的开发者
- 企业合规场景:对数据出境和第三方 SaaS 有严格限制的组织
常规风险
风险类型
说明
缓解建议
实例信任风险
搜索内容发送至用户配置的 SearXNG 实例,若实例被篡改可截获查询
使用自建实例或可信社区实例,启用 HTTPS 并验证证书
传输安全风险
HTTP 配置时搜索关键词明文传输
强制使用 HTTPS URL,定期检查 TLS 配置
维护持续性风险
T3 来源(个人开发者),长期更新保障不确定
关注 GitHub 仓库动态,考虑 fork 后自行维护
功能边界风险
依赖 SearXNG 实例本身的搜索质量和反爬能力
选择维护良好的实例,必要时多实例冗余
- 基础设施依赖:必须自行部署或获取可信的 SearXNG 实例,对技术门槛有一定要求;公共实例可用性不稳定。
- 功能相对基础:仅支持标准网页搜索,不具备图片/视频搜索、搜索建议、结果排名优化等高级特性。
- 无内置容错机制:Bash 脚本缺少超时控制,网络波动时可能挂起;错误提示较为简略。
- HTTPS 非强制:当前版本接受 HTTP 协议配置,存在中间人攻击风险,需用户自行确保实例启用 TLS。
适合人群
- 隐私敏感用户:希望避免搜索记录被商业平台追踪的技术爱好者
- 自托管爱好者:已部署或计划部署 SearXNG、HomeLab 基础设施的用户
- AI 工作流搭建者:需要将实时搜索结果集成到 Claude、Cursor 等 MCP 客户端的开发者
- 企业合规场景:对数据出境和第三方 SaaS 有严格限制的组织
常规风险
风险类型
说明
缓解建议
实例信任风险
搜索内容发送至用户配置的 SearXNG 实例,若实例被篡改可截获查询
使用自建实例或可信社区实例,启用 HTTPS 并验证证书
传输安全风险
HTTP 配置时搜索关键词明文传输
强制使用 HTTPS URL,定期检查 TLS 配置
维护持续性风险
T3 来源(个人开发者),长期更新保障不确定
关注 GitHub 仓库动态,考虑 fork 后自行维护
功能边界风险
依赖 SearXNG 实例本身的搜索质量和反爬能力
选择维护良好的实例,必要时多实例冗余
| 风险类型 | 说明 | 缓解建议 |
|---|---|---|
| 实例信任风险 | 搜索内容发送至用户配置的 SearXNG 实例,若实例被篡改可截获查询 | 使用自建实例或可信社区实例,启用 HTTPS 并验证证书 |
| 传输安全风险 | HTTP 配置时搜索关键词明文传输 | 强制使用 HTTPS URL,定期检查 TLS 配置 |
| 维护持续性风险 | T3 来源(个人开发者),长期更新保障不确定 | 关注 GitHub 仓库动态,考虑 fork 后自行维护 |
| 功能边界风险 | 依赖 SearXNG 实例本身的搜索质量和反爬能力 | 选择维护良好的实例,必要时多实例冗余 |
该 Skill 适合作为隐私优先搜索工作流的基础组件,建议配合 HTTPS 强制策略和定期安全审计使用。
技能正文
name: searxng-search description: "Search the web using a self-hosted SearXNG instance. Use when users ask to search with SearXNG, or when web search is needed and a SearXNG instance is configured. Supports categories, engines, time range, and language filters." license: MIT allowed-tools:
- Bash(python3 scripts/*)
SearXNG Search Skill
Search the web using a SearXNG instance via its API.
Network destinations
Two levels — both matter:
- Direct (this script): the script makes a single request to your
configured
base_url. HTTPS by default; plain HTTP is allowed only for loopback hosts (127.0.0.1, ::1, localhost) or for non-loopback hosts if the config containsallow_insecure_http = true(with a warning). Ifauth.typeis set, the Authorization header travels to that single host and nowhere else. Redirects are never followed: a 30x response is an error, because following a redirect could forward the Authorization header to a host you did not configure. Pointbase_urldirectly at the final endpoint (or front the instance with a same-origin reverse proxy). - Downstream (your SearXNG instance): the instance then forwards the query, language, and categories to the engines it itself has been configured with (Google, Bing, DuckDuckGo, Brave, Baidu, etc., as enabled by the instance operator). This skill does not control that hop — it is a property of any SearXNG client. If query contents reaching the upstream engines is a concern, configure your instance to use engines you trust, or self-host engines locally.
Configuration issues
This skill depends on a local SearXNG config file. Keep setup details out of this file and load references/configuration.md only when needed.
If scripts/search.py reports configuration, auth, or instance setup errors,
read references/configuration.md before retrying. Common examples include:
ERROR: Config file not foundERROR: Invalid TOML .../ERROR: Invalid JSON ...ERROR: base_url is requiredERROR: Environment variable ... is not setERROR: auth.token required for bearer authERROR: auth.user and auth.pass required for basic authERROR: Unknown auth.type ...ERROR: HTTP 401/ERROR: HTTP 403
Usage
Run the search script:
python3 scripts/search.py [OPTIONS] <query>
Options
Flag
Description
-c, --categories
Comma-separated categories (general, news, images, videos, music, files, it, science, social media)
-e, --engines
Comma-separated engines (google, duckduckgo, bing, etc.)
-l, --language
Language code (en, zh-CN, ja, etc.)
-p, --page
Page number (default: 1)
-t, --time-range
Time range: day, month, year
-n, --max-results
Max results to show (overrides config default)
-s, --safesearch
Safe search: 0 (off), 1 (moderate), 2 (strict)
Examples
# Basic search
python3 scripts/search.py "SearXNG documentation"
# Search news from the last day
python3 scripts/search.py -c news -t day "latest tech news"
# Search with specific engines, page 2
python3 scripts/search.py -e google,duckduckgo -p 2 "rust programming"
# Search in Chinese with more results
python3 scripts/search.py -l zh-CN -n 10 "开源搜索引擎"
Best Practices
- Technical topics (programming, software, science, IT, etc.): Always use English as both the query language and search language (
-l en), regardless of the user's input language. Translate the query to English if needed. English results are more comprehensive and up-to-date for technical content.
- Chinese lifestyle topics (food, travel, shopping, local services, social trends, etc.): In addition to the default search, run a second search with
-e baidu,sogou -l zh-CN using a Chinese query to capture China-specific results. Merge and deduplicate results before presenting to the user.
Workflow
- User asks to search for something
- Determine the topic type:
- Technical: translate query to English if needed, search with
-l en
- Chinese lifestyle: run the default search first, then an additional search with
-e baidu,sogou -l zh-CN
- Run
scripts/search.py with the query and any relevant filters
- Present results to the user in a readable format
- If user wants more results, use
-p for pagination or -n for more per page
| Flag | Description |
|---|---|
-c, --categories |
Comma-separated categories (general, news, images, videos, music, files, it, science, social media) |
-e, --engines |
Comma-separated engines (google, duckduckgo, bing, etc.) |
-l, --language |
Language code (en, zh-CN, ja, etc.) |
-p, --page |
Page number (default: 1) |
-t, --time-range |
Time range: day, month, year |
-n, --max-results |
Max results to show (overrides config default) |
-s, --safesearch |
Safe search: 0 (off), 1 (moderate), 2 (strict) |
# Basic search
python3 scripts/search.py "SearXNG documentation"
# Search news from the last day
python3 scripts/search.py -c news -t day "latest tech news"
# Search with specific engines, page 2
python3 scripts/search.py -e google,duckduckgo -p 2 "rust programming"
# Search in Chinese with more results
python3 scripts/search.py -l zh-CN -n 10 "开源搜索引擎"
Best Practices
- Technical topics (programming, software, science, IT, etc.): Always use English as both the query language and search language (
-l en), regardless of the user's input language. Translate the query to English if needed. English results are more comprehensive and up-to-date for technical content.
- Chinese lifestyle topics (food, travel, shopping, local services, social trends, etc.): In addition to the default search, run a second search with
-e baidu,sogou -l zh-CN using a Chinese query to capture China-specific results. Merge and deduplicate results before presenting to the user.
Workflow
- User asks to search for something
- Determine the topic type:
- Technical: translate query to English if needed, search with
-l en
- Chinese lifestyle: run the default search first, then an additional search with
-e baidu,sogou -l zh-CN
- Run
scripts/search.py with the query and any relevant filters
- Present results to the user in a readable format
- If user wants more results, use
-p for pagination or -n for more per page
-l en), regardless of the user's input language. Translate the query to English if needed. English results are more comprehensive and up-to-date for technical content.-e baidu,sogou -l zh-CN using a Chinese query to capture China-specific results. Merge and deduplicate results before presenting to the user.- User asks to search for something
- Determine the topic type:
- Technical: translate query to English if needed, search with
-l en - Chinese lifestyle: run the default search first, then an additional search with
-e baidu,sogou -l zh-CN
- Technical: translate query to English if needed, search with
- Run
scripts/search.pywith the query and any relevant filters - Present results to the user in a readable format
- If user wants more results, use
-pfor pagination or-nfor more per page