ollama-web-search-mcp
A Node.js MCP server exposing Ollama's web search and web fetch APIs as MCP tools. TypeScript, stdio transport, npm-publishable.
Documentation
ollama-web-search-mcp (Node.js / TypeScript)
A Node.js / TypeScript MCP (Model Context Protocol) server that exposes Ollama's web search and web fetch APIs as MCP tools.
This is the JavaScript / Node.js equivalent of Ollama's official Python MCP server. While Ollama provides a Python MCP server for web search, there was no Node.js version available — this project fills that gap. It's written in TypeScript, runs on Node.js 18+, and is published to npm for easy `npx` usage.
Why Node.js?
Ollama's official MCP server for web search is written in Python and requires `uv` or a Python runtime. Many MCP clients and agent frameworks (Claude Desktop, Cursor, Cline, Codex, etc.) can spawn any process, but if your stack is already Node.js-based, you probably don't want to install Python just for one MCP server. This package runs purely on Node.js — no Python needed.
Features
- `web_search` — Performs a web search via Ollama's hosted API and returns results (title, URL, content snippet)
- `web_fetch` — Fetches a single web page by URL and returns its title, content, and links
- Written in TypeScript, compiled to ESM JavaScript
- Stdio transport (standard for MCP servers)
- Zero runtime dependencies beyond the MCP SDK
- Published to npm as `@mrfl/ollama-web-search-mcp` with a CLI binary
- Usable as a library — import `webSearch()` and `webFetch()` directly in your Node.js code
Prerequisites
- Node.js 18 or higher
- An Ollama API key (free Ollama account required)
Installation
From npm
npm install -g @mrfl/ollama-web-search-mcpOr use directly with npx (no install needed):
npx @mrfl/ollama-web-search-mcpFrom source
git clone https://github.com/MRFL-Orchestra/ollama-web-search-mcp.git
cd ollama-web-search-mcp
npm install
npm run buildConfiguration
Set your Ollama API key as an environment variable:
export OLLAMA_API_KEY="your_api_key_here"MCP Client Setup
Add the server to your MCP client configuration:
Claude Desktop / Cursor / VS Code
{
"mcpServers": {
"ollama-web-search": {
"command": "npx",
"args": ["@mrfl/ollama-web-search-mcp"],
"env": {
"OLLAMA_API_KEY": "your_api_key_here"
}
}
}
}Cline
{
"mcpServers": {
"ollama-web-search": {
"type": "stdio",
"command": "npx",
"args": ["@mrfl/ollama-web-search-mcp"],
"env": {
"OLLAMA_API_KEY": "your_api_key_here"
}
}
}
}Codex
[mcp_servers.ollama-web-search]
command = "npx"
args = ["@mrfl/ollama-web-search-mcp"]
env = { "OLLAMA_API_KEY" = "your_api_key_here" }Local clone (without npm)
{
"mcpServers": {
"ollama-web-search": {
"command": "node",
"args": ["/path/to/ollama-web-search-mcp/dist/index.js"],
"env": {
"OLLAMA_API_KEY": "your_api_key_here"
}
}
}
}Tools
`web_search`
Performs a web search using Ollama's hosted search API.
Parameters:
- `query` (string, required) — The search query string
- `max_results` (integer, optional, default 5, max 10) — Maximum results to return
Returns: Array of search results, each containing:
- `title` — Title of the web page
- `url` — URL of the web page
- `content` — Relevant content snippet
`web_fetch`
Fetches the content of a single web page by URL.
Parameters:
- `url` (string, required) — The absolute URL to fetch
Returns:
- `title` — Title of the web page
- `content` — Main content of the web page
- `links` — Array of links found on the page
API Reference
You can also use the client functions directly in your own Node.js / TypeScript code:
import { webSearch, webFetch } from "@mrfl/ollama-web-search-mcp";
// Web search
const results = await webSearch("what is ollama?", 5);
console.log(results.results[0].title);
// Web fetch
const page = await webFetch("https://ollama.com");
console.log(page.title);
console.log(page.links);Both functions accept an optional `apiKey` parameter (defaults to `OLLAMA_API_KEY` environment variable).
Development
npm install # Install dependencies
npm run build # Compile TypeScript
npm run dev # Watch mode
npm run typecheck # Type-check without emittingLicense
MIT
Frequently asked questions
What is ollama-web-search-mcp?
ollama-web-search-mcp is A Node.js MCP server exposing Ollama's web search and web fetch APIs as MCP tools. TypeScript, stdio transport, npm-publishable.
How do I install ollama-web-search-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is ollama-web-search-mcp open source?
Yes — it is hosted on GitHub at https://github.com/MRFL-Orchestra/ollama-web-search-mcp.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP