Back to MCP directory
publicPublicdnsLocal runtime

mcp-server-searxng-n8n

一个专为n8n工作流设计的SearXNG搜索集成MCP服务器,支持通过JSON参数配置搜索请求。

article

README

🚀 MCP 服务器用于 SearXNG n8n 集成

本项目是一个专门设计的 Model Context Protocol (MCP) 服务器,旨在将 SearXNG 与 n8n 工作流完美结合,为用户提供便捷的搜索集成体验。

🚀 快速开始

✨ 主要特性

  • 专门为 SearXNG 和 n8n 集成打造的 MCP 服务器。
  • 支持在 n8n 工作流中方便地使用 SearXNG 进行搜索。
  • 可灵活配置搜索参数,满足不同的搜索需求。

📦 安装指南

开发环境安装

git clone https://github.com/tamler/mcp-server-searxng-n8n.git
cd mcp-server-searxng-n8n
npm install
npm run build

开发环境测试

# 注意使用双减号 `--` 通过 npm start 传递参数到脚本
npm start -- --instance=https://your-searxng-instance.com

💻 使用示例

在 n8n 中使用

先决条件
  • 运行中的 n8n 实例。
  • 对 SearXNG 实例的访问权限(例如 https://your-searxng-instance.com)。
  • 在您的 n8n 实例中已安装 n8n-nodes-mcp 包。
配置 MCP 节点(服务器连接)
  • 在工作流中添加一个“MCP”节点。
  • 在节点设置中,在 服务器连接 部分:
    • 命令: npx
    • npx 的参数: -y mcp-server-searxng-n8n --instance=https://your-searxng-instance.com
      • https://your-searxng-instance.com 替换为您实际的 SearXNG URL。
    • 环境变量: (留空)
配置 MCP 节点(工具操作)
  • 仍然在 MCP 节点设置中,在 操作 部分:
    • 工具名称: 从下拉菜单中选择 search
    • 工具的参数 (JSON 对象): 输入包含搜索参数的 JSON 对象。例如,使用 n8n 表达式如 {{ $json.chatInput }} 作为值中的值。

可用的搜索参数(工具参数 JSON)

search 工具支持以下参数(仅需提供 q): | 参数 | 详情 | |------|------| | q(必需) | 搜索查询字符串 | | categories | 逗号分隔的搜索类别列表 | | engines | 逗号分隔的使用的搜索引擎列表 | | language | 搜索的语言代码 | | time_range | 结果的时间范围(day, month, year) | | safesearch | 安全搜索级别(0: 无,1: 中等,2: 严格) | | image_proxy | 启用图像代理以通过 SearXNG 返回图像 | | enabled_plugins | 逗号分隔的已启用插件列表 | | disabled_plugins | 逗号分隔的已禁用插件列表 | | enabled_engines | 逗号分隔的已启用搜索引擎列表 | | disabled_engines | 逗号分隔的已禁用搜索引擎列表 | | format | 输出格式(json, csv, rss, html)。默认为 json。 |

示例 n8n 工具参数(JSON)

基础用法
{
  "q": "n8n automation",
  "engines": "google,duckduckgo",
  "language": "en"
}
高级用法
{
  "q": "n8n automation",
  "format": "html"
}

(请确保在 JSON 中仅包含所需的参数)

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client