web-search-mcp

web-search-mcp

Provides free web search, content fetching, image search, and deep research via SearXNG, no API keys required.

Category
Visit Server

README

Free Web Search MCP 🔍

MCP server สำหรับ ค้นหาเว็บ + อ่านเนื้อหาหน้าเว็บ แบบฟรี 100% ไม่ต้องสมัคร ไม่ต้องมี API key ของ Google/Bing — ใช้ SearXNG (meta-search ที่รันเองบน Docker)

ให้ OpenWebUI หรือ CLI ที่ไม่มี search engine สามารถ "เสิร์ชอินเทอร์เน็ต" ได้

เครื่องมือ (tools) ที่ให้

Tool หน้าที่
web_search(query, num_results, language) ค้นหาเว็บ คืนชื่อเรื่อง + ลิงก์ + สรุปย่อ
fetch_url(url, max_chars) ดึงเนื้อหาหลักของหน้าเว็บ แปลงเป็นข้อความสะอาด
image_search(query, num_results, language) ค้นรูปภาพ คืน markdown ฝังรูป + ลิงก์แหล่งที่มา
deep_research(query, num_sources, max_chars_per_source, include_images, language) วิจัยเชิงลึก: ค้นหลายแหล่งพร้อมกัน ดึงเนื้อหาเต็ม รวมเป็นเอกสารเดียวพร้อมเลขอ้างอิง [1][2]… + รูปภาพ + รายการแหล่งอ้างอิง

Deep Research ทำงานยังไง? ตัว MCP รวบรวม "หลักฐาน" จากหลายแหล่ง (ฟรี ไม่ต้องมี LLM/API key) แล้วส่งเนื้อหา+อ้างอิง+รูปกลับไป ให้ LLM ใน OpenWebUI เป็นคนเรียบเรียงสรุปโดยอ้างอิงเลข [n] — ได้ผลแนวเดียวกับ Deep Research โดยไม่เสียเงิน

สถาปัตยกรรม

OpenWebUI ──HTTP/OpenAPI──> mcpo ──MCP stdio──> server.py ──HTTP──> SearXNG ──> อินเทอร์เน็ต
CLI (Claude Code/Cline) ───────────MCP stdio──> server.py ──┘

วิธีติดตั้ง (Docker — แนะนำ)

cd "Code VSTH/web-search-mcp"

# 1) ตั้ง secret_key ของ SearXNG ให้เป็นค่าสุ่ม
#    แก้ไฟล์ searxng/settings.yml บรรทัด secret_key

# 2) (ทางเลือก) ตั้ง API key ให้ mcpo
cp .env.example .env        # แล้วใส่ MCPO_API_KEY ถ้าต้องการ

# 3) สั่งรันทั้งระบบ
docker compose up -d --build

ตรวจสอบ:

  • SearXNG : http://localhost:8080 (ลองค้นหาดูได้)
  • OpenAPI docs : http://localhost:8000/docs (จะเห็น web_search / fetch_url)
  • ทดสอบ JSON API ของ SearXNG :
    curl "http://localhost:8080/search?q=test&format=json"
    

ต่อกับ OpenWebUI

  1. เปิด OpenWebUI → Settings → Tools (หรือ Admin → Settings → Tools / Functions → External Tools)
  2. Add Tool Server ใส่ URL:
    http://localhost:8000
    

    ถ้า OpenWebUI รันใน Docker คนละ network ให้ใช้ http://host.docker.internal:8000 หรือเอา service mcp ไปอยู่ network เดียวกับ OpenWebUI แล้วใช้ชื่อ service

  3. ถ้าตั้ง MCPO_API_KEY ไว้ ให้ใส่ key นั้นในช่อง API key
  4. บันทึก แล้วเปิดใช้งานในแชท — โมเดลจะเรียก web_search / fetch_url ได้เอง

ต่อกับ CLI ที่พูด MCP (Claude Code / Cline ฯลฯ)

รันแบบ stdio โดยตรง (ไม่ต้องใช้ mcpo). ติดตั้ง deps ในเครื่องก่อน:

pip install -r mcp/requirements.txt

ตัวอย่าง config (เช่น claude_desktop_config.json หรือ MCP config ของ CLI):

{
  "mcpServers": {
    "web-search": {
      "command": "python",
      "args": ["C:\\Users\\LAPTOP-BACKER\\Code VSTH\\web-search-mcp\\mcp\\server.py"],
      "env": { "SEARXNG_URL": "http://localhost:8080" }
    }
  }
}

ต้องให้ container searxng รันอยู่ (docker compose up -d searxng) เพื่อให้ SEARXNG_URL ใช้งานได้

เพิ่มใน Claude Code ได้ด้วย:

claude mcp add web-search -e SEARXNG_URL=http://localhost:8080 -- python "C:/Users/LAPTOP-BACKER/Code VSTH/web-search-mcp/mcp/server.py"

ปรับแต่ง (env)

ตัวแปร ค่าเริ่มต้น ความหมาย
SEARXNG_URL http://searxng:8080 ที่อยู่ SearXNG
HTTP_TIMEOUT 20 timeout (วินาที)
MAX_RESULTS_CAP 20 เพดานจำนวนผลลัพธ์
RESEARCH_CONCURRENCY 5 จำนวนหน้าที่ deep_research ดึงพร้อมกัน
MCPO_API_KEY (ว่าง) API key ของ OpenAPI endpoint

หมายเหตุ

  • ทุกอย่างฟรี ไม่มีค่าใช้จ่าย แต่ SearXNG ดึงจาก engine สาธารณะ — ถ้ายิงถี่มากบาง engine อาจ rate-limit (แก้ได้โดยเปิด/ปิด engine ใน searxng/settings.yml)
  • เปลี่ยน secret_key ใน searxng/settings.yml ก่อนใช้งานจริงเสมอ

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured