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 MCPsearch 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
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, scraping, RAG answers with citations, and translation as MCP tools.
Scrape, crawl and search the web for AI agents via MCP.
Web MCP: scrape/crawl sites, web search, brand assets, app stores, YouTube, Reddit, Hacker News.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides 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
- AlicenseAqualityDmaintenanceEnables performing web searches and fetching web page content via Ollama's hosted APIs, providing search results and raw page data.21MIT
- FlicenseBqualityCmaintenanceProvides web search and page fetch tools for LLM assistants, extracting content and enabling text search within fetched pages.3-