blowsh-mcp
This server enables AI agents to interact with the web by:
Fetching any web page, including JavaScript-rendered content, with output in plain text, HTML, Markdown, or PDF text extraction.
Performing web searches via DuckDuckGo/Bing, returning ranked results with titles, URLs, and snippets.
Extracting all hyperlinks from a rendered page.
Fetching up to 10 URLs in a single batch request with per-URL error isolation.
Applying CSS selectors, character limits, and wait times for dynamic content.
Protecting against SSRF by blocking private/reserved IPs.
Utilizing in-memory caching for faster repeated fetches.
Receiving structured error responses with HTTP status codes.
Provides web search via DuckDuckGo, returning ranked results with URLs and snippets that can be used to discover pages for fetching.
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., "@blowsh-mcpget the markdown of the React documentation page"
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.
blowsh-mcp
Model Context Protocol Server for JS-Capable Terminal Browsing with Browsh
What is blowsh-mcp?
blowsh-mcp is a Model Context Protocol (MCP) server that exposes the power of Browsh—a fully JavaScript-capable terminal browser—to any AI Agent, IDE agent, or MCP client. This project allows your AI to fetch and render any modern web page, including those requiring JavaScript, and receive the result as easily-parsed plain text, HTML, or Markdown.
Mnemonic: “blowsh” = Browsh-powered MCP server.
Related MCP server: openmcp
Key Features
fetch_web Tool: Unified tool for readable plain text, HTML, or Markdown extraction (after full JS rendering). Supports CSS
selectorextraction,max_charsoutput caps,wait_msJS-settle polling, plus DonSeTch-parity extras:focus(BM25 relevance — cuts tokens 50-80%),toc/section(cheap outline → targeted section),must_containprobe (MATCH/NO-MATCH + excerpts, ~60 tokens),archive(Waybackauto/onlyresurrection), andstitch(followrel=nextup to 6 parts, same-host).search_web Tool: Discover pages via 4 rendered engines (DuckDuckGo HTML, Bing, Brave, Mojeek) fused by cross-engine consensus — plus intent verticals (code→GitHub, paper→arXiv, news→HN, entity→Wikipedia). Supports
query_variants(parallel alternate formulations),intent(auto/web/code/paper/news/entity),deadline_ms(hard budget), pagination, andenrich(top-3 markdown).crawl_web Tool: Sitemap-aware crawl — two-phase (map + content), focus-ranked frontier (BM25-lite), Governor pacing, robots.txt, resume tokens (30 min),
since_lastdelta, globs (include/exclude),same_host, budgets (max_pages/max_total_chars/deadline_s).extract_links Tool: List hyperlinks (text + absolute URL) from any JS-rendered page for navigation following.
fetch_web_batch Tool: Fetch up to 10 URLs in one call with per-URL error isolation.
SSRF guard: Refuses requests to loopback, private, link-local, or reserved addresses (DNS-resolved), protecting the server-side browser.
AI-optimized tool documentation: Inputs, outputs, and illustrated use-cases designed for seamless agent automation. Tools throw structured errors with HTTP status codes (
isErrorin MCP responses).Robust Browsh management: Launches Browsh once, keeps it running, reuses a RAM/CPU-light singleton, graceful shutdown on exit.
In-memory render cache with TTL: Repeated fetches are served instantly without re-rendering.
Designed for PaaS, Cloud, Local AI tools, and IDE agents.
Links
Browsh CLI Browser — The rendering engine.
Firefox — Required as the backend for Browsh.
Model Context Protocol (MCP) Specification — The agent/server protocol.
How it Works
AI/Agent makes an MCP request:
fetch_web(single URL, now with focus/toc/section/must_contain/archive/stitch),search_web(query + variants/intent),crawl_web(seed + budgets),extract_links(URL), orfetch_web_batch(up to 10 URLs).blowsh-mcp launches Browsh in HTTP server mode (on first use) and reuses it for all later calls.
blowsh-mcp requests the raw output from Browsh, using
X-Browsh-Raw-Mode: PLAIN(for text),DOM(for HTML), or fetches HTML and then converts to Markdown; forcrawl_web, it walks sitemaps + frontier via the same Browsh singleton + sitemap XML over axios.The page (after full JS execution) is returned as terminal plain text, rich HTML DOM, or clean Markdown—AI/agents pick the output type to match downstream processing; crawl returns
{pages, map, queued, skipped, stop}.Results are cached in memory (TTL) so repeated fetches are instant; every request is SSRF-checked before reaching the browser.
Quick Start (Docker — Prebuilt Image)
The image is published to GitHub Container Registry and rebuilt automatically on
every main push via GitHub Actions — no host-side Firefox/Browsh/html2markdown needed:
docker pull ghcr.io/mokhtarabadi/blowsh-mcp:latest
docker run --rm -i ghcr.io/mokhtarabadi/blowsh-mcp:latestThe
-iflag is mandatory: the MCP server speaks JSON-RPC over stdin/stdout. Keep it interactive and pipe requests, or point your MCP client at it (see AI Client Configuration below).
Example Usage
From Claude, Cursor, or any MCP-enabled agent:
{
"tool": "search_web",
"params": { "query": "bitcoin price today", "max_results": 5 }
}
// → Ranked results with URLs + snippets → feed top URL to fetch_web
{
"tool": "fetch_web",
"params": { "url": "https://coindesk.com/price/bitcoin/", "type": "plain" }
}
// → Returns readable plain text (live price as text table, etc)
{
"tool": "fetch_web",
"params": { "url": "https://coindesk.com/price/bitcoin/", "type": "markdown", "selector": "main", "wait_ms": 3000 }
}
// → Markdown of <main> only, after JS settles ("# Bitcoin Price\n\n| Time | Price | ...")
{
"tool": "extract_links",
"params": { "url": "https://example.com", "limit": 20 }
}
// → [{"text": "Learn more", "url": "https://iana.org/domains/example"}, ...]
{
"tool": "fetch_web_batch",
"params": { "urls": ["https://a.com", "https://b.com"], "type": "markdown" }
}
// → Per-URL results; a failing page never fails the batch
{
"tool": "fetch_web",
"params": { "url": "https://example.com/long-docs", "type": "markdown", "focus": "authentication error handling", "toc": false }
}
// → Only BM25-relevant blocks (50-80% shorter)
{
"tool": "fetch_web",
"params": { "url": "https://example.com/article", "type": "markdown", "must_contain": "/CVE-2026-\\d+/" }
}
// → MATCH/NO-MATCH + 3 excerpts (~60 tokens) instead of full page
{
"tool": "crawl_web",
"params": { "url": "https://docs.example.com", "mode": "full", "focus": "authentication", "max_pages": 20 }
}
// → {pages:[{url, title, kind, markdown, chars, quality}], map, queued, stop, resume}AI receives:
With
type: plain: pure readable text (tables, lists, main body content; ideal for NLP/summarization or terminal context ingestion).With
type: html: the full HTML markup, after all JavaScript. Use for element parsing, link graph construction, complex scrapes, etc.With
type: markdown: a clean Markdown version—best for LLM context chunks, semantic pipelines, and AI-friendly consumption/workflows.With
toc: true: heading outline only (# Table of Contents); withsection: "Heading"that section's markdown.With
must_contain: probe verdict (MATCH/NO-MATCH) + ≤3 excerpts.With
archive: "auto": Wayback snapshot labeled with date when live fetch fails.With
stitch: true: stitched multi-page article with*(part N)*markers.Errors are structured: MCP responses set
isError: truewith aFetchErrormessage including the HTTP status when available.
Project Structure
src/server.ts— MCP server exposing tools (5 tools in v2.3.0).src/browshManager.ts— Launch, monitor, shutdown Browsh.src/tools/fetchWeb.ts— fetchWeb (plain/html/markdown/pdf; selector/max_chars/wait_ms + focus/toc/section/must_contain/archive/stitch).src/tools/searchWeb.ts— search_web (DDG+Bing+Brave+Mojeek consensus + intent verticals + query_variants + deadline).src/tools/crawlWeb.ts— crawl_web (sitemap discovery, frontier BM25-lite, Governor pacing, resume tokens, since_last).src/tools/extractLinks.ts— extract_links (hyperlinks from rendered DOM).src/tools/fetchWebBatch.ts— fetch_web_batch (multi-URL, per-URL error isolation).src/tools/html2markdownManager.ts— Wrapper for html2markdown CLI.src/ssrf.ts— SSRF guard (blocks private/loopback/reserved targets).src/cache.ts— In-memory TTL render cache.src/extract.ts— Main-content extraction, selector helpers, truncation, plus BM25 focus, toc/section, must_contain, stitch helpers.src/errors.ts—FetchError+ message formatting.README.md— This file.Dockerfile— Multi-stage container (builds TS, bundles Firefox, Browsh, html2markdown)..github/workflows/docker-publish.yml— CI/CD: builds and publishes the image to ghcr.io onmain/v*..env— Config overrides. See.env.examplefor all options.
Installation
Requirements:
Node.js >= 20.18
Firefox installed and in PATH
Browsh CLI installed and in PATH
html2markdown CLI installed and in PATH
On Debian/Ubuntu, install with:
wget -O /tmp/html2markdown.deb "https://github.com/JohannesKaufmann/html-to-markdown/releases/download/v2.5.2/html2markdown_2.5.2_linux_amd64.deb" sudo apt-get install -y /tmp/html2markdown.deb rm /tmp/html2markdown.debOr use the prebuilt binary for your OS from the releases page.
Prefer Docker? Skip the host-side installs entirely — the multi-stage image bundles Firefox, Browsh, and html2markdown. The fastest path is the published image (
ghcr.io/mokhtarabadi/blowsh-mcp:latest, see Quick Start); to build it yourself:docker build -t blowsh-mcp:latest . docker run --rm -i blowsh-mcp:latest
git clone https://github.com/mokhtarabadi/blowsh-mcp.git
cd blowsh-mcp
npm install
npm run buildRun the MCP server
After building, start the server using:
node dist/server.jsReplace dist/server.js with the correct path if your build output differs.
Create a .env file as needed for configuration. For example:
MCP_TRANSPORT=stdio
BROWSH_FIREFOX_PATH=/usr/bin/firefox-esr
HTML2MARKDOWN_PATH=html2markdown
CACHE_TTL_MS=300000
BROWSH_REQUEST_TIMEOUT_MS=30000
ALLOW_PRIVATE_URLS=false
NODE_ENV=productionBROWSH_FIREFOX_PATHlets you customize the Firefox executable used by Browsh during headless/HTTP operation.HTML2MARKDOWN_PATHlets you specify a custom path to the html2markdown binary (default:html2markdownin PATH).CACHE_TTL_MS,BROWSH_REQUEST_TIMEOUT_MS, andALLOW_PRIVATE_URLStune the render cache, per-request timeout, and SSRF guard respectively.Browsh's HTTP port/host are NOT configurable.
Project Documentation
File | Audience | Purpose |
| Agents | Operating rules, guardrails, task lifecycle |
| All | MCP response/output design language |
| Devs | System overview, component wiring |
| Devs | Tool input/output schemas and error model |
| Devs | DateTime standard, SOLID guidelines |
| All | Version history (Keep a Changelog) |
| Team | Kanban task files (backlog → archive) |
This README is the user-facing entry point; agent-facing rules live in AGENTS.md and are mandatory reading before any implementation.
Tool API
Name | Params | AI Use-case/Description |
fetch_web |
| Fetch one page post-JS-render as text/HTML/Markdown. |
search_web |
| Search the web (DDG+Bing+Brave+Mojeek fused by consensus + intent verticals: GitHub/Wikipedia/arXiv/HN) and return |
crawl_web |
| Crawl a site from seed: two-phase sitemap discovery + focus-ranked frontier (BM25-lite) + Governor pacing (dwell variance + backoff). |
extract_links |
| Return all hyperlinks ( |
fetch_web_batch |
| Fetch up to 10 URLs in one call (cache-aware). Returns per-URL |
Returns
type: plain: Terminal-style, JS-executed readable text (or error string).type: html: Post-JS HTML markup string (or error string). Withselector, only the matched element's HTML.type: markdown: Markdown conversion of the main content or selected element (or error string). Links, headings, lists, and page structure retained for AI-friendly context.type: pdf: extracted plain text from the PDF document (via pdftotext, 20 MB cap).Errors are structured: an MCP response with
isError: trueand aFetchErrormessage that includes the HTTP status when knowable (never a silent empty string).
Environment Variables
Set these via .env (loaded automatically) or the environment:
Variable | Default | Description |
|
| Firefox binary used by Browsh (e.g. |
|
| Path to the html2markdown binary. |
|
| Per-render request timeout (ms). |
|
| Max PDF file size in bytes for |
|
| Number of requests after which the browser process is recycled. |
|
| Idle time in ms before the browser process is killed (10 min). |
|
| In-memory render cache TTL (ms). |
|
| Set |
|
| Transport type (only |
|
| Node environment. |
AI-Guided Tool Selection
Start with
search_web: To discover pages, run a query and pick the best result URLs; then fetch them. Useintentwhen you know the domain (code/paper/news/entity) andquery_variantsfor ambiguous recalls; setdeadline_msto bound latency.Use
fetch_webfor single pages:plainwhen you need quick readable output for summarization/classification;htmlto parse elements, links, or tables;markdownfor LLM-friendly context chunks. Addselector/max_chars/wait_msto stay token-efficient and get settled, relevant content. New:focuswhen you know the topic (cuts tokens 50-80%),toc→sectionfor two cheap calls on long pages,must_containfor verification questions (MATCH + excerpts, ~60 tokens),archive=autofor dead links,stitchfor pagination.Use
crawl_webfor sites: Sitemap-aware, focus-ranked, with budgets. Start withmode: mapfor cheap inventory; thenmode: full, focus: "topic"for relevant pages. Resume withresumetoken if stopped early.Use
extract_linksbefore deep crawls: Follow navigation cheaply instead of fetching full DOMs.Use
fetch_web_batchfor multiple sources: One call instead of N round-trips; failures are isolated per URL.
Error handling:
Tools throw FetchError and MCP returns isError: true with an actionable message — invalid protocols, SSRF blocks, unmatched selectors, HTTP status codes, and rendering failures are never silent.
MCP Protocol: AI Client Configuration
Before configuring your AI client (Claude, Cursor, etc.), you must
Install dependencies:
npm installBuild the project:
npm run buildLaunch the MCP server from the compiled output:
node dist/server.js
Example config for Claude Desktop or Cursor:
{
"mcpServers": {
"blowsh": {
"command": "node",
"args": ["dist/server.js"],
"env": {}
}
}
}Example config for opencode (project opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"blowsh": {
"type": "local",
"command": ["docker", "run", "--rm", "-i", "ghcr.io/mokhtarabadi/blowsh-mcp:latest"],
"enabled": true,
"timeout": 120000
}
},
"permission": { "blowsh_*": "allow" }
}The Docker form needs no host-side binaries; the image bundles Firefox, Browsh, and html2markdown. Restart opencode after saving (config is loaded once at startup).
Graceful Shutdown
blowsh-mcp traps SIGINT/SIGTERM and ensures Browsh is terminated cleanly—no orphan browsers.
Security and Considerations
The server runs Browsh locally and fetches via HTTP localhost.
SSRF guard: By default,
fetch_web/search_web/extract_links/fetch_web_batchrefuse URLs that resolve to loopback, private, link-local, or reserved IP ranges (checked over DNS). SetALLOW_PRIVATE_URLS=trueto disable — not recommended.No public exposure unless MCP HTTP/streamable server is explicitly configured.
Never expose ports to open web without firewall.
Use env vars for secrets/config.
Extending
Add new tools in src/tools/, export them in src/server.ts, and document.
AI clients will auto-discover docstrings.
Troubleshooting
If fetchPlain returns 404 or fails to render JS: check Firefox and Browsh are installed and in PATH.
If Firefox is not found or fails to launch, set
BROWSH_FIREFOX_PATHin.envto specify the full path to your Firefox install.Browsh port/host are fixed—there is no environment or CLI setting to change them.
For maximum security, run in a container.
License
MIT
Author: Mohammad Reza Mokhtarabadi mmokhtarabadi@gmail.com
Available Tools
1 toolfetch_webFetch Web (plain, html, markdown)A
Fetch a web page and return its content as plain text, HTML, or Markdown. Uses a JS-capable browser for dynamic sites.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The HTTP/HTTPS web URL to fetch | |
| type | Yes | The output type: plain, html, or markdown |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden for behavioral traits. It discloses the use of a JS-capable browser, which is critical for understanding behavior with dynamic sites. It does not mention rate limits or error handling, but the core behavioral trait is well covered.
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 two sentences, front-loading the main purpose and adding the browser capability as a key differentiator. Every sentence earns its place without redundancy.
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 2 simple parameters, no output schema, and no annotations, the description is sufficient. It covers the purpose, output types, and a notable behavior (JS browser). Minor missing details like response size limits or timeout are not critical for a basic fetch tool.
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 both parameters well described. The description adds 'plain text, HTML, or Markdown' but that is a restatement of the enum values. No additional nuance is provided beyond the schema.
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 action (fetch a web page) and the resource (web page content), and specifies three output types (plain, HTML, Markdown). It distinguishes the tool by mentioning JS-capable browser for dynamic sites, which sets it apart from simple fetchers.
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 explicit guidance on when to use this tool vs alternatives or when not to use it. Given no sibling tools are listed, it is minimally adequate but lacks context like 'use for public pages only' or 'prefer for dynamic content'.
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.
1 tool update
v1.0.0- First observed
fetch_web
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity between tools. The tool's purpose is clear and distinct.
The single tool name 'fetch_web' follows a clear verb_noun pattern. With only one tool, there is no inconsistency to evaluate.
A single tool is borderline for a server. While it serves a specific purpose, it feels thin compared to typical MCP servers that offer multiple related operations.
The tool provides core web fetching functionality with output format options. A minor gap might be the lack of custom headers or request methods, but agents can work around this for most use cases.
Maintenance
Related MCP Connectors
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Headless browser primitives for AI agents when sites need real JS rendering.
Fetch pages as markdown, search web and news, extract structured data. For AI agents.
Read a URL as clean markdown, screenshot a website, url to PDF. Web access for agents, no signup.
Related MCP Servers
AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to fetch live web content with JavaScript rendering, proxy rotation, and anti-bot evasion.991 npm57MIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to automate web tasks such as browsing, clicking, typing, and taking screenshots via the Model Context Protocol.1MIT

Browseagent MCPofficial
AlicenseAqualityDmaintenanceEnables AI agents to control web browsers through the Model Context Protocol, supporting navigation, clicking, typing, and screenshots.126 npm1MIT- AlicenseAqualityCmaintenanceEnables AI agents to fetch any web page as clean markdown or screenshot it, turning URLs into LLM-ready context.26 npmMIT