Obscura MCP Server — Give Your AI Agent a Browser
Obscura's MCP server exposes 30+ browser tools to AI agents. Claude Desktop, Claude Code, and Cursor can navigate, fill forms, extract data, and manage cookies.
When AI Needs a Browser
LLMs have knowledge cutoffs, cannot access private systems, and cannot perform actions. MCP (Model Context Protocol) gives AI the ability to call tools, and Obscura's MCP server gives AI a browser.
Once configured, AI can:
- Open web pages and read content
- Fill forms and log in
- Click buttons and links
- Extract page content and links
- Manage cookies and session state
Start the MCP Server
Two transport modes:
# stdio mode (default, for Claude Desktop local integration)
obscura mcp
# HTTP mode (remote or container deployment)
obscura mcp --http --port 8080
# With stealth
obscura mcp --stealth
# With proxy
obscura mcp --stealth --proxy http://proxy.16yun.cn:8888HTTP transport binds to 127.0.0.1 by default. When a container or sidecar deployment needs external access, bind all interfaces with --host 0.0.0.0:
obscura mcp --http --host 0.0.0.0 --port 3000Claude Desktop Configuration
{
"mcpServers": {
"obscura": {
"command": "/path/to/obscura",
"args": ["mcp", "--stealth"]
}
}
}Config location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
Claude Code:
claude mcp add obscura /path/to/obscura mcpAfter restarting the client, the Obscura browser tools appear in the available tool list.
Browser Tools Overview
The Obscura MCP server exposes 30+ browser tools covering navigation, reading, interaction, waiting, JS execution, cookies, and tab management. Understanding how the tools divide labor is the foundation for composing complex workflows — MCP tools are fine-grained, and the AI strings them together in a "navigate → read/interact → wait → read again" rhythm.
Navigation
| Tool | Description |
|---|---|
browser_navigate | Navigate to a URL |
browser_back | Go back one page |
browser_forward | Go forward one page |
browser_reload | Reload current page |
browser_close | Close page and reset state |
Page Reading
| Tool | Description |
|---|---|
browser_snapshot | Return URL, title, and body text |
browser_markdown | Convert page to Markdown |
browser_links | Extract all links |
browser_interactive_elements | List interactive elements |
browser_detect_forms | Detect form fields |
browser_extract | Extract structured content by selector |
browser_get_attribute | Read element attribute |
browser_count | Count matching elements |
browser_search | Search page text |
browser_network_requests | List network requests |
browser_console_messages | Return console messages |
Interaction
| Tool | Description |
|---|---|
browser_click | Click an element |
browser_fill | Set input value |
browser_fill_form | Fill entire form at once |
browser_type | Append text to an input |
browser_press_key | Dispatch keyboard event |
browser_select_option | Select dropdown option |
browser_scroll | Scroll the page |
Wait and JavaScript
| Tool | Description |
|---|---|
browser_wait_for | Wait for selector to appear |
browser_wait_for_text | Wait for text to appear |
browser_evaluate | Execute JavaScript expression |
Cookie and Storage
| Tool | Description |
|---|---|
browser_get_cookies | Get all cookies |
browser_set_cookie | Set a cookie |
browser_clear_cookies | Clear all cookies |
browser_storage_state | Export auth state (cookies + localStorage) |
browser_set_storage_state | Restore auth state |
Tab Management
| Tool | Description |
|---|---|
browser_tab_new | Open a new tab |
browser_tab_list | List all open tabs |
browser_tab_switch | Switch to a specific tab |
browser_tab_close | Close a tab |
Example: AI Auto-Search
An AI agent workflow:
- browser_navigate → Open search engine
- browser_fill → Enter keywords
- browser_press_key → Press Enter
- browser_wait_for → Wait for results
- browser_snapshot → Read results summary
- browser_click → Click interesting link
- browser_markdown → Extract page as Markdown
- browser_network_requests → Inspect API calls
This flow shows the core value of MCP: every step is the AI making its own decision after observing the previous step's result. A scripted Puppeteer cannot do this — it executes predetermined logic and breaks when the page structure changes. An AI agent can read browser_snapshot, understand "this page is a CAPTCHA" or "the results are empty", and decide for itself whether to retry or take a different path.
Session State Management
MCP tools operate on the current browser session, just like CDP mode. A few things to keep in mind:
- Navigate first.
browser_snapshot,browser_click, andbrowser_extractall act on the current page, so the first step of a workflow is almost alwaysbrowser_navigate. - Auth state is persistable. Export Cookie + localStorage with
browser_storage_stateand restore it next session withbrowser_set_storage_state, so you do not re-login every time. Combined with the--storage-dirstartup flag, state is also persisted to disk across processes. - Parallel tabs.
browser_tab_newplusbrowser_tab_switchlets the AI move between pages, which suits "look something up on site A, fill a form on site B" cross-site workflows.
HTTP Security
Two layers of protection for HTTP transport.
Origin allowlist:
OBSCURA_MCP_ALLOWED_ORIGINS="https://app.16yun.cn" \
obscura mcp --http --host 0.0.0.0 --port 3000When set, only browser pages with a listed Origin can reach the MCP endpoint. Native MCP clients send no Origin and are always allowed. Unset (the default) keeps the permissive behavior. This layer mainly stops malicious web pages from cross-origin POSTing to a loopback MCP port.
Body cap: 16 MB max per request, preventing memory exhaustion from oversized unauthenticated calls.
Whenever you expose the HTTP transport beyond loopback, set the allowlist and put it behind an authenticating reverse proxy or network isolation.
With Stealth and Proxy
obscura mcp \
--stealth \
--proxy http://user:pass@proxy.16yun.cn:8888 \
--user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ..."Every browser action the AI agent takes goes through Stealth anti-detection and the proxy exit. For scraping-style tasks this layer is indispensable — an MCP session without Stealth is easily flagged as automated traffic by a target site's passive detection.
Above Traditional Browser Automation
Comparing a Puppeteer script with an MCP AI agent:
| Aspect | Puppeteer script | MCP + AI Agent |
|---|---|---|
| Flexibility | Fixed logic, pre-programmed | Natural-language goal, AI picks steps |
| Fault tolerance | Breaks on unexpected pages | AI observes, analyzes, retries |
| Onboarding | Requires writing code | Just configure MCP |
| Reliability | Deterministic | Non-deterministic, needs guardrails |
One trade-off to weigh: the AI agent's non-determinism means the same input can produce different step paths. For reproducible batch jobs, deterministic scripts (CDP or CLI) remain the better fit; MCP shines for one-off, exploratory, or structure-unknown work.
Summary
The Obscura MCP server is the standard bridge between AI agents and the web. 30+ tools cover all basic browser automation operations, and combined with Stealth and proxy configuration, an AI agent can browse, extract, and act like a real user. It is best suited for exploratory, high-fault-tolerance, structure-uncertain tasks; for deterministic batch processing, the CLI and CDP remain the safer choice.
Need an enterprise proxy plan?
We can tailor architecture to your target domains, concurrency, and reliability goals.