Rod MCP Server
Click on "Install 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., "@Rod MCP ServerNavigate to example.com and take a screenshot"
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.
Rod MCP Server
Browser automation for AI agents via the Model Context Protocol.
Built on Rod — a fast, reliable Go library for controlling Chromium browsers.
Rod MCP gives AI agents (Claude, Cursor, etc.) full browser control — navigate pages, fill forms, click buttons, take screenshots, generate PDFs, and more. It works in two modes:
Text mode (default): Uses accessibility snapshots for structured, token-efficient interaction
Vision mode: Uses screenshots with coordinate-based clicking for visual AI models
Quick Start
Install
One-command build from source (no dotfiles required):
git clone https://github.com/aliwatters/rod-mcp.git && cd rod-mcp && ./install.shThis builds the binary and installs it to ~/.local/bin/rod-mcp. Re-running is a no-op unless HEAD changed; use --force or FORCE_REBUILD=1 to rebuild. Set INSTALL_PREFIX to change the install root.
Or via go install:
go install github.com/aliwatters/rod-mcp@latestOr download a pre-built binary for your platform.
Configure your MCP client
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"rod-mcp": {
"command": "rod-mcp",
"args": ["--headless", "--no-banner", "--compact-snapshot"]
}
}
}Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"rod-mcp": {
"command": "rod-mcp",
"args": ["--headless", "--no-banner", "--compact-snapshot"]
}
}
}Cursor (.cursor/mcp.json):
{
"mcpServers": {
"rod-mcp": {
"command": "rod-mcp",
"args": ["--headless", "--no-banner", "--compact-snapshot"]
}
}
}That's it. Your AI agent can now browse the web.
Tools
Navigation
Tool | Description |
| Navigate to a URL |
| Go back in browser history |
| Go forward in browser history |
| Reload the current page |
Page Interaction (Text Mode)
Tool | Description |
| Capture accessibility snapshot of the page |
| Click an element by ref or accessible name/role |
| Hover over an element by ref or accessible name/role |
| Type text into an input field by ref or accessible name/role |
| Select an option in a dropdown by ref or accessible name/role |
Semantic targeting:
rod_click,rod_hover,rod_fill, androd_selectoracceptname(accessible name, substring match) androle(ARIA role filter) as alternatives toref. This enables one-step interactions without callingrod_snapshotfirst — e.g.,rod_click(element="Login button", name="Login", role="button").
Page Interaction (Vision Mode)
Tool | Description |
| Click at x,y coordinates |
| Click at coordinates and type text |
Media
Tool | Description |
| Take a PNG screenshot |
| Generate a PDF of the page |
Browser Control
Tool | Description |
| Execute JavaScript in the browser |
| Close the browser |
| Set HTTP headers for requests |
| Set viewport size and device emulation |
| Handle JavaScript dialogs (alert, confirm, prompt) |
| Change headless mode or CDP endpoint at runtime |
Tabs
Tool | Description |
| Open a new tab |
| List all open tabs |
| Switch to a tab |
| Close a tab |
Accessibility
Tool | Description |
| Audit page accessibility — find missing labels, heading order issues, WCAG violations |
Debugging
Tool | Description |
| Wait for a selector or text to appear |
| Capture browser console output |
| Capture network requests |
| Get the response body of a captured network request |
Input
Tool | Description |
| Press a keyboard key |
| Scroll the page or an element |
| Drag and drop elements |
| Upload files to a file input |
State & Storage
Tool | Description |
| Get, set, or delete cookies |
| Inspect localStorage and sessionStorage |
| Grant or reset browser permissions |
Network
Tool | Description |
| Intercept, mock, block, or fail network requests |
| List WebSocket connections and inspect frames |
Performance
Tool | Description |
| Get page performance metrics and Core Web Vitals |
| Start/stop CSS and JS code coverage collection |
Configuration
CLI Flags
--config, -c Path to config file (default: $XDG_CONFIG_HOME/rod-mcp/rod-mcp.yaml, or ~/.config/rod-mcp/rod-mcp.yaml)
--headless, -hl Run browser without GUI
--vision, -vs Enable vision mode (coordinate-based tools)
--compact-snapshot Reduce snapshot size for fewer tokens
--output-dir Directory for screenshots and PDFs
--omit-images Don't include base64 images in responses
--cdp-endpoint Connect to an existing browser via CDP
--chrome-debug-port Launch Chrome with remote debugging on this port
--user-data-dir Clone a Chrome profile directory (inherits cookies/sessions)
--clone-domains Comma-separated domains to clone cookies for (e.g. "localhost,*.clerk.dev")
--no-clone Use profile directly instead of cloning (locks your main Chrome)
--clone-all Clone ENTIRE profile including passwords, history, extensions (slow!)
--no-banner Suppress the startup bannerConfig File
Create a config at $XDG_CONFIG_HOME/rod-mcp/rod-mcp.yaml (or ~/.config/rod-mcp/rod-mcp.yaml; one is generated automatically there on first run):
mode: text # text or vision
headless: false # run without GUI
browserBinPath: "" # path to Chrome/Chromium (auto-detected)
browserTempDir: ./rod/browser # browser profile directory
noSandbox: false # disable Chrome sandbox
proxy: "" # proxy URL (e.g. socks5://localhost:1080)
compactSnapshot: false # reduce tokens in snapshots
outputDir: "" # screenshot/PDF output (default: OS temp)
imageResponses: allow # allow or omit inline base64 images
userDataDir: "" # Chrome profile to clone (e.g. ~/Library/Application Support/Google/Chrome)
cloneDomains: # domains to clone cookies for (empty = all cookies)
- "localhost"
- "*.clerk.dev"
# Inject HTTP headers globally
extraHTTPHeaders:
Authorization: "Bearer my-token"
# Inject headers for specific domains (supports wildcards)
domainHeaders:
"*.example.com":
X-Custom-Header: "value"Connecting to an Existing Browser
To control an already-running Chrome instance (useful for authenticated sessions):
Option A — Clone your Chrome profile (cookies, sessions, auth) for specific domains:
# macOS — clone only cookies for your app's domains
rod-mcp --user-data-dir "$HOME/Library/Application Support/Google/Chrome" \
--clone-domains "localhost,*.clerk.dev,*.stripe.com"
# Linux
rod-mcp --user-data-dir "$HOME/.config/google-chrome" \
--clone-domains "localhost,*.myapp.com"
# Clone all cookies (no domain filter)
rod-mcp --user-data-dir "$HOME/Library/Application Support/Google/Chrome"By default, --user-data-dir clones the profile to a temp directory (cleaned up on exit) so your main Chrome stays usable. Cookies are decrypted from Chrome's encrypted database using your macOS Keychain and injected via CDP — no need to quit your main browser.
Note: Cookie decryption currently requires macOS (reads "Chrome Safe Storage" from Keychain) and
sqlite3in PATH. On other platforms, use--no-cloneas a workaround.
# Use profile directly without cloning (Chrome must not be running)
rod-mcp --user-data-dir "..." --no-clone
# ⚠️ Clone EVERYTHING — passwords, history, extensions, all browser data
# This is slow for large profiles and copies sensitive data to a temp directory
rod-mcp --user-data-dir "..." --clone-allOption B — Let rod-mcp launch Chrome with debugging enabled:
rod-mcp --chrome-debug-port 9222Option C — Launch Chrome yourself, then connect:
Launch Chrome with remote debugging:
google-chrome --remote-debugging-port=9222Connect rod-mcp:
rod-mcp --cdp-endpoint http://127.0.0.1:9222Or use
rod_configureat runtime to switch to a CDP endpoint.
Docker
docker build -t rod-mcp .
docker run -i --rm rod-mcpThe container runs headless with Chromium. Mount a custom config:
docker run -i --rm -v ./rod-mcp.yaml:/app/rod-mcp.yaml:ro rod-mcpOr use Docker Compose:
docker compose up --buildBuilding from Source
git clone https://github.com/aliwatters/rod-mcp.git
cd rod-mcp
go build -o rod-mcp .Prerequisites
Go 1.23+
Chrome or Chromium
Project Structure
rod-mcp/
├── main.go # Entry point
├── cmd.go # CLI flags and commands
├── server.go # MCP server setup and tool registration
├── runner.go # Server lifecycle
├── tools/ # All MCP tool implementations
│ ├── browser.go # evaluate, close, headers, resize, dialog
│ ├── configure.go # runtime reconfiguration
│ ├── debug.go # wait_for, console, network
│ ├── input.go # keyboard, file upload
│ ├── media.go # screenshot, PDF
│ ├── navigation.go# navigate, back, forward, reload
│ ├── snapshot.go # text mode: snapshot, click, hover, fill, selector
│ ├── tabs.go # tab management
│ └── vision.go # vision mode: coordinate click/fill
├── types/ # Config, context, snapshot, logging
├── utils/ # Shared utilities
├── banner/ # Startup banner
└── assets/ # Logo imagesLicense
MIT - see LICENSE
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliwatters/rod-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server