WebSearch MCP Server
This MCP server lets AI assistants search the web, scrape pages into Markdown, handle bot checks with a visible browser, and fetch YouTube transcripts.
Search the web with DuckDuckGo via
search.Scrape webpage main content headlessly into clean Markdown via
scrape.Fall back to headed scraping for Cloudflare/Turnstile/CAPTCHA challenges (
scrape_headedper README).Open a visible browser to manually solve CAPTCHAs or log into sites via
open_browser.Extract YouTube transcripts, with optional language preference, via
youtube_transcript.Reuse persistent browser profiles for cookies/logins/session state and save activity logs/scrape outputs locally.
Provides web search capabilities using DuckDuckGo HTML, returning parsed results (Title, URL, Snippet).
Allows logging into Google accounts via headed browser to maintain authenticated sessions for subsequent headless scraping.
Extracts transcripts from YouTube videos, using internal API first and falling back to browser automation if blocked.
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., "@WebSearch MCP Server search for MCP server best practices"
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.
WebSearch MCP Server
A powerful Model Context Protocol (MCP) server that provides full-featured web searching, scraping, and YouTube transcript extraction capabilities using Playwright.
This server allows AI assistants (like Claude via Claude Code) to autonomously search the web, read articles, and fetch video transcripts without being blocked by CAPTCHAs or regional firewalls.
Features
π DuckDuckGo Search: Headed search using Playwright to bypass aggressive bot-protection and regional blocks (e.g., Internet Positif).
πΈοΈ Headless Scraping: Extracts clean Markdown from websites using Mozilla's Readability and Turndown.
π₯ YouTube Transcripts: Fetches auto-generated or manual transcripts with a fallback to Playwright extraction if the API fails.
π Manual Browser Interaction: Allows the AI to open a headed browser window, pausing execution so you can manually solve CAPTCHAs or log into accounts.
πͺ Persistent Profiles: Maintains a
browser-profileto save your cookies, logins, and session state across runs.
Related MCP server: Web Research MCP Server
Prerequisites
Node.js (v18 or higher)
Installation
Clone the repository:
git clone https://github.com/nafi-jza/websearch-mcp.git cd websearch-mcpInstall dependencies:
npm installInstall Playwright browsers:
npx playwright install chromiumBuild the project:
npm run build
Configuration in Claude Code
To add this MCP server to your Claude Code setup, edit your ~/.claude.json or project-level .claude.json file:
{
"mcpServers": {
"websearch-mcp": {
"type": "stdio",
"command": "node",
"args": [
"C:/absolute/path/to/websearch-mcp/dist/index.js"
],
"env": {}
}
}
}(Make sure to replace the path with your actual absolute path to the dist/index.js file)
Available Tools
Once configured, the following tools will be available to the AI:
search: Search the web using DuckDuckGo.Input:
{ query: string }
scrape: Load a webpage headlessly and extract its main content as Markdown. If blocked by Cloudflare or bot verification, returns[BOT_CHALLENGE_DETECTED]with remediation instructions to callscrape_headed.Input:
{ url: string }
scrape_headed: Visible headed browser fallback. Opens a Chromium window with the user's real profile so the user can pass bot verification (Cloudflare, Turnstile, CAPTCHA). Once solved, clickingβ Finish & Scrape(or closing the window) immediately extracts clean Markdown.Input:
{ url: string }
open_browser: Open a headed browser window to manually solve CAPTCHAs or log into sites. Pauses the MCP server until you close the browser.Input:
{ url?: string }
youtube_transcript: Extract the transcript from a YouTube video.Input:
{ target: string, lang?: string }
Recommended Agent Fallback Workflow
When an agent needs to read a URL:
Call
scrapefirst (fast, headless).If
scrapesucceeds, use the markdown output immediately.If
scrapefails with[BOT_CHALLENGE_DETECTED], immediately callscrape_headedwith the exact same URL. Do not abandon the URL or run extra searches.The user completes verification on screen and clicks
Finish & Scrapeto return the content.
Architecture & How It Works
Bot Bypass: Playwright is used to execute searches visibly (headed) which tricks most basic bot-protection systems and DNS blocks.
Graceful Cleanup: The server automatically manages Chromium contexts. It safely removes the default
about:blankpages and closes browser instances strictly after automated executions to prevent memory leaks and zombie processes.Logging & Output: All activity is logged to
activity.login the root directory. Markdown outputs of scrapes are saved locally to theoutputs/directory for historical reference.
Available Tools
4 toolsopen_browserA
Open a headed browser window to manually solve CAPTCHAs or log into sites. Pauses the MCP server until the user closes the browser.
Inputs: url.
scrapeA
Load a webpage and extract its main content as Markdown.
Inputs: url (required).
searchB
Search the web using DuckDuckGo.
Inputs: query (required).
youtube_transcriptC
Extract the transcript from a YouTube video.
Inputs: target (required), lang.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 4 tools
Each tool serves a clearly distinct purpose: open_browser for manual interaction, scrape for content extraction, search for web search, and youtube_transcript for YouTube transcripts. No overlap.
Naming is inconsistent: scrape and search are single verbs, open_browser follows verb_noun, while youtube_transcript uses noun_noun. This lack of a uniform pattern could confuse an agent.
With 4 tools, the server is well-scoped. Each tool provides essential functionality for web research without unnecessary bloat.
The tool set covers core web search, scraping, and transcript extraction, but lacks features like image search or search history. Still, it handles common workflows effectively.
Maintenance
Related MCP Connectors
A real browser for your agent: screenshots, page checks, Markdown and PDFs.
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables web search across Bing, DuckDuckGo, and Google using Playwright automation, with tools for retrieving search results and extracting page text content.11 npmMIT
- AlicenseCqualityCmaintenanceEnables AI agents to perform web searches via DuckDuckGo without API keys and automate browser tasks with headless Chromium. Supports multi-step research workflows that automatically search and extract content from multiple pages.781 PyPIMIT
- AlicenseAqualityDmaintenanceEnables web search, content fetching, dynamic page scraping, and URL preview via DuckDuckGo, Playwright, and Cheerio, without requiring API keys.4ISC
- AlicenseNot gradedqualityCmaintenanceEnables web search and page content extraction with JavaScript rendering via Playwright, with HTTP fallback and retry logic.MIT