How icewreck/searxng-mcp-server works
SearxNG MCP Server exposes five search and URL-fetch tools over MCP, using stdio by default or streamable HTTP when configured. The principal flow is client request → MCP tool dispatch → SearxNG query or URL retrieval → typed response. Configuration selects the SearxNG endpoint and transport; logging supports runtime operations. README documents the distinct web, image, video, news, and fetch capabilities. Edges follow the shown registration and calls; external transport details are documented, while URL fetching's conversion implementation is only partially excerpted.
Main entry points: tools.py Search Client · main.py Server Entrypoint · models.py Response Models · config.py Runtime Configuration
Components 15
MCP Server
- Server Entrypoint
src/searxng_mcp_server/main.py
Search and Fetch
- Search Client
src/searxng_mcp_server/tools.py - Web Search
src/searxng_mcp_server/tools.py - Image Search
src/searxng_mcp_server/tools.py - Video Search
src/searxng_mcp_server/tools.py - News Search
src/searxng_mcp_server/tools.py - URL Fetch and Convert
src/searxng_mcp_server/tools.py
Runtime Support
- Runtime Configuration
src/searxng_mcp_server/config.py - Logging
src/searxng_mcp_server/log.py - Response Models
src/searxng_mcp_server/models.py
Other components
- MCP Client
- SearxNG Instance
- URL Hosts
- stdio Transport
- HTTP Client
Connections 23
- MCP Client → Server Entrypoint: sends MCP requests
README.md - Server Entrypoint → Runtime Configuration: loads settings
src/searxng_mcp_server/main.py - Server Entrypoint → Search Client: creates and registers tools
src/searxng_mcp_server/main.py - Server Entrypoint → stdio Transport: runs by default
src/searxng_mcp_server/main.py - Server Entrypoint → MCP Client: serves HTTP optionally
README.md - Server Entrypoint → Logging: logs runtime
src/searxng_mcp_server/main.py - Search Client → Runtime Configuration: uses settings
src/searxng_mcp_server/tools.py - Search Client → Web Search: implements
src/searxng_mcp_server/tools.py - Search Client → Image Search: implements
src/searxng_mcp_server/tools.py - Search Client → Video Search: implements
src/searxng_mcp_server/tools.py - Search Client → News Search: implements
src/searxng_mcp_server/tools.py - Search Client → URL Fetch and Convert: implements
src/searxng_mcp_server/tools.py - Web Search → SearxNG Instance: queries
src/searxng_mcp_server/tools.py - Image Search → SearxNG Instance: queries
src/searxng_mcp_server/tools.py - Video Search → SearxNG Instance: queries
src/searxng_mcp_server/tools.py - News Search → SearxNG Instance: queries
src/searxng_mcp_server/tools.py - URL Fetch and Convert → URL Hosts: retrieves content
src/searxng_mcp_server/tools.py - Web Search → Response Models: returns typed response
src/searxng_mcp_server/tools.py - Image Search → Response Models: returns typed response
src/searxng_mcp_server/tools.py - Video Search → Response Models: returns typed response
src/searxng_mcp_server/tools.py - News Search → Response Models: returns typed response
src/searxng_mcp_server/tools.py - URL Fetch and Convert → Response Models: returns typed response
src/searxng_mcp_server/tools.py - Search Client → HTTP Client: sends HTTP requests
src/searxng_mcp_server/tools.py