WebSearch MCP Server
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 Serversearch 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 Search MCP
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 and extract its main content as 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 }
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | An optional URL to navigate to when the browser opens. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses blocking nature (pauses server) and purpose, but lacks details on prerequisites (e.g., GUI environment), failure modes, or security implications. No annotations to supplement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with primary action and purpose. Every word earns its place; no repetition or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple tool with one optional param and no output schema. Could mention that it requires a graphical display environment, but overall complete enough for a competent agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with exact same description as in schema. Tool description adds no extra meaning beyond what the schema provides for the single parameter, so baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it opens a headed browser for manual CAPTCHAs or login, distinguishing it from sibling tools like scrape (automated). Verb+resource+use case explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies use when human intervention for CAPTCHAs or login is needed. Context is clear, but no explicit exclusions or alternative comparisons to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scrapeA
Load a webpage and extract its main content as Markdown.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the webpage to scrape. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description bears full responsibility for behavioral disclosure. It fails to mention limitations such as handling of dynamic content, authentication, rate limits, or what 'main content' means. This lack of detail hampers informed selection.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence conveys the tool's action and output efficiently. Every word serves a purpose, with no redundancy or extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description is adequate but lacks details on return format, error handling, or limitations. It provides minimal completeness beyond the obvious.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the schema already documents the 'url' parameter thoroughly. The description doesn't add meaning beyond the schema's own description, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Load and extract' with a clear resource 'webpage' and output format 'Markdown'. It effectively distinguishes from siblings like open_browser (for interactive browsing) and search (for searching), as scraping is uniquely for extracting content as Markdown.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for converting webpages to Markdown but offers no explicit guidance on when to use this tool versus alternatives (e.g., open_browser for interactive access, search for searching). No when-not-to-use or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchB
Search the web using DuckDuckGo.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It only specifies the use of DuckDuckGo but fails to disclose rate limits, result format, error handling, or any behavioral traits beyond the engine.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of a single front-loaded sentence with no wasted words. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema), the description is adequate but minimal. It does not specify the structure of search results, pagination, or limitations, leaving gaps in understanding what the tool returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes the single parameter. The description adds no additional meaning beyond what the schema provides, meeting the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Search' and resource 'the web using DuckDuckGo.' It effectively distinguishes from sibling tools like open_browser, scrape, and youtube_transcript, which perform different functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. There is no mention of appropriate scenarios, prerequisites, or exclusions, leaving the agent without context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_transcriptC
Extract the transcript from a YouTube video.
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Optional preferred language code (e.g., 'en', 'es'). | |
| target | Yes | The YouTube video URL or ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description fails to disclose any behavioral traits such as authentication requirements, availability of transcripts for all videos, or response format. This is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but under-specified. It lacks important details, so it does not fully earn its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description should include more context about what the tool returns, potential errors, or usage limits. It is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description does not add new meaning beyond what the schema already provides for the two parameters. Baseline score is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Extract the transcript from a YouTube video' uses a specific verb and resource, clearly distinguishing it from sibling tools like open_browser, scrape, and search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like scrape or search. The description does not mention limitations or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
open_browser - First observed
scrape - First observed
search - First observed
youtube_transcript
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
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Web search, URL content extraction to Markdown, site mapping, and recursive web crawler.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
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.6 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables web searching through Google, DuckDuckGo, and Bing using a headless Chrome browser, returning structured results with titles, URLs, and snippets. Also supports fetching and extracting text content from any webpage.14MIT
- AlicenseCqualityBmaintenanceEnables 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.738 npm26 PyPIMIT
- FlicenseAqualityDmaintenanceEnables web search, content fetching, dynamic page scraping, and URL preview via DuckDuckGo, Playwright, and Cheerio, without requiring API keys.4-