local-search-mcp
Provides tools to run web searches through a SearXNG instance's JSON API (default http://127.0.0.1:18880, configurable via SEARXNG_URL) and fetch the resulting pages as Markdown, with the option to index the crawled content for semantic retrieval.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
local-search-mcp
在 Claude Code、Codex 等客户端中搜索网页、提取正文。MCP 通过 stdio 在本机运行,SearXNG 提供搜索结果,Chromium 将网页正文提取为 Markdown。需要语义检索时,再启动 Qdrant。
安装
先安装 Git、uv 和 Docker。安装脚本会创建 Python 3.11 环境,并为当前用户安装依赖和 Chromium。
git clone https://github.com/qiu-youyou/local-search-mcp.git
cd local-search-mcp
if [ ! -e .env ]; then
(umask 077; printf 'SEARXNG_SECRET=%s\n' "$(openssl rand -hex 32)" > .env)
fi
docker compose up -d searxng
./install.shSearXNG 默认运行在 http://127.0.0.1:18880。如果已经有开启 JSON 接口的 SearXNG 实例,可以在克隆后直接运行 ./install.sh,并在项目根目录的 .env 或客户端环境变量中设置 SEARXNG_URL。
Related MCP server: Web Explorer MCP
接入 MCP 客户端
在刚才克隆的目录中,根据客户端执行其中一条命令。
claude mcp add --scope user --transport stdio local-search-mcp -- "$PWD/start.sh"
codex mcp add local-search-mcp -- "$PWD/start.sh"用 CC Switch 时,打开 MCP → 添加 MCP,粘贴 .mcp.json.example 的内容。把 command 改为 start.sh 的绝对路径,勾选要启用的客户端并保存。
新开一个会话,试着说「用 search_web 搜索 Python MCP 官方文档,再用 crawl_url 提取第一条官方结果的正文」。也可以用 crawl_batch 一次读取多个已知网址。
可选:语义检索
在项目目录执行以下命令。Compose 会读取 .env 中的 SEARXNG_SECRET。如果此前使用的是已有 SearXNG,按安装步骤生成密钥,将 SEARXNG_SECRET=... 写入 .env。
docker compose --profile vector up -d qdrantQdrant 默认地址为 http://127.0.0.1:18333。可以通过 QDRANT_URL 使用已有实例。首次索引会下载嵌入模型。
工具 | 用途 |
| 搜索网页、提取正文并索引到当前集合。 |
| 写入指定正文,或通过自然语言检索已索引内容。 |
| 查看当前集合统计,或列出会话集合。 |
| 清空当前集合,或删除过期的自动命名集合。默认清理 7 天前的集合,跳过当前集合。 |
每次启动 MCP 进程都会生成新的会话 ID。Qdrant 的数据保存在 Docker 命名卷中。要跨会话访问同一份索引,在客户端传入固定的 SESSION_ID,或直接指定 COLLECTION_NAME。后者优先。需要在 Claude Code 启动时清理过期集合,可以参考 Hook 配置示例,替换其中的绝对路径。
配置与排查
.env.example 列出了可调整的环境变量。客户端显式传入的环境变量优先于
.env。CRAWL_PROXY可指定网页抓取的代理。容器端口被占用时,在
.env中修改SEARXNG_PORT或QDRANT_PORT,同时将对应的SEARXNG_URL或QDRANT_URL改为新端口。MCP 无法连接时,检查客户端配置里的
start.sh绝对路径,并确认已运行./install.sh。直接执行./start.sh后等待标准输入属于正常状态。有 Node.js 时,可以用./start.sh --inspect打开 MCP Inspector。搜索失败时,检查
docker compose ps searxng,再访问 JSON 接口查看结果及unresponsive_engines。curl -fsSG http://127.0.0.1:18880/search \ --data-urlencode 'q=SearXNG' \ --data-urlencode 'format=json'Chromium 启动失败时,先重跑
./install.sh。Linux 上如提示缺少系统库,执行.venv/bin/python -m playwright install --with-deps chromium。
许可证
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, URL content extraction to Markdown, site mapping, and recursive web crawler.
Web search, Google SERP, page extraction to markdown and cited answers for AI agents.
Search the web, fetch any URL and map a site as clean, LLM-ready Markdown.
Web search and content extraction for AI: Google results, any page as Markdown or JSON
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables local LLMs to search the web and fetch clean content from URLs without API keys, using SearxNG and Mozilla Readability.241MIT
- AlicenseAqualityDmaintenanceEnables private web search and webpage content extraction using a local SearxNG instance, prioritizing user privacy and autonomy.22MIT
- FlicenseNot gradedqualityDmaintenanceEnables web search and content scraping from multiple engines via a local SearXNG instance, allowing AI assistants to retrieve and extract web content.1-
- AlicenseAqualityDmaintenanceLocal on-demand web search and page reading for coding agents via SearXNG, with SSRF-protected fetching and Markdown extraction.2MIT