Ollama Web Search MCP
Provides tools for searching the public web and fetching page content through Ollama Cloud's official Web Search and Web Fetch APIs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ollama Web Search MCP search the web for best practices in prompt engineering"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ollama Web Search MCP
A small, resilient STDIO MCP server for Ollama Cloud's official Web Search and Web Fetch APIs.
It is designed for LiteLLM, Claude Desktop/Cowork, Codex, Cline, and other MCP clients.
Tools
Tool | Purpose |
| Search the public web and return up to 10 results. |
| Extract the main content and links from one public page. |
| Search, then fetch the top pages concurrently in one tool call. |
Related MCP server: Ollama Web Search
Why this wrapper?
Bounded retries for transient failures and rate limits
Configurable timeouts
Input and URL validation
Partial success in
search_and_fetchSafe error messages that do not expose the API key
Small dependency surface, tests, and CI
Requirements
Python 3.11+
An Ollama API key from ollama.com
uvx(recommended) orpip
Quick start
export OLLAMA_API_KEY="your-key"
uvx --from https://github.com/me3o2024/ollama-websearch-mcp/archive/refs/tags/v1.0.0.tar.gz ollama-websearch-mcpLiteLLM UI: STDIO configuration
Add a new MCP server and paste:
{
"mcpServers": {
"ollama-websearch": {
"command": "uvx",
"args": [
"--from",
"https://github.com/me3o2024/ollama-websearch-mcp/archive/refs/tags/v1.0.0.tar.gz",
"ollama-websearch-mcp"
],
"env": {
"OLLAMA_API_KEY": "your-ollama-api-key"
}
}
}
}Put the real key in env. ${OLLAMA_API_KEY} is not expanded here — LiteLLM interpolates
${...} placeholders in HTTP headers, not in the env block of a stdio server. A placeholder is
passed to the subprocess verbatim, so the server sees the literal text ${OLLAMA_API_KEY} and
fails with OLLAMA_API_KEY is required.
The LiteLLM container must have uvx installed and outbound HTTPS access to ollama.com and
github.com. The URL above is a source archive, which needs no git — see the note below if you
would rather install from a git+https:// URL.
Prefer a git+https:// URL?
It works, but only where git is installed: uvx shells out to git to resolve it, and minimal
containers often ship without it. Either add git to the image:
RUN apk add --no-cache gitor keep using the source-archive URL, which has no such dependency.
git+https://github.com/me3o2024/ollama-websearch-mcp.git@v1.0.0Other MCP clients
{
"mcpServers": {
"ollama-websearch": {
"command": "uvx",
"args": [
"--from",
"https://github.com/me3o2024/ollama-websearch-mcp/archive/refs/tags/v1.0.0.tar.gz",
"ollama-websearch-mcp"
],
"env": {
"OLLAMA_API_KEY": "your-key"
}
}
}
}Optional settings
Variable | Default | Allowed |
|
| Greater than 0, up to 300 |
|
| 0 to 5 |
Local development
python -m venv .venv
. .venv/bin/activate
pip install -e ".[dev]"
ruff check .
pytestPrivacy
Search queries and URLs are sent from your MCP host to Ollama Cloud. The GitHub repository is only the source of the code; it does not receive your searches. Do not place confidential information, credentials, or customer data in web-search queries.
API basis
This project uses Ollama's official endpoints:
POST https://ollama.com/api/web_searchPOST https://ollama.com/api/web_fetch
See the official Ollama Web Search documentation.
License
MIT
Available Tools
3 toolssearch_and_fetchA
Search the web and fetch the top results in one call.
This convenience tool reduces agent round trips. Individual fetch failures are returned beside successful pages instead of failing the whole operation.
Args: query: A concise search query. Do not include secrets or confidential data. max_results: Number of search results to return, from 1 to 10. fetch_top: Number of top result pages to fetch, from 1 to max_results.
Inputs: query (required), fetch_top, max_results. Returns: object
web_fetchB
Fetch and extract the main content of one public HTTP(S) web page.
Args: url: Absolute public HTTP or HTTPS URL to fetch.
Inputs: url (required). Returns: object
web_searchB
Search the public web with Ollama Cloud.
Args: query: A concise search query. Do not include secrets or confidential data. max_results: Number of results to return, from 1 to 10.
Inputs: query (required), max_results. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clear distinct role: web_search retrieves results, web_fetch retrieves page content, and search_and_fetch combines both as an explicit convenience. The overlap of search_and_fetch with the pair is well-explained and does not cause ambiguity.
All names use snake_case and are readable verb_noun or verb_pattern forms. The minor deviation is that web_search and web_fetch share a 'web_' prefix while search_and_fetch does not, but this is not confusing.
Three tools is well-scoped for a web search and fetch server; each tool earns its place by covering a core operation. Adding more would likely introduce redundancy.
The surface covers search, single-page fetch, and combined search+fetch, which are the essential operations for this domain. No obvious lifecycle gaps are apparent for a web search utility.
Maintenance
Related MCP Connectors
Web search, scraping, RAG answers with citations, and translation as MCP tools.
Official Exa MCP for web search, content fetching, and multi-step research.
Scrape, crawl and search the web for AI agents via MCP.
Web knowledge fetching tools for your agent.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceProvides web search and page fetching capabilities using Ollama's API.MIT
- AlicenseAqualityBmaintenanceEnables web search and web fetch operations using Ollama's hosted APIs, allowing MCP clients to search the web and retrieve page content.2MIT
- AlicenseAqualityBmaintenanceEnables performing web searches and fetching web page content via Ollama's hosted APIs, providing search results and raw page data.242 PyPI1MIT
- AlicenseBqualityCmaintenanceEnables AI agents to perform web searches and extract full-text content from web pages via standard MCP tools, with fallback search and semantic reranking.22MIT