ollama-web-search-mcp
The server provides a web_search tool via Ollama's web search API. It enables you to:
Search the web with a required
queryand optionalcount(1-10 results, default 5)Get results as a numbered list including title, URL, and content snippet
Discover niche or lesser-indexed content (e.g., personal blogs) that might be missed by other search backends
Provides a web_search tool backed by Ollama's web search API, allowing searches for sites and content that other search backends may miss (like small personal blogs).
Click on "Install 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 wanzul.net and show me the top 5 results"
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 Server
An MCP server that exposes Ollama's web search API as a web_search tool for Claude Code.
Use it when the built-in Claude Code WebSearch returns no results for a site — the Ollama search backend indexes sites (like small personal blogs) that other backends miss.
Features
Single
web_searchtool:query(required) +count(optional, 1–10, default 5)Reads your API key from the environment — never hardcoded, never committed
10s outbound timeout, friendly errors for missing key / bad status / network failure
Pure Node.js stdio server — no build step, no runtime outside Node 18+
Related MCP server: CC Web MCP
Prerequisites
Install
git clone https://github.com/wzul/ollama-web-search-mcp.git
cd ollama-web-search-mcp
npm installRegister with Claude Code
Register the server globally (available in every project) with one command:
claude mcp add --scope user ollama-web-search -- node "$HOME/ollama-web-search-mcp/index.js"Why
--scope user:claude mcp adddefaults to the project-local scope. Without this flag the server is registered to the current project only and silently won't load when Claude Code is started from any other directory. Ifweb_searchdoesn't appear after a restart, the registration is almost certainly project-scoped — fix it withclaude mcp add --scope user ...(thencd <repo> && claude mcp remove ollama-web-search -s localto drop the stale entry).
Or add it manually to the top-level mcpServers object in ~/.claude.json:
{
"mcpServers": {
"ollama-web-search": {
"command": "node",
"args": ["/absolute/path/to/ollama-web-search-mcp/index.js"]
}
}
}Set your API key
The server reads the key from the environment, so export it in your shell profile (~/.zshrc, ~/.bashrc, etc.):
export OLLAMA_API_KEY="your-ollama-api-key"Security: use a key you have not shared anywhere. If a key was ever pasted into a chat, log, or screenshot, rotate it at ollama.com/settings/keys before using it here.
Then restart Claude Code — the web_search tool will be available in every session.
(Optional) Disable the built-in WebSearch
Claude Code ships a built-in WebSearch tool. If you want your sessions to use only the Ollama-backed web_search, deny the built-in one in ~/.claude/settings.json:
{
"permissions": {
"deny": ["WebSearch"]
}
}deny takes precedence over allow, and rules merge across scopes, so this stays blocked even if another settings file allows it. Restart Claude Code afterwards. You can verify with /permissions that WebSearch is no longer offered.
Usage
Ask Claude Code to search, e.g.:
web_search "wanzul.net"
web_search "best 5G plan malaysia" count 10Results come back as a numbered list: title, URL, and content snippet.
Test
npm testRuns 10 tests: unit tests for the fetch wrapper and result formatting (mocked fetch) plus a live stdio smoke test that drives the MCP protocol.
Helper skill (optional)
The repo ships a copy-paste install skill at .claude/skills/install-ollama-web-search/. Install it so you (or Claude Code) can reproduce these steps on demand:
mkdir -p ~/.claude/skills
cp -r .claude/skills/install-ollama-web-search ~/.claude/skills/Once installed, an agent can follow it (or ask "install ollama-web-search") instead of retyping commands from memory.
Layout
index.js— MCP stdio server +searchOllama/formatResultsexportstest.js— unit tests (mocked fetch) + stdio smoke testpackage.json— deps (@modelcontextprotocol/sdk) and scripts
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Alicense-qualityBmaintenanceProvides web search and page fetching capabilities using Ollama's API.Last updatedMIT
- Alicense-qualityBmaintenanceProvides web search and page fetching tools for third-party models (e.g., DeepSeek, Qwen, Kimi) in Claude Code, with configurable search backends, Markdown output, and safety boundaries.Last updated56MIT
- Flicense-qualityDmaintenanceA drop-in replacement for Claude's built-in web_search tool that automatically tracks usage and provides multiple search backends.Last updated
- Alicense-qualityDmaintenanceEnables performing web searches and fetching web page content via Ollama's hosted APIs, providing search results and raw page data.Last updated1MIT
Related MCP Connectors
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Web search, news, page retrieval, sitemaps, and trending topics through Search1API.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wzul/ollama-web-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server