Opera DevTools MCP
README.md
<div align="center">
<img src="https://media.tenor.com/EEbyku4nU8gAAAAi/rimuru-spin.gif" width="170" alt="Rimuru spinning" />
<img src="https://media1.tenor.com/m/ajHV0O5APUMAAAAC/rimuru-rimuru-tempest.gif" width="170" alt="Rimuru Tempest animation" />
<img src="https://media1.tenor.com/m/T6cnb8csQAMAAAAC/%E3%81%A1%E3%82%87%E3%81%93%E3%81%88%E3%81%84-chocoeiru.gif" width="170" alt="Anime character animation" />
<br /><br />
<img src="https://readme-typing-svg.herokuapp.com?font=Orbitron&weight=700&size=28&duration=3200&pause=900&color=FF1B2D&center=true&vCenter=true&width=760&height=65&lines=Opera+DevTools+MCP;Browse.+Inspect.+Automate.+Debug.;Built+for+Opera+and+Opera+GX." width="760" alt="Opera DevTools MCP animated introduction" />
# Opera DevTools MCP
### ๐ Browser Automation ยท ๐ Page Inspection ยท ๐ธ Screenshots ยท ๐ก๏ธ Test Profiles
<p>
<img src="https://img.shields.io/badge/Opera-FF1B2D?style=for-the-badge&logo=opera&logoColor=white" alt="Opera" />
<img src="https://img.shields.io/badge/Opera_GX-8B5CF6?style=for-the-badge&logo=opera&logoColor=white" alt="Opera GX" />
<img src="https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black" alt="JavaScript" />
<img src="https://img.shields.io/badge/Node.js-339933?style=for-the-badge&logo=nodedotjs&logoColor=white" alt="Node.js" />
<img src="https://img.shields.io/badge/Bun-14151A?style=for-the-badge&logo=bun&logoColor=white" alt="Bun" />
</p>
<p>
<img src="https://img.shields.io/badge/Release-0.9.0--rc.2-FF1B2D?style=flat-square" alt="Release 0.9.0-rc.2" />
<img src="https://img.shields.io/badge/Status-Release_candidate-8B5CF6?style=flat-square" alt="Release candidate" />
<img src="https://img.shields.io/badge/Tested_on-Windows_11_x64-0078D4?style=flat-square" alt="Tested on Windows 11 x64" />
<img src="https://img.shields.io/badge/Local_tests-44_passing-52D6A0?style=flat-square" alt="44 passing local tests" />
<img src="https://img.shields.io/badge/MCP_tools-19-79A8FF?style=flat-square" alt="19 MCP tools" />
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-8B5CF6?style=flat-square" alt="Apache 2.0 license" /></a>
</p>
[Get started](#installation) ยท [Opera support](#opera-support) ยท [Connect Codex](#connect-codex) ยท [Tools](#tools) ยท [Contributing](#contributing)
</div>
---
> Current status: **Release candidate 0.9.0-rc.2.** Validated locally on Windows with Opera and GX. See the [support matrix](SUPPORT.md) for the tested scope.
> [!NOTE]
> This candidate has not been published to npm. Hosted GitHub Actions remains unverified until the repository is uploaded and the workflow runs.
---
## ๐ About Opera DevTools MCP
An independent Model Context Protocol (MCP) server built from scratch with the official MCP SDK and `puppeteer-core`. Connect a stdio MCP client to **Opera or Opera GX** to navigate pages, interact with forms, inspect errors and capture screenshots.
The server is written in JavaScript and runs on Node.js or Bun. Codex is the tested MCP client.
```text
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ OPERA MCP WORKSPACE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Opera and Opera GX on Windows โ
โ 19 tools for browser automation โ
โ Accessibility snapshots and IDs โ
โ Screenshots, console and network โ
โ Temporary or dedicated test profiles โ
โ Node.js and Bun runtimes โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
```
Local validation records **44 passing tests** and **36 connection scenarios**, with all 19 basic tool paths exercised in each scenario. See [VALIDATION.md](VALIDATION.md) for versions, evidence and limits.
---
## โจ Main Features
<table>
<tr>
<td width="50%" valign="top">
### ๐ Pages and Navigation
- Open, select and close tabs
- Navigate the active page
- Wait for text or visible elements
- Launch Opera or Opera GX
</td>
<td width="50%" valign="top">
### ๐ฎ Page Interaction
- Click and hover over elements
- Fill inputs and select dropdown options
- Press keys and keyboard shortcuts
- Handle alerts, confirms and prompts
</td>
</tr>
<tr>
<td width="50%" valign="top">
### ๐ Inspection and Screenshots
- Capture accessibility snapshots and IDs
- Inspect console and network records
- Evaluate JavaScript, including async code
- Capture screenshots and resize viewports
</td>
<td width="50%" valign="top">
### ๐ก๏ธ Browser Sessions
- Run headless or with a browser window
- Attach through local HTTP or WebSocket
- Use temporary or persistent test profiles
- Reject daily-profile paths and aliases
</td>
</tr>
</table>
---
## ๐ Browser Workflow
```text
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ MCP client, such as Codex โ
โฐโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฏ
โ MCP over stdio
โผ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Opera DevTools MCP โ
โ JavaScript / Node.js / Bun โ
โฐโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฏ
โ DevTools protocol
โผ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Opera or Opera GX โ
โ Isolated browser test session โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
```
1. Connect your MCP client and choose Opera or GX.
2. Launch a test session or attach to a local debugging endpoint.
3. Navigate and take a snapshot to obtain element IDs.
4. Interact with the page, inspect results and capture screenshots.
5. Call `close_browser` to close a launched session or disconnect an attached session.
---
## ๐งฐ Technology Stack
| Technology | Purpose |
| --- | --- |
| JavaScript ES modules | Server and CLI implementation |
| Official MCP SDK | Tool discovery and stdio communication |
| Puppeteer Core | Browser control through the DevTools protocol |
| Zod | Tool argument schemas |
| Node.js / Bun | Tested server runtimes |
| Bun test | Automated regression suite |
---
## ๐ Requirements
- Windows: tested on Windows 11 x64.
- Opera or Opera GX. Tested versions: Opera `139.0.6053.38`; Opera GX `138.0.6044.65` (installed) and `139.0.6053.42` (custom executable).
- Node.js `>=22.12.0`, as required by Puppeteer; tested with `24.22.1`. The minimum version has not been tested directly.
- Bun `1.4.4` for the installation and development commands below. Bun is also a tested server runtime.
Opera and GX are detected from common installation paths, with a Windows Registry fallback. Automatic discovery is verified for both browsers at their per-user Windows installation paths. Use `--executable-path` for a custom location. Registry-only and machine-wide installations remain unverified. The package does not download a browser.
---
<a id="opera-support"></a>
## ๐ Opera Family and Support
Status below describes **this MCP project's support**, not whether Opera offers the browser on that platform. Product availability was checked against the [official Opera download catalog](https://www.opera.com/download) on 9 November 2026.
| Opera browser or channel | Environment | Project support |
| --- | --- | --- |
| Opera / Opera One, stable | Windows 11 x64 | โ
Supported in the tested scope |
| Opera GX | Windows 11 x64 | โ
Supported in the tested scope |
| Opera / Opera One | macOS, Linux | ๐งช Unverified; not supported yet |
| Opera GX | macOS, Linux | ๐งช Unverified; not supported yet |
| Opera Air | Windows, macOS | ๐งช Unverified; not supported yet |
| Opera Neon | Windows, macOS | ๐งช Unverified; not supported yet |
| Opera Developer | Windows, macOS, Linux | ๐งช Unverified; not supported yet |
| Opera / Opera One mobile | Android, iOS | โ Not supported; no mobile integration |
| Opera GX Mobile | Android, iOS | โ Not supported; no mobile integration |
| Opera Mini | Android | โ Not supported; no mobile integration |
| Opera for Chromebook | Chrome OS | โ Not supported; not validated |
| Opera Beta, historical channel | Desktop | โ Not supported; discontinued by Opera |
The validated browser versions are Opera **139.0.6053.38** and GX **138.0.6044.65 / 139.0.6053.42**. Windows support does not cover every Windows version or architecture. See [SUPPORT.md](SUPPORT.md) for modes, runtimes and limits.
An unverified environment has not been proven to work or fail. Future validation is tracked in [ROADMAP.md](ROADMAP.md); a candidate executable path alone is not a support claim.
Opera ended Beta support on **14 January 2026** and introduced Early Bird mode within Opera One. Early Bird is not a separate browser and has not been separately validated here. See [Opera's announcement](https://blogs.opera.com/desktop/2026/01/opera-one-r3-new-browser-update/).
---
<a id="installation"></a>
## ๐ Installation
### Build from source
Run these commands in the repository:
```powershell
bun install --frozen-lockfile
node .\bin\opera-devtools-mcp.mjs --help
bun run pack
```
The tarball is written to `.verification/package/opera-devtools-mcp-0.9.0-rc.2.tgz`.
### Install the local package
Copy the tarball to your preferred download folder and use a dedicated installation directory:
```powershell
New-Item -ItemType Directory -Path C:\Tools\OperaMCP -Force
Set-Location C:\Tools\OperaMCP
bun add "D:\Downloads\opera-devtools-mcp-0.9.0-rc.2.tgz" --ignore-scripts
.\node_modules\.bin\opera-devtools-mcp.exe --version
node .\node_modules\opera-devtools-mcp\bin\opera-devtools-mcp.mjs --help
```
The version must be `0.9.0-rc.2`. Installing dependencies requires internet access. There is no public npm installation command for this unpublished candidate.
---
<a id="connect-codex"></a>
## ๐ค Connect Codex
Find the actual runtime executable with `Get-Command node`. Replace the sample Node.js path below if your installation differs.
```powershell
codex mcp add opera-devtools -- "C:\Program Files\nodejs\node.exe" "C:\Tools\OperaMCP\node_modules\opera-devtools-mcp\bin\opera-devtools-mcp.mjs" --browser=opera --headless=true
codex mcp get opera-devtools
```
If an entry already exists, edit that entry in Codex MCP settings. Equivalent configuration in `%USERPROFILE%\.codex\config.toml`:
```toml
[mcp_servers.opera-devtools]
command = 'C:\Program Files\nodejs\node.exe'
args = ['C:\Tools\OperaMCP\node_modules\opera-devtools-mcp\bin\opera-devtools-mcp.mjs', '--browser=opera', '--headless=true']
enabled = true
startup_timeout_sec = 30
tool_timeout_sec = 120
```
For Opera GX, replace `--browser=opera` with `--browser=opera-gx`. Add an argument such as `--executable-path=D:\TestBrowsers\OperaGX\opera.exe` if automatic detection does not find it.
To use Bun as the runtime, set `command` to the actual `bun.exe`. GUI clients may not launch a `bun.cmd` shim directly. Reload the MCP connection or restart Codex after changing its configuration.
Other stdio MCP clients can use the same executable and arguments in their own configuration format. They are not listed as tested clients.
## ๐งญ First Use
Ask Codex to use Opera DevTools to open `https://example.com/`, capture a snapshot and screenshot, then call `close_browser`.
A server started directly in a terminal waits for an MCP client on stdio. That wait is expected. Use `--help` or `--version` for a command that exits immediately. Diagnostic logs go to stderr.
Screenshots are returned as MCP image blocks. The tool does not automatically save PNG/JPEG files on your computer; saving depends on the client. Validation scripts save their own images separately.
---
## ๐ก๏ธ Browser Modes and Profiles
| Argument | Effect |
| --- | --- |
| `--browser=opera` | Select Opera; this is the default |
| `--browser=opera-gx` | Select Opera GX |
| `--executable-path=<path>` | Use a specific Opera executable |
| `--no-headless` | Show the test browser window |
| `--user-data-dir=<path>` | Keep a dedicated test profile between sessions |
| `--browser-url=http://127.0.0.1:9222` | Attach through a local debugging HTTP endpoint |
| `--ws-endpoint=ws://127.0.0.1:9222/devtools/browser/ID` | Attach using the browser's actual WebSocket endpoint |
Launch mode uses a unique temporary profile by default and cleans it when the session closes. An explicitly selected persistent test profile is preserved. Daily Opera profile locations are rejected, including overlapping paths and Windows junction aliases.
Attach mode requires an existing Opera debugging session with a separate test profile. Example:
```powershell
& "$env:LOCALAPPDATA\Programs\Opera\opera.exe" --remote-debugging-port=9222 --user-data-dir=C:\Tools\OperaMCP\attach-profile about:blank
```
Configure the server with `--browser-url=http://127.0.0.1:9222` instead of launch-specific executable/profile options. Closing MCP disconnects from the external browser; the external browser remains open. Debugging endpoints are restricted to localhost.
---
<a id="tools"></a>
## โจ๏ธ MCP Tools
The server exposes 19 tools. Use snapshots to obtain element IDs, then interact with the page through your MCP client.
<details>
<summary><strong>View all 19 tools and their arguments</strong></summary>
| Tool | Purpose | Main arguments |
| --- | --- | --- |
| `list_pages` | List pages and their indices | None |
| `new_page` | Open a page | `url` optional |
| `select_page` | Activate a page | `pageIndex` |
| `close_page` | Close a page | `pageIndex` optional |
| `navigate` | Navigate the active page | `url`, optional `timeoutMs`, `waitUntil` |
| `set_viewport` | Resize the active page | `width`, `height`: integers 1..8192 |
| `take_snapshot` | Capture accessibility content and element IDs | None |
| `click` | Click an element | `id` or `selector` |
| `fill` | Fill an input or textarea | `id` or `selector`, `value` |
| `hover` | Hover over an element | `id` or `selector` |
| `select_option` | Choose a dropdown option | `id` or `selector`, `value` |
| `press_key` | Press a key or shortcut | `key`, optional `id` or `selector` |
| `wait_for` | Wait for text, visibility or a delay | `text`, `textGone`, `selector`, `timeMs` |
| `handle_dialog` | Arm the next dialog response | `action`, optional `promptText` |
| `take_screenshot` | Capture a page or element image | `format`, `fullPage`, `elementId` or `selector` |
| `get_console_messages` | Read recorded console messages | `type`, `clear` |
| `get_network_requests` | Read request records or response details | `requestId`, `resourceType`, `status`, `failed`, `clear` |
| `evaluate_javascript` | Evaluate JavaScript, including async/await | `script`, `timeoutMs` |
| `close_browser` | Close a launched browser or disconnect attach | None |
</details>
Take a new snapshot after document or frame navigation before reusing element IDs. Snapshot IDs support frames and Shadow DOM; CSS selectors target the main document. Clicks check for blocking overlays, and fills verify the resulting value.
Call `handle_dialog` **before** the action that opens an alert, confirm or prompt. Unarmed dialogs are automatically dismissed.
For a phone layout, use `set_viewport` with `{"width":390,"height":844}` before navigation. This changes viewport size; it does not emulate touch, change the user agent, or validate a real phone.
---
## ๐ Security and Privacy
- Launched sessions use isolated temporary profiles by default.
- Dedicated persistent test profiles are preserved when the session closes.
- Daily Opera profile paths, overlapping paths and Windows junction aliases are rejected.
- Attach endpoints are restricted to localhost; disconnecting leaves the external browser open.
Console logs, request URLs and response bodies can contain page data. Authorization, Cookie and Set-Cookie headers are redacted from returned request records; other content can still contain sensitive data. Use local fixtures or test accounts for actions that submit data.
## ๐ง Troubleshooting and Maintenance
| Symptom | Check |
| --- | --- |
| Browser not found | Choose the correct variant or provide `--executable-path` |
| Client cannot start the server | Check the full runtime and installed `.mjs` paths |
| Attach fails | Check the browser process, debugging port, current endpoint and test profile |
| Profile rejected | Choose a dedicated directory outside daily Opera profiles |
| Snapshot ID is stale | Capture a new snapshot |
| No screenshot file appears | Save the returned image through your client |
To update or roll back, close MCP, run `bun add "D:\Downloads\opera-devtools-mcp-VERSION.tgz" --ignore-scripts` in the installation directory, check `--version`, then reload the client.
To uninstall, close the session, run `codex mcp remove opera-devtools`, then `bun remove opera-devtools-mcp` in the installation directory. Manage persistent test profiles separately.
---
<a id="documentation"></a>
## ๐ Documentation
| Document | Contents |
| --- | --- |
| [Support matrix](SUPPORT.md) | Tested browsers, runtimes, modes and known limits |
| [Validation record](VALIDATION.md) | Test evidence, package checks and previous findings |
| [Roadmap](ROADMAP.md) | Current milestone and future Opera environments |
| [Changelog](CHANGELOG.md) | Candidate changes and earlier versions |
| [Historical tool report](MCP-TOOLS-VALIDATION-2026-10-29.md) | Native-client checks from 29 October 2026 |
---
## ๐ Project Structure
```text
opera-devtools-mcp/
โโโ bin/ # CLI entry point
โโโ src/ # Server, browser sessions and tools
โโโ scripts/ # Package, Codex and compatibility checks
โโโ test/ # Regression tests and local fixtures
โโโ .github/workflows/ # Browser-free CI configuration
โโโ package.json
โโโ bun.lock
โโโ SUPPORT.md
โโโ VALIDATION.md
โโโ ROADMAP.md
โโโ CHANGELOG.md
โโโ LICENSE
โโโ README.md
```
## ๐ Development Status
| Area | Recorded status |
| --- | --- |
| Opera and GX on Windows | Launch and local HTTP/WS attach validated |
| Automatic browser discovery | Per-user Windows installation paths verified |
| Full regression suite | 44 tests passed locally |
| Compatibility coverage | 36 scenarios; all 19 basic tool paths per scenario |
| Installed package | Node.js and Bun checks passed |
| Codex integration | 12 tools per browser and read-only public-page checks passed |
| CI preparation | Workflow lint and Windows commands passed locally |
| Hosted GitHub Actions | Pending upload and execution |
| Public npm release | Not published |
| Other Opera environments | Deferred; see the roadmap |
<a id="development-and-validation"></a>
## ๐งช Development and Validation
Run these commands from a source checkout:
<details>
<summary><strong>Package, client and browser checks</strong></summary>
```powershell
bun test --timeout 30000
bun run verify:package
bun run verify:package --skip-browser
bun run verify:codex (Get-Command codex).Source
# GX installed at its standard Windows location
bun run verify:package --browser=opera-gx
bun run verify:codex (Get-Command codex).Source --browser=opera-gx
# GX at a custom location
bun run verify:package --browser=opera-gx --executable-path="D:\TestBrowsers\OperaGX\opera.exe"
bun run verify:codex (Get-Command codex).Source --browser=opera-gx --executable-path="D:\TestBrowsers\OperaGX\opera.exe"
# Repeat each browser/runtime/headless combination
node scripts/verify-compatibility.mjs --browser=opera --headless=false
bun scripts/verify-compatibility.mjs --browser=opera --headless=true
node scripts/verify-compatibility.mjs --browser=opera-gx --headless=true
node scripts/verify-compatibility.mjs --browser=opera-gx --headless=false --executable-path="D:\TestBrowsers\OperaGX\opera.exe"
```
</details>
The full suite covers profile protection, lifecycle recovery, frames, Shadow DOM, input readback, overlay checks, dialogs, CSP, JavaScript timeouts and responsive viewports.
The compatibility script exercises the basic paths of all 19 tools over launch, HTTP attach and WebSocket attach. It saves reports and screenshots to `.verification/<browser>/<runtime>/<headless|headed>/`.
The package checker installs a tarball outside the source tree and tests Node.js and Bun. Results are `.verification/package/result.json` and `result-gx.json`; browser-free checks use a `-no-browser` suffix. Images are `node.png`, `bun.png`, `node-gx.png` and `bun-gx.png`.
The Codex checker uses a temporary in-memory session and makes direct tool calls without a model turn. It checks 12 tools against a local form, then performs read-only navigation to Example Domain and the Nooks site. Reports are `codex-result.json` and `codex-result-gx.json`, with `codex-opera.png` and `codex-opera-gx.png`. Configuration overrides affect only the test process; the user configuration is checked for changes.
The GitHub Actions workflow runs browser-free package checks on Windows and Ubuntu. Hosted runs remain unverified until the repository is uploaded and the workflow runs. Browser automation support is currently validated on Windows only.
`node_modules/`, `.verification/`, local environment files and logs are excluded from Git. Test browser downloads and profiles must remain outside tracked files.
---
## ๐บ๏ธ Development Roadmap
- [x] Implement 19 browser tools for Opera and GX.
- [x] Validate headless/headed sessions and local attach modes.
- [x] Verify installed browser discovery and dedicated test profiles.
- [x] Check clean package installation and Codex tool execution.
- [ ] Run and inspect hosted GitHub Actions after the owner uploads the repository.
- [ ] Review the final support matrix and release notes before a stable release.
- [ ] Investigate other Opera desktop and mobile environments separately.
See [ROADMAP.md](ROADMAP.md) for milestones and the evidence required before adding a supported environment.
---
<a id="contributing"></a>
## ๐ค Contributing
Bug fixes, documentation improvements and focused tests are welcome. The current priority is Opera and Opera GX on Windows; use the [roadmap](ROADMAP.md) when proposing another environment.
1. Fork the repository and create a branch for your change.
2. Keep the change focused. Add or update tests when behavior changes.
3. Run the relevant [development and validation checks](#development-and-validation). Browser checks require an installed Opera or GX; report any checks you could not run.
4. Keep code, comments, CLI/tool text and documentation in English. Update the support matrix only when actual validation supports the claim.
5. Open a pull request describing the problem, the change, test results and relevant browser/runtime versions.
The project uses [Apache-2.0](LICENSE). Its [contribution terms](https://www.apache.org/licenses/LICENSE-2.0.html#contributions) are described in section 5 of the license.
## ๐ Bug Reports
Include your operating system, browser version, Node.js/Bun version, package version or commit, reproduction steps, and the expected and actual result. Add a short log excerpt with private data removed.
Keep browser profiles, cookies, authorization headers, private page content and environment files out of reports.
## ๐ License
Apache-2.0. See [LICENSE](LICENSE).
---
<div align="center">
### Built by TakanashiHaryth
<a href="https://github.com/TakanashiHaryth">
<img src="https://img.shields.io/badge/GitHub-TakanashiHaryth-181717?style=for-the-badge&logo=github&logoColor=white" alt="TakanashiHaryth on GitHub" />
</a>
> โLife is like a GitHub repository. No progress happens until you make a commit.โ
</div>
---
<div align="center">
<img src="https://capsule-render.vercel.app/api?type=waving&color=0:FF1B2D,100:8B5CF6&height=120&section=footer" width="100%" alt="Red and violet wave footer" />
### Thanks for visiting Opera DevTools MCP.
**Browse ยท Inspect ยท Automate ยท Debug**
โญ Star the repository if this tool helps you work with Opera.
</div>
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues