NS

netlops/sosearch

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

133 stars 17 forks 质量 68 趋势 30NOASSERTION

🔎 一个查询。三个搜索引擎。通过HTTP API或MCP自托管的AI代理网页搜索。聚合DuckDuckGo、Brave和Yahoo。使用Rust构建。无需API密钥。

概览

一个极快的伪网络搜索引擎API,也可作为AI代理使用。该项目通过直接向流行引擎复用请求并同时抓取结果,模拟了像SerpAPI或Tavily这样的热门API,无需官方且昂贵的API密钥。 - : 由 tokio 驱动,实现异步并发 I/O。- : 利用 rquest 模拟 TLS(例如,在 TLS/HTTP2 层模拟 Chrome 124 浏览器占用),以减少与标准 HTTP 客户端(Rust 版 curl_cffi)的阻断。- : 将 DuckDuckGo、Yahoo 和 Brave HTML 结果归一化为标准化的 SearchResult JSON 数组。 *(初级标准搜索)*(由必应支持)*(独立索引) 该项目内置了支持这两者及其他遵循.agents/规范的工具的AI代理支持。 将SoSearch作为AI代理(Claude、Gemini、Cursor等)的MCP服务器运行: 这揭示了一种web_search工具,AI代理可以调用它来搜索网络。

概述(AI 翻译)

一个用 Rust 编写的闪电高速伪 Web 搜索引擎 API ——同时也作为 AI 代理的 MCP 服务器。 该项目通过直接向流行引擎复用请求并同时抓取结果,模拟了像 SerpAPI 或 Tavily 这样的流行 API,无需官方且昂贵的 API 密钥。

哲学

  • 性能:由tokio驱动,实现异步并发I/O。
  • 机器人绕过:利用 rquest 进行 TLS 模拟(例如,在 TLS/HTTP2 层模拟 Chrome 124 浏览器占用),以减少与标准 HTTP 客户端(Rust 版 curl_cffi)的阻断。
  • 标准化:将 DuckDuckGo、Yahoo 和 [Brave HTML 结果归一化为标准化的 SearchResult JSON 数组。

核心堆栈

  • 阿克苏姆
  • 东京
  • RQUEST
  • 刮削器

🔍 支持的搜索引擎

  • DuckDuckGo(主要标准搜索)
  • Yahoo(由必应提供技术)
  • 勇敢的寻找(独立索引)

📁 项目结构

🤖 特工技能与MCP支持

该项目内置了对 Gemini CLI 及其他遵循 .agents/ 约定工具的人工智能代理支持。

可用技能

技能 描述

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

SoSearch API

A lightning-fast pseudo Web Search Engine API written in Rust — also works as an MCP server for AI agents. This project emulates popular APIs like SerpAPI or Tavily without needing official and expensive API keys, by multiplexing requests to popular engines directly and scraping the results concurrently.

Philosophy

  • Performance: Powered by tokio for async concurrent I/O.
  • Bot Bypass: Leverages rquest with TLS impersonation (e.g., simulating a Chrome 124 browser footprint at the TLS/HTTP2 layer) to minimize blocking vs standard HTTP clients (the Rust equivalent of curl_cffi).
  • Standardized: Normalizes DuckDuckGo, Yahoo, and Brave HTML results into a standardized SearchResult JSON array.

Core Stack

🔍 Supported Search Engines

  • DuckDuckGo (Primary standard search)
  • Yahoo (Powered by Bing)
  • Brave Search (Independent index)

📁 Project Structure

src/
├── main.rs              # Entry point: HTTP server or MCP mode (--mcp)
├── search.rs            # Shared concurrent search logic
├── mcp.rs               # MCP stdio server (JSON-RPC 2.0)
├── models.rs            # SearchResultItem, SearchResponse structs
└── engines/
    ├── mod.rs            # SearchEngine enum + trait dispatch
    ├── duckduckgo.rs     # DuckDuckGo scraper
    ├── yahoo.rs          # Yahoo scraper (Bing-powered)
    └── brave.rs          # Brave Search scraper
examples/
├── fetch_html.rs        # Download raw HTML for offline debugging
└── test_parser.rs       # Offline CSS selector iteration
.gemini/                 # Gemini CLI agent config
├── GEMINI.md            # Project-level system prompt
├── settings.json        # MCP server configuration
└── skills/              # Project-level agent skills
    ├── sosearch-engine-dev/  # Scraper development workflow
    └── sosearch-api-ops/     # API operations & deployment
.agents/                 # Generic agent config (compatible with multiple AI tools)
└── skills/              # Same skills, alternative discovery path
    ├── sosearch-engine-dev/
    └── sosearch-api-ops/

🤖 Agent Skills & MCP Support

This project includes built-in AI agent support for both Gemini CLI and other tools that follow the .agents/ convention.

Available Skills

Skill Description
sosearch-engine-dev Full workflow for adding/debugging search engine scrapers: fetch HTML → test selectors offline → decode URLs → integrate
sosearch-api-ops Operations guide: build, run, test, deploy (local + Docker), troubleshoot

MCP Servers

Configured in .gemini/settings.json:

Server Package Purpose
filesystem @modelcontextprotocol/server-filesystem Scoped file access to project directory

Usage with Gemini CLI

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "sosearch": { "command": "/path/to/SoSearch", "args": ["--mcp"] } } }