Skip to main content
Glama
ollama-web-tools-mcp

ollama-web-tools-mcp

by financesaur

Ollama Web Tools MCP

Python 3.12+ MCP server preserving the Ruby oracle's web_search and web_fetch contracts and adding cluesift_domain_fetch. It uses the official Python MCP SDK, stdio by default, and stateless JSON streamable HTTP at / with --http.

Configuration

Production (prod or production in the first set of ENVIRONMENT, CLUESIFT_ENV, or ENV) requires OLLAMA_KEY_POOL_FILE. The reloadable UTF-8 JSON document has exactly this useful shape; array order is strict priority and duplicates are removed while preserving first occurrence:

{"keys":["primary-ollama-tools-key","secondary-ollama-tools-key"]}

The file is re-read when its mtime changes or after a two-second TTL. Outside production only, comma-separated OLLAMA_CLOUD_API_KEYS, then OLLAMA_API_KEY, are fallback inputs. Keys are never logged; diagnostics identify them only by the first 12 lowercase hex characters of SHA-256.

Optional Ollama timeouts: OLLAMA_OPEN_TIMEOUT=10, OLLAMA_READ_TIMEOUT=60, OLLAMA_WRITE_TIMEOUT=30. ClueSift aliases use complete endpoint URLs (not base URLs):

  • cluesift-test: CLUESIFT_ARTIFACT_TEST_URL and _TOKEN

  • cluesift-prod: CLUESIFT_ARTIFACT_PROD_URL and _TOKEN

Each pair must be wholly present or absent. Callback timeout defaults are CLUESIFT_ARTIFACT_OPEN_TIMEOUT=2, ...READ_TIMEOUT=5, and ...WRITE_TIMEOUT=5. Callback failures are content-free telemetry and never replace a successful fetch result. Callback URLs are complete absolute HTTP(S) endpoints, may use only their scheme's default port, and may not contain userinfo, a query, or a fragment. Fetched public URLs reject trailing-dot hosts rather than canonicalizing them.

Related MCP server: web-mcp-server

Run and develop

python -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/ollama-web-tools-mcp
.venv/bin/ollama-web-tools-mcp --http --port 8767
.venv/bin/ruff check .
.venv/bin/ruff format --check .
.venv/bin/pytest

The three tools are exactly web_search, web_fetch, and cluesift_domain_fetch. The ClueSift tool accepts only url, artifact_target, request_id, and case_id; see the copied implementation brief for its full security and delivery contract.

Available Tools

3 tools
cluesift_domain_fetchC

Fetch a public page and best-effort deliver it to a fixed ClueSift target.

Inputs: url (required), case_id (required), request_id (required), artifact_target (required).

web_fetchC

Fetch web page content using Ollama's web fetch API.

Inputs: url (required), truncate, max_chars.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 3 tools

    Disambiguation4/5

    web_search clearly differs from the fetch tools. web_fetch and cluesift_domain_fetch both fetch pages, but cluesift_domain_fetch has a distinct delivery target, reducing confusion. One or two could be confused but descriptions clarify.

    Naming Consistency4/5

    web_search and web_fetch follow a consistent noun-verb pattern. cluesift_domain_fetch deviates by adding a longer domain prefix, but still ends with a verb and uses consistent snake_case.

    Tool Count4/5

    3 tools is on the lower end but appropriate for a focused web search/fetch server; each tool has a clear purpose, though the server may seem slightly thin.

    Completeness4/5

    The core web operations of search and fetch are covered, plus a specialized fetch-to-target. Minor gaps exist (e.g., no tool for parsing or summarizing pages) but not critical for the primary use case.

    Related MCP Connectors

    Related MCP Servers