loading…
Search for a command to run...
loading…
Enables AI agents to browse and extract content from JavaScript-rendered web pages via the Model Context Protocol, returning plain text, HTML, or Markdown.
Enables AI agents to browse and extract content from JavaScript-rendered web pages via the Model Context Protocol, returning plain text, HTML, or Markdown.
Model Context Protocol Server for JS-Capable Terminal Browsing with Browsh
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.
fetch_web, supplying a URL and output type (plain, html, or markdown).X-Browsh-Raw-Mode: PLAIN (for text), DOM (for HTML), or fetches HTML and then converts to Markdown.From Claude, Cursor, or any MCP-enabled agent:
{
"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": "html" }
}
// → Returns after-JS-rendered HTML markup as string
{
"tool": "fetch_web",
"params": { "url": "https://coindesk.com/price/bitcoin/", "type": "markdown" }
}
// → Returns Markdown ("# Bitcoin Price\n\n| Time | Price | ...") suitable for direct LLM summarization, semantic search, or output formatting.
AI receives:
type: plain: pure readable text (tables, lists, main body content; ideal for NLP/summarization or terminal context ingestion).type: html: the full HTML markup, after all JavaScript. Use for element parsing, link graph construction, complex scrapes, etc.type: markdown: a clean Markdown version—best for LLM context chunks, semantic pipelines, and AI-friendly consumption/workflows.src/server.ts — MCP server exposing tools.src/browshManager.ts — Launch, monitor, shutdown Browsh.src/tools/fetchWeb.ts — fetchWeb tool implementation (handles plain, html, markdown).src/tools/html2markdownManager.ts — Wrapper for html2markdown CLI.README.md — This file.Dockerfile — For container launch (installs html2markdown CLI automatically)..env — Config overrides. Set BROWSH_FIREFOX_PATH or HTML2MARKDOWN_PATH as needed.Requirements:
wget -O /tmp/html2markdown.deb "https://github.com/JohannesKaufmann/html-to-markdown/releases/download/v2.3.3/html2markdown_2.3.3_linux_amd64.deb"
sudo apt-get install -y /tmp/html2markdown.deb
rm /tmp/html2markdown.deb
git clone https://github.com/mokhtarabadi/blowsh-mcp.git
cd blowsh-mcp
npm install
npm run build
After building, start the server using:
node dist/server.js
Replace 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
HTML2MARKDOWN_PATH=html2markdown
NODE_ENV=production
BROWSH_FIREFOX_PATH lets you customize the Firefox executable used by Browsh during headless/HTTP operation.HTML2MARKDOWN_PATH lets you specify a custom path to the html2markdown binary (default: html2markdown in PATH).| Name | Params | AI Use-case/Description |
|---|---|---|
| fetch_web | { url: string, type: "plain"|"html"|"markdown" } |
Unified tool: Extracts readable, JS-rendered terminal plain text, full HTML DOM, or Markdown from the page. Use type to select output. |
Returns
type: plain: Terminal-style, JS-executed readable text (or error string).type: html: Post-JS HTML markup string (or error string).type: markdown: Markdown conversion of DOM (or error string). Links, headings, lists, and page structure retained for AI-friendly context.type: plain: You need quick, readable output for summarization, classification, or simple parsing—where table layout and detail matter more than markup.type: html: You want to parse out elements, relationships, data tables, or navigation info, or need full control over page structure and links.type: markdown: You want a Markdown-formatted context for chunking into LLMs, semantic search, retrieval-augmented generation, or for passing content to other AI chains. Markdown output mimics what AIs “see” in high-signal language tasks.Error handling: Every tool returns actionable errors: e.g., invalid protocol, 404s, rendering failures—never silent.
Before configuring your AI client (Claude, Cursor, etc.), you must
- Install dependencies:
npm install- Build the project:
npm run build- Launch 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": {}
}
}
}
blowsh-mcp traps SIGINT/SIGTERM and ensures Browsh is terminated cleanly—no orphan browsers.
Add new tools in src/tools/, export them in src/server.ts, and document.
AI clients will auto-discover docstrings.
BROWSH_FIREFOX_PATH in .env to specify the full path to your Firefox install.MIT
Author: Mohammad Reza Mokhtarabadi [email protected]
Выполни в терминале:
claude mcp add blowsh-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.