nodriver-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., "@nodriver-mcp Use my browser session to scrape product listings from example.com and save results as an artifact."
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.
nodriver-mcp
A local Codex MCP server for authenticated browser research with nodriver. It keeps a dedicated Chromium/Helium profile between runs and hot-reloads task-specific Python scrapers.
Setup
Requires Python 3.11+, uv, and a Chromium-based browser.
uv sync --lockedAdd this to ~/.codex/config.toml, replacing every placeholder with an absolute path:
[mcp_servers.nodriver]
command = "uv"
args = ["--directory", "<path-to-nodriver-mcp>", "run", "--frozen", "nodriver-mcp"]
startup_timeout_sec = 30
tool_timeout_sec = 600
[mcp_servers.nodriver.env]
NODRIVER_MCP_BROWSER_EXECUTABLE = "<path-to-helium-or-chromium>"
NODRIVER_MCP_USER_DATA_DIR = "<path-to-a-dedicated-browser-profile>"
NODRIVER_MCP_SCRIPTS_DIR = "<path-to-nodriver-mcp>/scrapers"
NODRIVER_MCP_ARTIFACTS_DIR = "<path-to-nodriver-mcp>/artifacts"Restart Codex after changing MCP configuration. The browser starts lazily. It is visible by
default so you can sign in to the dedicated profile once; its cookies persist. Codex passes
headless=true when a prompt explicitly requests headless browsing and selects visible mode
otherwise. Switching modes restarts the managed browser while preserving the profile.
Related MCP server: chrome-mcp
Use
Ask Codex, for example:
Use my browser session to find matching items on example.com. Inspect the page, create a reusable scraper, run it, and save large results as an artifact. Run headless.
Codex can inspect a page with the browser tools, then save and run a scraper. Each
scraper_run reads the file again, so edits apply without restarting the MCP server:
async def scrape(ctx, params):
if url := params.get("url"):
await ctx.goto(url)
items = await ctx.evaluate_json("""
Array.from(document.querySelectorAll('article')).map(item => ({
title: (item.querySelector('h2')?.innerText || '').trim(),
href: item.querySelector('a')?.href || null
}))
""")
return {"items": items}The entry point must be async def scrape(ctx, params) and return JSON-compatible data. Prefer
one bulk ctx.evaluate_json(...) call. Use ctx.write_artifact(...) for large results. Scrapers
must use async operations and finish all tasks before returning.
Test
uv run --frozen ruff check src tests
uv run --frozen pytestSecurity
Run this server locally over STDIO only. Scrapers are unsandboxed Python with the MCP process's OS access and control of an authenticated browser. Never expose cookies, tokens, passwords, or a DevTools endpoint; treat page content as untrusted; use only data you are authorized to access; and respect site terms and rate limits. Browser profiles, generated scrapers, and artifacts may contain private data and should not be committed.
Available Tools
9 toolsbrowser_closeClose browser sessionADestructiveIdempotent
Close the managed browser, or close MCP-owned tabs and detach in attach mode.
Inputs: no named parameters. Returns: object
browser_openOpen browser tabADestructive
Open or navigate an MCP tab, reusing the active tab unless new_tab is true.
Inputs: url, new_tab, headless. Returns: object
browser_queryQuery page elementsARead-only
Return text and safe attributes for elements matching a CSS selector.
Inputs: selector (required), limit, tab_id. Returns: object
browser_snapshotRead page contentARead-only
Return bounded visible text or outer HTML, optionally scoped to a CSS selector.
Inputs: format, tab_id, selector, max_chars. Returns: object
browser_statusBrowser statusARead-only
Report browser state and metadata for MCP-accessible tabs.
Inputs: no named parameters. Returns: object
scraper_getRead scraperARead-only
Return a saved scraper's source and metadata.
Inputs: name (required). Returns: object
scraper_listList scrapersARead-only
List metadata for saved scrapers.
Inputs: no named parameters. Returns: object
scraper_runRun scraperADestructive
Hot-load and run a saved scraper. Use either url or tab_id; new_tab requires url.
Inputs: name (required), url, params, tab_id, +3 more. Returns: object
scraper_saveSave scraperADestructive
Validate and atomically save a scraper for the next run.
Inputs: name (required), source (required), expected_revision. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Tools are generally distinct, but browser_open and scraper_run could confuse an agent: both involve navigation, though scraper_run is specifically for executing a saved scraper. Descriptions mitigate this ambiguity largely.
All tools follow a consistent verb_noun pattern with clear prefixes (browser_ and scraper_), making the purpose predictable and easy to navigate.
Nine tools cover both browser interaction and scraper management without excess or deficiency, well-scoped for a focused MCP server.
The set covers core browser operations and CRUD-like scraper management (list, get, save, run), but lacks a delete scraper tool, which is a minor gap for full lifecycle management.
Related MCP Connectors
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Programmatic web-scraping MCP server powered by x402 micro-transactions on Base.
MCP server to assist with JxBrowser development.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that exposes the Pinchtab browser API for token-efficient web scraping, change detection, and automated testing workflows.15MIT
- AlicenseNot gradedqualityDmaintenanceLocal MCP server for persistent Chrome automation with multi-profile support, enabling tab management, page inspection, element interaction, JavaScript evaluation, and screenshots while preserving login sessions across restarts.3MIT
- AlicenseNot gradedqualityCmaintenanceA hardened local browser MCP server that drives your existing Chrome over the DevTools Protocol, providing token-efficient Markdown extraction and stealth features to avoid trivial automation detection.5 npm1MIT
- FlicenseNot gradedqualityBmaintenanceEnables local-first web scraping and captcha solving via an MCP server written in Rust.-