local-search-gateway-mcp
Provides a free, no-paid-API web search gateway for AI agents using DuckDuckGo and Bing HTML scrapers, with tools for search, URL fetching, and text extraction.
README
Local Search Gateway MCP
本项目是一个运行在本地的 No-paid-API Search Gateway MCP Server,用于给 Codex / Hermes / AI Agent / Skills / Plugins 提供统一、透明、可控的免费联网搜索入口。
当前初始化版本
已落地 Phase 1 的基础闭环:
- MCP stdio server
search_webfetch_urlsearch_extracthealth- DuckDuckGo HTML 搜索适配器
- Bing HTML 搜索适配器
- 静态 HTML 正文抽取
- 短期内存缓存
NO_PAID_API=true强约束语义SEARCH_PROXY_MODE=env配置语义与 health 透明输出
当前版本不接任何付费搜索 API,不写死代理,不自动切换代理节点。
安装
npm install
npm run build
本地开发
npm run dev
运行
npm run build
npm start
Codex MCP 配置示例
[mcp_servers.local_search]
command = "node"
args = ["/absolute/path/to/local-search-gateway-mcp/dist/server.js"]
[mcp_servers.local_search.env]
NO_PAID_API = "true"
SEARCH_PROXY_MODE = "env"
SEARCH_ENGINE_ORDER = "duckduckgo_html,bing_html"
SEARCH_HEADLESS = "false"
如果用户自己需要代理,请自行在 MCP env 中传入:
[mcp_servers.local_search.env]
HTTP_PROXY = "http://127.0.0.1:7890"
HTTPS_PROXY = "http://127.0.0.1:7890"
ALL_PROXY = "socks5://127.0.0.1:7891"
MCP Tools
search_web
{
"query": "ceramic candle holder importer Germany",
"limit": 5,
"policy": "free_auto"
}
fetch_url
{
"url": "https://example.com",
"max_chars": 4000
}
search_extract
{
"query": "site:example.com products",
"limit": 3,
"mode": "abstract"
}
health
{}
环境变量
| 变量 | 默认值 | 说明 |
|---|---|---|
NO_PAID_API |
true |
语义强约束,不使用付费搜索 API |
SEARCH_PROXY_MODE |
env |
只继承用户环境变量代理配置 |
SEARCH_ENGINE_ORDER |
duckduckgo_html,bing_html |
搜索源顺序 |
SEARCH_TIMEOUT_MS |
15000 |
单次请求超时 |
SEARCH_USER_AGENT |
Mozilla/5.0 ... |
搜索请求 UA |
SEARCH_HEADLESS |
false |
为后续 browser fallback 预留 |
产品文档
完整 PRD 见:docs/PRD.md
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.