MCP server and CLI for web search and page reading with SearXNG, Crawl4AI, and Redis.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Search-first MCP server and CLI for web research.
[!NOTE]
sourceweave-search-mcpis the default local entrypoint. When explicitSOURCEWEAVE_SEARCH_*endpoint variables are absent, it discovers or starts the local Docker-backed stack automatically. If you already run the services yourself, set explicit endpoints and it will use them instead.
Overview β’ Getting started β’ Managed local runtime β’ MCP client setup β’ CLI β’ Container deployments β’ OpenWebUI β’ Runtime configuration β’ Development
SourceWeave Web Search gives MCP clients a compact three-tool contract for web research:
search_web(query, domains?, urls?, effort?) discovers sources and returns compact results with stable page_id handles.read_pages(page_ids, focus?) reads stored pages by page_id.read_urls(urls, focus?) reads direct URLs without searching first.It combines:
| Component | Role |
|---|---|
| SearXNG | Search discovery |
| Crawl4AI | Clean HTML extraction |
| Redis or Valkey | Persisted page cache and page_id store |
| MarkItDown | Document conversion for PDFs and other supported files |
3.12+SOURCEWEAVE_SEARCH_* endpoints only if you want hosted or self-managed servicesRun the server from the published package:
Or start the MCP server over HTTP:
When no endpoint env vars are set, sourceweave-search-mcp:
| Mode | What happens |
|---|---|
| Managed stack found | Join the existing SourceWeave-managed stack for the current runtime state directory |
| Healthy external stack found | Reuse the canonical local ports 19080, 19235, and 16379 without ownership |
| No reusable stack | Start and supervise a Docker-backed stack on canonical or free local ports |
Managed state lives under ~/.sourceweave-local/managed-runtime. Multiple MCP processes on the same machine share one managed stack per state directory.
[!IMPORTANT] Managed runtime removes containers only when the last active SourceWeave-managed process exits. Named volumes are preserved, so cache data survives restarts. If the original owning process dies, a later process can recover the same stack from Docker project identity and persisted runtime state.
If you already run SearXNG, Crawl4AI, and Redis or Valkey yourself, or want to point at hosted services, set explicit endpoints and the MCP entrypoint will bypass managed Docker startup:
sourceweave-search runs the tool directly. Use it when the supporting services are already available or when you provide explicit endpoints. It does not start Docker.
[!TIP] The direct CLI also accepts
--searxng-base-url,--crawl4ai-base-url, and--cache-redis-urloverrides.
Example opencode.json / opencode.jsonc / ~/.config/opencode/opencode.json:
For a shared HTTP endpoint instead:
Example .vscode/mcp.json:
For a shared HTTP endpoint instead:
Example .mcp.json:
For a project-scoped shared config, place the same block in .mcp.json at the repo root.
The direct CLI is useful once the supporting services are already reachable. It gives you the same search-first workflow without the MCP wrapper.
The managed local runtime is for host-side uvx or uv run launches. Containerized deployments still use explicit endpoint wiring.
ghcr.io/mrnaqa/sourceweave-web-search-mcpdocker compose up -d --build mcpExample container run:
This repo also ships a generated standalone OpenWebUI tool file at artifacts/sourceweave_web_search.py.
From a repo checkout, verify it is in sync with the canonical implementation:
Paste that artifact into OpenWebUI when you want the standalone tool-file deployment path. The generated file rewrites the default endpoints to the repo-local compose service names so it matches the container deployment path out of the box.
Optional environment variables:
| Variable | Purpose |
|---|---|
SOURCEWEAVE_SEARCH_SEARXNG_BASE_URL | SearXNG URL template. Must contain <query>. |
SOURCEWEAVE_SEARCH_CRAWL4AI_BASE_URL | Crawl4AI base URL. |
SOURCEWEAVE_SEARCH_CACHE_REDIS_URL | Redis or Valkey URL used for caching. |
FASTMCP_HOST | Host for sse or streamable-http transport. |
FASTMCP_PORT | Port for sse or streamable-http transport. |
If the endpoint variables are unset, sourceweave-search-mcp defaults to managed local runtime.
Default endpoint values:
http://127.0.0.1:19080/search?format=json&q=<query>http://127.0.0.1:19235redis://127.0.0.1:16379/2Default preferred host ports for managed startup:
1908019235163798000 when run directly with uvx; 18000 at /mcp when using the repo's mcp compose serviceUseful checks:
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/sourceweave-web-search)<a href="https://allmcps.com/mcp/sourceweave-web-search"><img src="https://allmcps.com/api/badge/sourceweave-web-search?style=directory" alt="SourceWeave Web Search on AllMCPs" /></a>