mcp-web-calc
This server provides web search, URL content extraction, and Wikipedia lookup capabilities without requiring API keys.
Web Search (
search_web): Search using multiple providers (DuckDuckGo, Bing, SearXNG) with automatic fallback. Supports configurable result limits (1–50), language selection, and fast/deep/auto modes.Fetch URL Content (
fetch_url): Retrieve readable content from URLs (HTML or PDF) with configurable truncation modes (compact ~3000 chars, standard ~8000 chars, full unlimited) and output formats (markdown, text, html).Summarize a URL (
summarize_url): Fetch content from a URL and generate a concise summary.Wikipedia Summary (
wiki_get): Retrieve a Wikipedia article summary by title, with multi-language support.Multi-language Wikipedia (
wiki_multi): Retrieve Wikipedia summaries for a term across multiple languages simultaneously using inter-language links for accurate title mapping.
Additional features: Rotating user agents for anti-bot protection, SSRF protection blocking localhost/private network access, and customizable configuration via environment variables (default providers, timeouts, custom SearXNG instances).
Enables web searching through DuckDuckGo's HTML interface to retrieve search results, titles, and snippets.
Provides tools to retrieve page summaries and cross-reference information across multiple languages from Wikipedia.
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., "@mcp-web-calc Search for 'OpenAI Sora' and summarize the most recent news article"
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.
MCP Web Search
MCP server for web search and URL/resource loading. It works without API keys by default and stays local-first: search uses free providers, fetch_url extracts useful content from URLs, and binary/media downloads only happen when explicitly requested.
Features
search_web- multi-provider web search with automatic fallback across DuckDuckGo, Bing, and SearXNG.fetch_url- universal URL/resource loader for HTML, PDF, text, Markdown, JSON, XML, CSV, media metadata, and supported site-specific URLs.Clean normalized output with one
contentfield plus metadata, pagination, links, media, attachments, and warnings.Reddit thread extraction through Reddit JSON endpoints instead of brittle Reddit HTML scraping.
Long-resource pagination with
max_length,start_index, andnext_start_index.Optional HTML link/media summaries.
Optional local download artifacts with
download: true.SSRF protection for localhost, private IPs, link-local ranges, IPv6 private ranges, and unsafe redirects.
No paid API required.
Related MCP server: tavily-mcp
Requirements
Node.js 18+
Chrome/Chromium only if you use the Bing provider
MCP Configuration
Claude Code
{
"mcpServers": {
"web-search": {
"command": "npx",
"args": ["-y", "@zhafron/mcp-web-search"]
}
}
}OpenCode
{
"mcp": {
"web-search": {
"type": "local",
"command": ["npx", "@zhafron/mcp-web-search"]
}
}
}Custom Configuration
{
"mcpServers": {
"web-search": {
"command": "npx",
"args": ["-y", "@zhafron/mcp-web-search"],
"env": {
"DEFAULT_SEARCH_PROVIDER": "duckduckgo",
"SEARXNG_URL": "http://localhost:8099"
}
}
}
}Tools
search_web
Search the web through one provider or through the fallback chain.
Input:
{
"q": "openai codex reddit review",
"limit": 10,
"lang": "en",
"provider": "duckduckgo"
}Options:
Option | Description |
| Search query |
| Number of results, 1-50 |
| Search language, default |
| Optional provider: |
Output:
{
"items": [
{
"title": "Example Result",
"url": "https://example.com",
"snippet": "Result summary...",
"source": "duckduckgo"
}
],
"providerUsed": "duckduckgo",
"fallbackUsed": false,
"triedProviders": ["duckduckgo"]
}Fallback order:
DuckDuckGo → SearXNG → Bing
SearXNG → DuckDuckGo → Bing
Bing → DuckDuckGo → SearXNG
fetch_url
Fetch a URL and return extracted content plus metadata in a normalized envelope.
Input:
{
"url": "https://example.com/article",
"format": "markdown",
"max_length": 8000,
"start_index": 0,
"include_links": true,
"include_media": true
}Options:
Option | Description |
| URL to fetch |
|
|
| Maximum returned content characters, default 25000 |
| Start content from this character index |
|
|
| Include extracted links for HTML pages |
| Include extracted image/video/audio references for HTML pages |
| Include comments for site adapters that support comments, default true for Reddit |
| Maximum comments for comment-capable adapters, max 100 |
|
|
| Maximum comment nesting depth |
| Request timeout override |
| Bypass in-memory cache |
| Save original fetched bytes to a managed local file and return it in |
| Optional output directory for downloads; defaults to the system temp directory |
| Cleanup TTL for managed downloads, default 86400 seconds |
| Response/download byte cap override, additionally capped by |
Output:
{
"url": "https://example.com/article",
"final_url": "https://example.com/article",
"title": "Example Article",
"content_type": "text/html",
"resource_type": "html",
"format": "markdown",
"content": "# Example Article\n\n...",
"metadata": {
"status": 200,
"content_type": "text/html",
"byte_length": 12345,
"extractor": "html",
"fetched_at": "2026-05-03T00:00:00.000Z"
},
"links": [],
"media": {
"images": [],
"videos": [],
"audio": []
},
"truncated": false,
"original_length": 1200,
"start_index": 0,
"next_start_index": null,
"warnings": []
}Supported Resources
Resource | Behavior |
HTML pages | Extracts readable article content, title, metadata, optional links, and optional media references |
Text and Markdown | Returns text directly with pagination support |
JSON | Pretty-prints JSON when |
XML and CSV-like text | Returns as text/data content |
Extracts text and PDF metadata | |
Images | Returns metadata by default; saves the file only with |
Audio and video | Returns metadata by default; saves the file only with |
Archives and binary files | Returns metadata by default; downloads only when explicitly requested; archives are not auto-extracted |
Reddit threads | Uses Reddit JSON endpoints and can include comments with limits |
Local Downloads
fetch_url does not download binary/media files to disk by default. This avoids surprise disk usage and persistent local copies of arbitrary web content.
Use download: true when you need the original file available to another tool:
{
"url": "https://httpbin.org/image/png",
"format": "metadata",
"download": true,
"download_ttl_seconds": 86400
}Download attachments look like this:
{
"kind": "download",
"path": "/tmp/mcp-web-search/downloads/mcp-fetch-id-image.png",
"filename": "mcp-fetch-id-image.png",
"original_filename": "image.png",
"content_type": "image/png",
"resource_type": "image",
"byte_length": 8090,
"sha256": "...",
"expires_at": "2026-05-04T00:00:00.000Z"
}Download safety behavior:
Downloads are opt-in only.
Files are written with
0600permissions.Filenames are sanitized and prefixed with a managed artifact ID.
SHA-256 is returned for verification.
Expired managed artifacts are cleaned up through sidecar metadata.
Cleanup only touches managed artifacts inside the configured download directory.
Archives are never auto-extracted.
Reddit Thread Extraction
Reddit thread URLs are handled by a site adapter and fetched through Reddit JSON endpoints.
Input example:
{
"url": "https://www.reddit.com/r/codex/comments/abc123/gpt55_is_so_good/",
"include_comments": true,
"comment_limit": 30,
"comment_sort": "top",
"max_depth": 2
}The output uses resource_type: "site" and metadata.extractor: "reddit-thread".
Reddit public JSON can still rate-limit or return 403/429 depending on Reddit, subreddit rules, and request frequency. When that happens, retry later or reduce request frequency.
Providers
Provider | API Key Required | Notes |
DuckDuckGo | No | Default, simple, no browser required |
Bing | No | Uses Chrome/Chromium through Puppeteer |
SearXNG | No | Best option for self-hosted high-volume usage |
Environment Variables
Variable | Default | Description |
|
| Default search provider: |
|
| SearXNG instance URL |
|
| Request timeout in milliseconds |
|
| Maximum fetched response/download size |
| unset | Set to |
SearXNG Setup
SearXNG is a free self-hosted meta-search engine.
Quick setup with Docker:
mkdir -p ~/docker/searxngCreate ~/docker/searxng/settings.yml with JSON enabled, then run the SearXNG container. The important setting is search.formats containing both html and json.
Example relevant setting:
search:
formats:
- html
- jsonThen set:
export SEARXNG_URL="http://localhost:8099"Chrome Setup for Bing Provider
OS | Command |
Ubuntu/Debian |
|
Fedora |
|
Arch |
|
macOS |
|
Custom path:
export CHROME_PATH="/path/to/chrome"MCP Discovery Compatibility
Some MCP clients have weak schema parsers and fail during discovery on array-valued JSON Schema nodes such as enum or required.
If discovery fails, set:
export MCP_COMPAT_MODE="legacy"This only simplifies advertised tools/list schemas. Tool execution behavior stays the same.
URL Safety
fetch_url blocks unsafe targets before fetching and before following redirects.
Blocked targets include:
localhost hostnames
.localhostand.localhostnamesprivate IPv4 ranges
IPv4 loopback, link-local, carrier-grade NAT, benchmark, multicast, and selected special-use ranges
IPv4-mapped IPv6 addresses that resolve to blocked IPv4 ranges
IPv6 loopback, unspecified, unique-local, multicast, and link-local ranges
redirects that resolve to blocked addresses
The HTTP transport resolves and validates addresses before connecting, then connects to the vetted address while preserving the original host/SNI for normal HTTPS behavior.
Repository Structure
src/server.ts- MCP server and tool schemassrc/providers/- search providerssrc/fetch/- URL/resource loading pipelinesrc/fetch/content/- shared content helpers such as Markdown conversion and readability fallbacksrc/fetch/extractors/- resource extractors for HTML, text/data, PDF, and media metadatasrc/fetch/site-adapters/- domain-specific extractors such as Reddit threadssrc/utils/- shared utilitiestest/- Node test runner tests
Troubleshooting
Issue | Solution |
Chrome not found | Install Chrome/Chromium or set |
SearXNG 403 | Enable JSON API in |
Timeout | Increase |
MCP discovery error: | Set |
Reddit 429 or 403 | Reddit rate limited or blocked the JSON endpoint; retry later or reduce request frequency |
Download missing from output | Set |
Download rejected as too large | Increase |
License
MIT
Available Tools
5 toolsfetch_urlFetch and Extract URL ContentA
Fetches content from a URL (HTML/PDF) and extracts readable text. Supports truncation modes: compact (~3000 chars), standard (~8000 chars, default), full (no truncation). Output formats: markdown (default), text, html.
Inputs: url (required), mode, max_length, format.
search_webWeb Search (Fast: DuckDuckGo, Deep: Puppeteer/Bing)A
Two-tier web search: runs fast DuckDuckGo HTML search by default, escalates to Puppeteer/Bing if results are insufficient. No API keys required.
Inputs: q (required), limit, lang, mode.
summarize_urlSummarize URL ContentC
Fetches content from a URL and generates a concise summary.
Inputs: url (required).
wiki_getWikipedia: Get SummaryB
Retrieves a Wikipedia summary for a given title. Supports multiple languages (default: en).
Inputs: title (required), lang.
wiki_multiWikipedia: Multi-Language SummaryB
Retrieves Wikipedia summaries in multiple languages for a given term. Uses langlinks to map titles accurately across languages.
Inputs: term (required), baseLang, langs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have distinct purposes: fetch_url extracts content, search_web performs web searches, summarize_url summarizes content, and wiki_get/wiki_multi retrieve Wikipedia data. However, fetch_url and summarize_url both fetch content from URLs, which could cause minor confusion about when to use each, though their outputs differ (raw content vs. summary).
All tool names follow a consistent snake_case pattern with clear verb_noun structures: fetch_url, search_web, summarize_url, wiki_get, and wiki_multi. This predictability makes it easy for agents to understand and select tools without naming confusion.
With 5 tools, this server is well-scoped for its web calculation and information retrieval purpose. Each tool serves a specific function (e.g., fetching, searching, summarizing, Wikipedia access), and none appear redundant or excessive, fitting typical expectations for such a domain.
The tool set covers key web-based operations: content fetching, web searching, summarization, and Wikipedia access. Minor gaps exist, such as no explicit tools for updating or deleting data, but this is reasonable given the server's focus on retrieval and analysis. Agents can likely work around this with the provided tools.
Maintenance
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
AI tool directory MCP server, live since July 2026. Tools, agents, models, companies, services.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- AlicenseCqualityDmaintenanceA multi-tool MCP server that enhances local LLMs with web search, document reading, scholarly research, Wikipedia access, and calculator functions. Provides comprehensive tools for information retrieval and computation without requiring API keys by default.221MIT
- AlicenseBqualityDmaintenanceMCP server providing search, extract, map, and crawl tools powered by Tavily for real-time web data access.4MIT
- AlicenseAqualityBmaintenanceA self-hosted MCP server providing web search and URL fetching tools, running locally without external API keys or accounts.2280 npmMIT
- AlicenseAqualityBmaintenanceAn MCP server providing web search, image search, and page scraping tools to LLMs without requiring API keys.12323MIT