obscura-mcp
Officialobscura-mcp — ARCHIVED
⚠️ Archived. Upstream ships native MCP since v0.1.4 (
obscura mcp). npm package deprecated.
An MCP server adapter for Obscura, a lightweight Rust headless browser for scraping and AI agent automation.
Exposes Obscura's native CDP capabilities through a clean MCP interface — no Chrome dependency, no heavyweight browser automation.
Installation
npm install -g obscura-mcpThe npm package itself is a small Node.js wrapper (~20 KB). The browser binary (~80 MB) is downloaded automatically on first use — no separate install step needed.
The binary is cached at ~/.obscura/bin/ and survives npm upgrades.
Pre-release builds are published under the dev tag:
npm install -g obscura-mcp@devTo use a custom binary path:
export OBSCURA_PATH=/path/to/obscuraRelated MCP server: Algonius Browser
Quick Start
# Install
npm install -g obscura-mcp
# Verify
obscura-mcp --version
# Start MCP server (stdio — primary transport)
obscura-mcp --transport stdio
# Or with HTTP transport
obscura-mcp --transport streamable-httpMost MCP clients (Claude Desktop, Cline, Continue) connect via stdio. The streamable-http transport is also supported for custom integrations.
Tools
Four tools cover browsing, interacting, session persistence, and bulk scraping.
browse_page — one-shot page reading
Get content from any page in a single call. Combine output format with optional JavaScript evaluation.
Parameter | Type | Default | Description |
|
| — | The URL to visit |
|
|
| Output format |
|
| — | JavaScript expression to evaluate (appended to output) |
|
| — | Cookies to inject |
|
| — | Override the browser user-agent string |
|
| — | Extra HTTP headers |
|
|
| Accepted for compatibility; stealth is controlled by the Obscura server |
Examples:
browse_page(url: "https://example.com")
browse_page(url: "https://example.com", format: "markdown")
browse_page(url: "https://example.com", format: "axtree")
browse_page(url: "https://example.com", format: "layout")
browse_page(url: "https://example.com", user_agent: "TestBot/1.0")
| What you get |
| Plain text — stripped of HTML tags, scripts, styles |
| Clean markdown — uses Obscura's native LP.getMarkdown CDP |
| Raw HTML markup |
| All href values — one per line |
| Cookies with name, value, domain, path, expiry |
| Accessibility tree — roles, names, values of all elements |
| Viewport metrics — dimensions, scroll offsets, device scale |
When eval is provided, the JavaScript result is appended to the format output under a --- eval --- divider.
browse_interact — one-shot page actions
Click an element or type text into a page. For multi-step interactions (login → wait → extract), use browse_session instead.
Parameter | Type | Default | Description |
|
| — | The URL to visit |
|
| — | Action to perform |
|
| — | CSS selector for the target element |
|
| — | Text to type (required when |
|
| — | Cookies to inject |
|
|
| Accepted for compatibility; stealth is controlled by the Obscura server |
Examples:
browse_interact(url: "https://example.com", action: "click", selector: "a")
browse_interact(url: "https://duckduckgo.com", action: "type", selector: "input[name=q]", text: "search query")Both actions create a fresh page, perform the action, and close. The page context does not persist — for sequential interactions (type into a form, then click submit), use browse_session instead.
browse_session — multi-step persistent sessions
Create a persistent browser session, interact with it across multiple calls, then close. Sessions auto-close after 5 minutes of inactivity. Multiple sessions can run simultaneously.
Parameter | Type | Required for | Description |
|
| All | What to do |
|
| All except | Session ID from |
|
|
| URL to navigate to |
|
|
| CSS selector |
|
|
| JavaScript expression |
|
|
| Text to type |
|
|
| Max wait in ms (default 30000, max 120000) |
|
|
| Override user-agent string for navigation |
|
|
| Extra HTTP headers |
|
|
| Clear all browser cookies on session creation |
Session lifecycle:
| What it does | Returns |
| Opens a new browser tab. Optionally clears cookies. | Session ID |
| Releases the tab and all its resources. Idempotent. | Confirmation |
| Shows all active sessions with timestamps. | Session list |
| Navigates to a new URL. Page stays alive. | Confirmation |
| Polls until a CSS selector exists or a JS expression returns true. | Confirmation |
| Evaluates JavaScript and returns the result. | Eval result |
| Clicks an element by CSS selector. | Coordinates |
| Types text into an input field. | Confirmation |
Login flow example:
browse_session(action: "create", url: "https://example.com/login")
→ "Created session: session_1"
browse_session(action: "type", session_id: "session_1", selector: "#username", text: "user")
browse_session(action: "type", session_id: "session_1", selector: "#password", text: "pass")
browse_session(action: "click", session_id: "session_1", selector: "#login-btn")
browse_session(action: "wait", session_id: "session_1", selector: ".dashboard", timeout: 10000)
browse_session(action: "extract", session_id: "session_1", expression: "document.title")
browse_session(action: "close", session_id: "session_1")Multi-article browsing example:
browse_session(action: "create")
browse_session(action: "goto", session_id: "session_1", url: "https://en.wikipedia.org/wiki/JavaScript")
browse_session(action: "extract", session_id: "session_1", expression: "document.title")
browse_session(action: "goto", session_id: "session_1", url: "https://en.wikipedia.org/wiki/Python")
browse_session(action: "extract", session_id: "session_1", expression: "document.title")
browse_session(action: "close", session_id: "session_1")browse_scrape — parallel bulk scraping
Scrape multiple URLs simultaneously using isolated worker processes. Each URL gets its own headless browser worker — built on top of Obscura's native scrape command with obscura-worker.
Parameter | Type | Default | Max | Description |
|
| — | 1000 | URLs to scrape in parallel |
|
| — | — | JavaScript expression to evaluate per page |
|
|
|
| Number of parallel worker processes |
|
|
|
| Per-worker timeout in seconds |
Example:
browse_scrape(urls: ["https://news.ycombinator.com", "https://example.com"], eval: "document.title", concurrency: 25)Output format (JSON):
{
"total_urls": 2,
"concurrency": 25,
"total_time_ms": 1250,
"avg_time_ms": 625.0,
"results": [
{
"url": "https://news.ycombinator.com",
"title": "Hacker News",
"eval": "Hacker News",
"time_ms": 612,
"worker": 0
},
{
"url": "https://example.com",
"eval": "Example Domain",
"time_ms": 638,
"worker": 1
}
]
}On errors (timeout, network failure, etc.), the per-URL result includes an "error" field instead of "eval":
{
"url": "https://slow-site.com",
"error": "timeout",
"time_ms": 60000
}This is the tool that directly leverages Obscura's core advantage over headless Chrome: lightweight parallel scraping with built-in stealth. The ~30 MB per-worker memory footprint means 100 concurrent workers use less memory than a single Chrome instance.
Configuration
Claude Desktop / Cline / Continue / Any MCP client
{
"mcpServers": {
"obscura-mcp": {
"command": "obscura-mcp",
"args": ["--transport", "stdio"]
}
}
}VS Code (Cline extension)
{
"servers": {
"obscura-mcp": {
"command": "obscura-mcp",
"args": ["--transport", "stdio"]
}
}
}After global npm install, obscura-mcp is on your PATH — no absolute paths needed.
Environment Variables
Variable | Default | Description |
| — | Path to custom Obscura binary |
| — | Enable stealth mode (anti-detection) |
| — | Proxy URL for all traffic |
| — | Default user-agent override |
|
| HTTP transport host |
|
| HTTP transport port |
|
| Transport mode: |
|
| Milliseconds to wait for Obscura CDP to start |
|
| Milliseconds to wait after page navigation |
|
| Milliseconds to wait for CDP response |
Development
Built with TypeScript, compiled to dist/, tested with Vitest.
git clone https://github.com/Metadrama/obscura-mcp
cd obscura-mcp
npm install
npm run build
npm testAll 36 integration tests run against a real Obscura binary (auto-downloaded on first run). Tests use StdioClientTransport and cover every tool, format, and action.
Why Obscura?
No Chrome — pure Rust, no 200 MB browser bundle
CDP-native — exposes Chrome DevTools Protocol directly
Anti-detection — built-in stealth for scraping-resistant sites
Tiny footprint — ~15 MB binary, starts in milliseconds
License
MIT
Available Tools
3 toolsbrowse_cookiesA
Navigate to a URL and retrieve all cookies set by the page. Returns cookie name, value, domain, path, and expiry for each cookie.
Inputs: url (required), stealth.
browse_evaluateA
Navigate to a URL and execute JavaScript in the page context. Returns the evaluated result as a string. Supports extracting data, clicking elements, filling forms, and reading page state.
Inputs: url (required), expression (required), stealth.
browse_urlA
Fetch a URL using Obscura's lightweight CDP engine. To access authenticated pages, pass cookies previously exported from browse_cookies.
Inputs: url (required), dump, cookies, stealth.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool serves a distinct purpose: retrieving cookies, executing JavaScript, and fetching a URL. There is no ambiguity between the three operations.
All tool names follow the consistent pattern 'browse_<operation>', using snake_case and a common prefix, ensuring predictability.
With only 3 tools, the surface is thin for a browser automation server. It covers basic actions but feels minimal, so it is borderline appropriate.
The set covers URL fetching, cookie extraction, and JS execution, but lacks direct interaction tools (e.g., clicking, form filling, waiting). Workarounds are possible via JS, but gaps exist.
Related MCP Connectors
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Web scraping MCP server — scrape, extract structured data, screenshot any site with anti-bot bypass.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
An MCP server that provides agents access to the KeldynAI platform
Related MCP Servers
AlicenseAqualityCmaintenanceA local MCP server that lets AI agents bypass bot detection, geo-restrictions, and JavaScript rendering challenges when scraping the web, backed by ScraperAPI's services285MIT
Algonius Browserofficial
AlicenseNot gradedqualityDmaintenanceAn open-source MCP server that provides browser automation capabilities to external AI systems, enabling navigation, DOM interaction, and web content extraction.20Apache 2.0- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that enables AI agents to automate browser interactions using Playwright and Cloudflare Workers, supporting tasks like navigation, clicking, typing, and screenshots.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for web scraping and browser automation, enabling AI agents to extract clean, token-efficient content from web pages.1MIT