/ 目录 / 演练场 / mcp-searxng
● 社区 ihor-sokoliuk ⚡ 即开即用

mcp-searxng

作者 ihor-sokoliuk · ihor-sokoliuk/mcp-searxng

Private, self-hosted web search for your AI — no API key, no rate-limit drama, no search provider tracking your queries.

mcp-searxng connects to any SearXNG instance (your own or a public one) and exposes two tools: web search with pagination/time/lang/safesearch, and URL-to-markdown extraction. Best when you already run SearXNG or want zero-tracking search without paying per query.

为什么要用

核心特性

实时演示

实际使用效果

searxng.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "searxng",
      "command": "npx",
      "args": [
        "-y",
        "mcp-searxng"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "searxng": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-searxng"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add searxng -- npx -y mcp-searxng

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: mcp-searxng

Fact-check a claim against multiple sources

👤 Writers, analysts ⏱ ~10 min beginner

何时使用: You need to confirm something across a few independent sources.

步骤
  1. Search
    Search the exact claim phrase. Return top 10 from different domains.✓ 已复制
    → Diverse result list
  2. Cross-read
    web_url_read on the 3 most authoritative — quote the sections that speak to the claim.✓ 已复制
    → Quoted excerpts
  3. Verdict
    Claim: supported, contested, or false? Cite specifically.✓ 已复制
    → Verdict with citations

结果: A cited fact-check.

Build a zero-API-key research assistant for your team

👤 Teams that won't/can't buy search API keys ⏱ ~40 min intermediate

何时使用: Everyone wants AI search but no one wants to manage Tavily keys per person.

步骤
  1. Run SearXNG behind your intranet
    Set up SearXNG container on the team server, point mcp-searxng at it.✓ 已复制
    → All team AI clients search via shared instance
  2. Test from multiple clients
    Run the same query from Claude Desktop and Cursor — both should hit the same SearXNG.✓ 已复制
    → Consistent results

结果: Team-wide AI search with one instance, no per-user billing.

组合

与其他 MCP 搭配,撬动十倍杠杆

searxng + filesystem

Research and save notes

Search 'SBOM best practices', web_url_read the top 3, save a distilled memo to ./notes/sbom.md.✓ 已复制

Stack both — kindly for platform-aware full fetches, searxng for private general search

Use searxng for the initial search; if any result is SO/GitHub, fall back to kindly for richer content.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
searxng_web_search query: str, pageno?: int, time_range?: day|week|month|year, language?: str, safesearch?: 0|1|2 Any web search free (your SearXNG)
web_url_read url: str, start_heading?: int, end_heading?: int, start_paragraph?: int, end_paragraph?: int Clean extraction of an article free

成本与限制

运行它的成本

API 配额
Unlimited (your SearXNG instance)
每次调用 Token 数
Search: 500-1500 tokens. Read: 1-10k depending on page.
费用
Free
提示
Narrow queries with time_range and language — cuts both tokens and SearXNG load.

安全

权限、密钥、影响范围

凭据存储: No keys needed; just SEARXNG_URL
数据出站: Your SearXNG instance (which in turn queries upstream engines)

故障排查

常见错误与修复

Connection refused

SearXNG not running or SEARXNG_URL wrong. curl the URL directly first.

验证: curl $SEARXNG_URL
Empty results for any query

SearXNG blocked by upstream engines or misconfigured. Check /search directly in browser.

验证: Open $SEARXNG_URL/search?q=test
web_url_read returns mostly nav junk

Some sites are JS-heavy; narrow with heading/paragraph ranges, or use a different extractor.

替代方案

mcp-searxng 对比其他方案

替代方案何时用它替代权衡
omnisearchYou want multi-provider + AI searchRequires provider API keys
kindly-web-searchYou want platform-aware full contentStill needs Serper/Tavily key unless paired with SearXNG
brave-searchYou're OK with one commercial providerPaid above the free tier

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills