chromium-mcp
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., "@chromium-mcp fetch https://example.com as markdown"
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.
Chromium MCP
MCP server for web fetching and automation using Chromium headless browser.
Reason behind this repository
I didn't wanna waste my "limited" tokens on Z.ai coding plan, therefore I made my own MCP to interact with the web, feel free to propose enhancements or new features.
Related MCP server: pulldown
Features
fetch_page: Fetch web pages and convert to markdown/HTML
screenshot: Take screenshots of web pages or specific elements
interact: Automate browser interactions (click, fill, scroll, wait)
extract_data: Extract structured data using CSS selectors
get_link: Get link information and follow redirects
Installation
From Git Repository
# Clone the repository
git clone https://github.com/gzigurella/chromium-mcp.git
cd chromium-mcp
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package
pip install -e .
# Install Chromium browser (required)
playwright install chromiumWith uv (recommended)
# Clone and enter directory
git clone https://github.com/gzigurella/chromium-mcp.git
cd chromium-mcp
# Install with uv
uv pip install -e .
# Install Chromium
playwright install chromiumIntegration
OpenCode
Add to your ~/.config/opencode/opencode.json:
{
"mcpServers": {
"chromium-fetch": {
"type": "local",
"command": [
"/path/to/chromium-mcp/venv/bin/python",
"-m",
"chromium_mcp"
],
"enabled": true
}
}
}Claude Desktop
Add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"chromium-fetch": {
"command": "/path/to/chromium-mcp/venv/bin/python",
"args": ["-m", "chromium_mcp"]
}
}
}Generic MCP Client
For any MCP-compatible client:
# Start the server directly
/path/to/venv/bin/python -m chromium_mcpThe server communicates via stdio using the MCP protocol.
Tools
fetch_page
Fetch a web page and return content as markdown or HTML.
Parameter | Type | Required | Default | Description |
url | string | Yes | - | URL to fetch |
format | string | No | "markdown" | Output format: "markdown" or "html" |
timeout | integer | No | 30 | Timeout in seconds |
wait_for | string | No | null | CSS selector to wait for |
{
"url": "https://example.com",
"format": "markdown",
"timeout": 30,
"wait_for": ".main-content"
}screenshot
Take a screenshot of a web page.
Parameter | Type | Required | Default | Description |
url | string | Yes | - | URL to screenshot |
format | string | No | "png" | Image format: "png" or "jpeg" |
quality | integer | No | 80 | JPEG quality (1-100) |
full_page | boolean | No | false | Capture full page |
selector | string | No | null | CSS selector for element |
timeout | integer | No | 30 | Timeout in seconds |
{
"url": "https://example.com",
"format": "png",
"full_page": true
}interact
Interact with web page elements sequentially.
Parameter | Type | Required | Default | Description |
url | string | Yes | - | URL to interact with |
actions | array | Yes | - | List of actions |
timeout | integer | No | 30 | Timeout in seconds |
Action Types:
click: Click element by selectorfill: Fill input fieldselect: Select dropdown optionscroll: Scroll pagewait: Wait for element
{
"url": "https://example.com/search",
"actions": [
{"type": "fill", "selector": "input[name='q']", "value": "test search"},
{"type": "click", "selector": "button[type='submit']"},
{"type": "wait", "selector": ".results", "milliseconds": 2000}
]
}extract_data
Extract structured data using CSS selectors.
Parameter | Type | Required | Default | Description |
url | string | Yes | - | URL to extract from |
selectors | array | Yes | - | List of extraction rules |
timeout | integer | No | 30 | Timeout in seconds |
{
"url": "https://example.com/products",
"selectors": [
{"name": "titles", "selector": "h2.product-title", "multiple": true},
{"name": "prices", "selector": ".price", "multiple": true},
{"name": "links", "selector": "a.product-link", "attribute": "href", "multiple": true}
]
}get_link
Get link href and text, optionally following navigation.
Parameter | Type | Required | Default | Description |
url | string | Yes | - | URL of page containing link |
selector | string | Yes | - | CSS selector for anchor |
click | boolean | No | false | Follow the link |
timeout | integer | No | 30 | Timeout in seconds |
{
"url": "https://example.com",
"selector": "a.download",
"click": true
}Configuration
Environment Variables
Variable | Default | Description |
CHROMIUM_PATH | auto | Path to Chromium executable |
HEADLESS | true | Run browser in headless mode |
TIMEOUT | 30 | Default operation timeout |
DEBUG | false | Enable debug logging |
# Example
export TIMEOUT=60
export HEADLESS=false
python -m chromium_mcpDevelopment
Running Tests
source venv/bin/activate
pytest
# With coverage
pytest --cov=src --cov-report=htmlProject Structure
chromium-mcp/
├── src/chromium_mcp/
│ ├── __init__.py
│ ├── __main__.py
│ ├── server.py
│ └── tools/
│ ├── __init__.py
│ ├── fetch_page.py
│ ├── screenshot.py
│ ├── interact.py
│ ├── extract_data.py
│ └── get_link.py
├── tests/
├── pyproject.toml
└── README.mdTroubleshooting
Browser Not Found
playwright install chromiumPermission Issues (Linux)
sudo sysctl -w kernel.shmmax=268435456Timeout Errors
export TIMEOUT=60Security
file://URLs are blockedCredentials are never logged
Browser processes are always cleaned up
All operations have configurable timeouts
License
MIT
Available Tools
5 toolsextract_dataA
Extract structured data from a web page using CSS selectors. Returns JSON with extracted text content or attribute values. Supports single element, multiple elements, and attribute extraction.
Inputs: url (required), selectors (required), timeout.
fetch_pageB
Fetch a web page using Chromium headless browser and return content as markdown or HTML. Useful for reading web pages, extracting content from dynamic sites that require JavaScript rendering.
Inputs: url (required), timeout, wait_for, format.
get_linkA
Get link href and text from a web page. By default extracts href without clicking. When click=true, follows the link and returns the final URL. Useful for extracting download links, checking redirect destinations, or getting link text.
Inputs: url (required), selector (required), click, timeout.
interactA
Interact with web page elements using Chromium headless browser. Execute actions like click, fill, select, scroll, and wait in sequence. Returns the final page content as markdown after all actions are executed.
Inputs: url (required), actions (required), timeout.
screenshotA
Take a screenshot of a web page using Chromium headless browser. Returns base64-encoded image. Supports PNG and JPEG formats, full page screenshots, and element screenshots via CSS selector.
Inputs: url (required), format, quality, full_page, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: fetching full page, extracting data via selectors, getting link info, interacting with elements, and taking screenshots. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (e.g., fetch_page, extract_data, get_link, interact, screenshot). No mixing of conventions.
5 tools is well-scoped for a browser automation server, covering the essential workflows without being excessive or insufficient.
The tool set covers core web scraping needs: fetching, extracting, interacting, and screenshots. Minor gaps exist (e.g., cookie handling, network capture), but the surface is largely complete for common use cases.
Maintenance
Related MCP Connectors
Web scraping MCP server: any URL to Markdown or JSON, with JavaScript rendering and batch jobs.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Web scraping MCP server — scrape, extract structured data, screenshot any site with anti-bot bypass.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceRemote MCP server for web scraping with anti-bot evasion. Provides stealth HTTP fetching, headless browser with Cloudflare bypass, CSS selectors, YouTube transcripts, and Markdown conversion.1MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for retrieving web pages as clean Markdown, with configurable detail levels and optional Chromium rendering for JavaScript-heavy pages.48 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for headless browser automation using Puppeteer, enabling AI to navigate, click, fill forms, take screenshots, and execute JavaScript on web pages.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to scrape web pages to clean Markdown via headless Chromium, with support for single or batch URLs.MIT