Skip to content

Configuration

Pummelchen edited this page Sep 11, 2026 · 7 revisions

Configuration

Resolved once at boot from an optional KEY=VALUE file plus environment variables. Environment always wins. SEARCH_CONFIG_FILE selects an explicit file.

The server starts with no credentials at all. Missing configuration is reported by web_search_status, never by refusing to start.

Providers

Variable Purpose
TAVILY_API_KEY Tavily — preferred first choice
BRAVE_SEARCH_API_KEY Brave Search — broad independent index
MOJEEK_API_KEY Mojeek — independent index (paid API)
EXA_API_KEY Exa — neural retrieval, agent highlights
JINA_API_KEY Raises the Jina Reader rate limit; optional
SEARXNG_BASE_URL Self-hosted SearXNG. Must have JSON enabled
OPEN_WEB_SEARCH_URL Aggregation endpoint (aggregator, not an index)
PARALLEL_MCP_URL Defaults to https://search.parallel.ai/mcp

Policy

Variable Default Purpose
SEARCH_PROVIDER_ORDER tavily, brave, mojeek, exa, searxng, open_web_search, duckduckgo, startpage, parallel Preference order for provider=auto
SEARCH_DISABLED_PROVIDERS — Comma-separated providers to switch off
SEARCH_MAX_RESULTS 8 Clamped to 1–20
SEARCH_FAST_TIMEOUT_MS 12000 Whole-search budget, fast
SEARCH_BALANCED_TIMEOUT_MS 15000 Whole-search budget, balanced
SEARCH_THOROUGH_TIMEOUT_MS 20000 Whole-search budget, thorough
SEARCH_ENABLE_SCRAPERS false Enable DuckDuckGo and Startpage
SEARCH_ENABLE_PARALLEL false Enable the upstream Parallel MCP adapter
SEARCH_ENABLE_JINA_READER true Jina Reader fallback for web_open
SEARCH_CACHE_TTL_SECONDS 120 In-memory cache lifetime; 0 disables

HTTP

Variable Default Purpose
SEARCH_CONNECT_TIMEOUT_MS 3000 Connection timeout
SEARCH_REQUEST_TIMEOUT_MS 10000 Per-request timeout
SEARCH_MAX_RETRIES 2 Retries after the first attempt (idempotent requests only)
SEARCH_USER_AGENT SwiftWebSearchMCP/1.0 (+https://example.invalid/project) Outbound User-Agent

Security and logging

Variable Default Purpose
SEARCH_ALLOW_PRIVATE_NETWORK false Lift SSRF restrictions. See Security
SEARCH_LOG_LEVEL info trace, debug, info, warning, error, none
SEARCH_LOG_QUERIES false Log queries verbatim instead of a stable hash
SEARCH_CONFIG_FILE — Load a config file explicitly

All logs go to stderr; stdout carries JSON-RPC framing only. Secrets are read from the environment and are never written to disk or logged.

example.env in the repository contains a commented template of all of the above.

Clone this wiki locally