MCP Web Search Tool

MCP Web Search Tool

mcp-web-search-tool•bygabrimatic

An MCP stdio server that provides live web search, news and image search, and full-page URL reading with source citations.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Offers five tools: web search, news search, image search, URL fetching, and provider listing.
  • •Web search returns ranked summaries with stable ids that fetch_url can resolve to read the underlying page.
  • •Uses Brave Search as primary provider with keyless DuckDuckGo fallback for web search.
  • •Fetches pages with a soft character cap, returning readable text, links, status, and continuation cursor.

BEST FOR

  • •Getting current, source-backed answers to questions that need live web results.
  • •Reading and extracting the text of pages behind search results.
  • •Finding recent news and images through search, when a Brave API key is configured.

ABOUT MCP-WEB-SEARCH-TOOL

MCP Web Search Tool is cataloged as an MCP server attributed to gabrimatic. An MCP stdio server that provides live web search, news and image search, and full-page URL reading with source citations. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP Web Search Tool are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which search providers does it support?

Brave Search is the primary provider, and DuckDuckGo serves as a keyless fallback for web search; news and image search require a Brave key.

Does fetch_url restrict which URLs it will read?

Yes, it refuses non-http(s) schemes and hosts resolving to private, loopback, link-local, multicast, or IPv4-mapped IPv6 private addresses.

Upstream README

View this exact version on GitHub

README.md · 639c018a5f88 · Fetched 2026-11-13 10:04:53 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MCP Web Search Tool

An MCP server that gives an assistant live web search, full-page reading, and source citations. Stdio transport, pluggable providers, no scraper dependencies.

Claude Desktop Example

CI License: MIT Node

Quick start · Tools · Configuration · Clients · Security · Changelog


Overview

Five tools: web_search, news_search, image_search, fetch_url, list_providers. Search returns ranked summaries with stable ids; fetch_url reads the page behind any id. Brave Search is the primary provider; DuckDuckGo runs without a key as a fallback.

Requirements

Node.js>= 20.18 (uses native fetch)
npm>= 10
Brave Search API keyoptional. Without it, DuckDuckGo handles web_search. news_search and image_search require a key.

Quick start

From npm:

npx -y mcp-web-search-tool

Point your MCP client at npx with args ["-y", "mcp-web-search-tool"] and pass BRAVE_API_KEY through the client's env block.

From source:

git clone https://github.com/gabrimatic/mcp-web-search-tool.git
cd mcp-web-search-tool
npm install
cp .env.example .env   # edit BRAVE_API_KEY if you have one
npm run build
npm start

Run with Docker:

docker build -t mcp-web-search .
docker run --rm -i -e BRAVE_API_KEY mcp-web-search

For Claude Desktop, Claude Code, Codex, VS Code, Cursor, or Windsurf integration, see MCP_CLIENTS.md.


Tools

Search tools return an untrusted-content banner, a Markdown rendering for the model, and a fenced JSON block with the structured payload; fetch_url returns the readable page text plus a links block. Errors come back as isError: true content with an actionable message; only unknown-tool calls throw a protocol error.

Live web search. Use first for current, source-backed answers.

ParameterTypeDescription
search_termstring, requiredQuery string.
providerenum"brave search" or "duckduckgo". Defaults to Brave when a key is set, otherwise DuckDuckGo.
countint (1–20)Number of results. Default 10.
offsetintPagination offset (web only).
cursorstringOpaque cursor from a previous response.
freshnessstringpd (24h), pw (week), pm (month), py (year), or YYYY-MM-DDtoYYYY-MM-DD.
countrystringISO country code.
search_langstringUI language, e.g. en.
safesearchenumoff, moderate, strict.
include_domainsstring[]Restrict results to these hosts.
exclude_domainsstring[]Drop results from these hosts (hostname-suffix match).

Recent news with source name and publish date. Brave only.

Image results with thumbnails. Brave only.

fetch_url

Reads a search result or arbitrary http(s) URL. Pass a result id from a previous search (preferred) or a full URL.

ParameterTypeDescription
id_or_urlstringA result id (e.g. r_a1b2c3d4e5f6) or a full http(s) URL.
urlstringDeprecated alias for id_or_url.
max_charsint (200–200 000)Soft cap on returned characters. Default 8000.
cursorstringCursor from a previous response to continue reading.

Returns the page title, readable text (scripts, styles, nav, footer, and aside stripped), the first 25 outbound links, HTTP status, content-type, byte length, and a nextCursor when truncated.

Refuses non-http(s) schemes and any host that resolves to a private, loopback, link-local, multicast, or IPv4-mapped IPv6 private address. Details: SECURITY.md.

list_providers

Returns the registered providers and the current default. Call this once if you are unsure whether news_search or image_search are available in this session.


Configuration

All configuration is environment-driven. Reference: .env.example.

VariableDefaultPurpose
BRAVE_API_KEYemptyBrave Search API key. When unset, DuckDuckGo is used.
MAX_RESULTS10Default result count (clamped 1–50).
REQUEST_TIMEOUT10000Per-request timeout in ms (1 000–60 000).
DEFAULT_PROVIDERautoForce a specific provider (e.g. duckduckgo).
ALLOW_KEYLESStrueWhen false, the server refuses to start without BRAVE_API_KEY.
CACHE_MAX_ENTRIES / CACHE_TTL_MS256 / 300000Search cache.
FETCH_CACHE_MAX / FETCH_CACHE_TTL_MS128 / 600000URL-fetch cache.
FETCH_TIMEOUT_MS / FETCH_MAX_BYTES15000 / 2000000Per-request budget for fetch_url.
RESULT_ID_CACHE_MAX / RESULT_ID_TTL_MS2000 / 3600000How many result ids fetch_url can resolve, and for how long.

Project layout

src/
├── index.ts                    MCP server: tool registry, dispatch, rendering
├── config.ts                   env loader, validation, defaults
├── providers/
│   ├── SearchProvider.ts       abstract contract and shared types
│   ├── SearchProviderFactory   registry and default selection
│   ├── BraveSearchProvider     web/news/images via Brave API
│   └── DuckDuckGoProvider      keyless HTML-lite fallback
├── services/
│   ├── SearchService.ts        provider dispatch, LRU+TTL cache
│   └── FetchService.ts         safe URL fetch, readable extraction
└── utils/
    ├── http.ts                 native fetch, retry/backoff/timeout
    ├── html.ts                 zero-dep HTML to text + links
    ├── cache.ts                LRU+TTL cache
    └── ids.ts                  stable result-id minting and resolution
tests/                          vitest suite

Add a provider

import { SearchProvider, SearchResponse, SearchOptions } from './SearchProvider.js';

export class MyProvider extends SearchProvider {
  getName() { return 'My Provider'; }
  override requiresApiKey() { return true; }
  async search(query: string, _opts: SearchOptions = {}): Promise<SearchResponse> {
    const out = this.emptyResponse(query, 'web');
    out.results = mapped; // shape: SearchResult[]
    return out;
  }
}

Register it in SearchProviderFactory.setupDefaults. Result ids are minted automatically when you call mintResultId(url) on each entry.


Development

npm run dev          # tsx watch mode
npm test             # vitest suite
npm run lint         # eslint + prettier
npm run typecheck    # tsc --noEmit
npm run format
npm run build

CI runs lint, format check, type check, build, and tests on Node 22 and 24; a Docker image build runs when the image inputs change. Tests cover the LRU+TTL cache, HTML extractor, DuckDuckGo parser, search-service caching, HTTP retry/backoff, SSRF guard, domain match, and the result-id resolver.


Example prompts

  • "What are analysts saying about the MVP race after tonight's NBA games?"
  • "Summarise the top three results for RAG benchmarks 2025 and pull the abstract from the first paper."
  • "Find images of the Webb telescope's latest deep field, then open the NASA page and quote the caption."
  • "What's the weather in Berlin right now?"

License

MIT License

Developer

By Soroush Yousefpour

© All rights reserved.

YouTube Video

A short demo of MCP Web Search Tool with Claude:

Claude + MCP Web Search – Live Demo

Medium Article

Background on the project and how it works:

Deep Dive into MCP Web Search Tool

Support

Buy Me A Book

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP Web Search Tool from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-web-search-tool)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research