Skip to main content
Glama
Ollama Web Search

Ollama Web Search

by deXterbed

Ollama Web Search MCP Server

A stdio MCP server that exposes Ollama's hosted web search and web fetch APIs as tools any MCP client can call. Based on the Ollama web search docs.

Tools:

Tool

Args

Returns

web_search

query (string), max_results (int, default 5, max 10)

{ results: [{ title, url, content }] }

web_fetch

url (string)

{ title, content, links: [...] }

Prerequisites

Related MCP server: ollama-websearch-mcp

Install

For use as an MCP server in editors, install once so the binary is available immediately on startup (avoids timeout issues caused by uvx resolving packages on every invocation):

uv tool install ollama-web-search
# or from a local checkout:
# uv tool install .

For a quick smoke test without installing, you can use uvx (slower on first run because it resolves packages each time):

export OLLAMA_API_KEY=your_api_key_here
uvx ollama-web-search

It will sit waiting for MCP messages on stdio. Wire it into a client instead of running it by hand.

Client configuration

Set your key in the env block below. Use the installed binary (ollama-web-search) rather than uvx to avoid startup timeouts.

Claude Desktop / Claude Code (mcpServers block):

{
  "mcpServers": {
    "Ollama Web Search": {
      "command": "ollama-web-search",
      "args": [],
      "env": { "OLLAMA_API_KEY": "your_api_key_here" }
    }
  }
}

For Claude Code you can also add it from the CLI:

claude mcp add ollama-web-search \
  --env OLLAMA_API_KEY=your_api_key_here \
  -- ollama-web-search

Zed (~/.config/zed/settings.json, under context_servers):

{
  "context_servers": {
    "Ollama Web Search": {
      "command": "ollama-web-search",
      "args": [],
      "env": { "OLLAMA_API_KEY": "your_api_key_here" }
    }
  }
}

Cline:

{
  "mcpServers": {
    "Ollama Web Search": {
      "type": "stdio",
      "command": "ollama-web-search",
      "args": [],
      "env": { "OLLAMA_API_KEY": "your_api_key_here" }
    }
  }
}

Codex (~/.codex/config.toml):

[mcp_servers.ollama_web_search]
command = "ollama-web-search"
args = []
env = { OLLAMA_API_KEY = "your_api_key_here" }

Available Tools

2 tools
web_fetchA

Fetch the readable content of a web page via Ollama's hosted fetch API.

Args: url: The absolute URL to fetch (must include http:// or https://).

Returns: A dict with the page title, content, and a list of links.

Inputs: url (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: web_search performs search queries, while web_fetch retrieves content from a specific URL. No overlap.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern (web_fetch, web_search), using snake_case and the same prefix.

    Tool Count4/5

    With only 2 tools, the set is minimal but appropriate for a simple web search and fetch utility. Could be expanded, but not overly sparse.

    Completeness5/5

    The tool surface covers the core operations: searching the web and fetching a page. No obvious gaps for the stated purpose.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers