Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 2.88 KB

File metadata and controls

63 lines (47 loc) · 2.88 KB

DeepFetch Configuration

DeepFetch is configured entirely through environment variables plus the client-side MCP config that launches the server.

Required Environment Variables

Variable Purpose
KAGI_API_KEY Kagi search API key used during discovery.
SCRAPFLY_API_KEY Scrapfly API key used during extraction.

Transport and Logging

Variable Default Purpose
DEEPFETCH_TRANSPORT stdio MCP transport passed to FastMCP.run().
DEEPFETCH_LOG_LEVEL INFO Logging level when file logging is enabled.
DEEPFETCH_LOG_PATH unset Explicit log file path.
DEEPFETCH_LOG_DIR system temp dir Directory used when log files are enabled.
DEEPFETCH_LOG_RUN_ID unset Optional run identifier embedded into logs.
DEEPFETCH_DEBUG_SEARCH unset Enables verbose search-path logging.

Search Tuning

These settings affect internet_search.

Variable Default Purpose
DEEPFETCH_MAX_RESULTS 3 Final result count returned to the client.
DEEPFETCH_MAX_CANDIDATES 8 Maximum Kagi candidates fetched before reranking.
DEEPFETCH_MAX_PARALLEL_FETCHES 4 Thread-pool concurrency for page extraction.
DEEPFETCH_MAX_SNIPPETS 5 Maximum snippets considered per page during ranking.
DEEPFETCH_CONTEXT_CHARS 4000 Maximum snippet context window.
DEEPFETCH_MIN_SIMILARITY 0.3 Semantic similarity threshold for ONNX ranking.
DEEPFETCH_TIMEOUT_SECONDS 60 Network timeout budget for search/extraction operations.
KAGI_API_ENDPOINT Kagi default endpoint Override for the Kagi API base URL.
SCRAPFLY_COUNTRY us Scrapfly country hint.
SCRAPFLY_FORMAT text:only_content,no_links,no_images Scrapfly extraction format.

Semantic Asset Paths

These settings affect both internet_search and pdf_extract_text when semantic ranking is available.

Variable Default
ONNX_MODEL_PATH /opt/onnx_assets_out/model.onnx
ONNX_TOKENIZER_PATH /opt/onnx_assets_out/tokenizer.json
ONNX_MAX_LENGTH 256
PDF_ONNX_MODEL_PATH falls back to ONNX_MODEL_PATH
PDF_ONNX_TOKENIZER_PATH falls back to ONNX_TOKENIZER_PATH
PDF_ONNX_MAX_LENGTH falls back to ONNX_MAX_LENGTH

If the semantic assets are missing, DeepFetch falls back to keyword-centered snippets instead of failing the request.

Client Configs

DeepFetch ships sample launch configs for common MCP clients:

Each example assumes a local Docker launch path and passes the required API keys through the client-side environment configuration.