floorp-agent-native
Automates Firefox/Floorp tabs via a privileged Gecko Experiment add-on: launches isolated browser sessions, opens tabs, captures compact @eN ARIA snapshots and Readability Markdown, performs clicks/selects, manages containers, and records bounded HAR traffic.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
floorp-agent-native
Direct Gecko automation for Floorp and Firefox Unbranded ESR: no CDP, no remote debugging port, zero npm dependencies.
floorp-agent-native runs inside Gecko through a privileged Experiment add-on and per-tab JSWindowActors. External MCP or CLI agents drive tabs over a local IPC bridge using compact @eN ARIA snapshots, Readability Markdown, native Multi-Account Containers, a bounded HAR 1.2 ring buffer, and compiled routines that recover across UI changes without calling an LLM.

Simulator demo: an ops-portal update inserts a banner and renames "Status filter" -> "Webhook status", "Dry run only" -> "Dry run mode", and "Replay selected" -> "Retry selected webhooks". Replay recovers all three controls deterministically, saves routine v2, and completes without calling a model.
Try the simulator workbench shown above right away (from a source checkout, Node.js 24+):
node bin/cli.mjs serve --port 4399Quickstart: Live Isolated Floorp Session
launch packages the add-on .xpi in pure Node.js, creates an isolated profile directory (explicitly refusing primary ~/.floorp, ~/.mozilla/firefox, and %APPDATA%\Floorp\Profiles paths, including through symlinks), waits for a nonce-bound readiness handshake, and passes FLOORP_AGENT_TOKEN strictly via environment variables rather than user.js or prefs.js.
# Terminal 1 (generate a per-session secret once; add --allow-privileged only for prefs.set/addons.install/cookies.*):
export FLOORP_AGENT_TOKEN="$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'))")"
node bin/cli.mjs launch --browser floorp --headless --session live
# Terminal 2 (export the same FLOORP_AGENT_TOKEN, then discover a container, open a tab, and inspect its snapshot):
node bin/cli.mjs doctor --session live --json
CONTAINER_ID="$(node bin/cli.mjs rpc containers.list '{}' --session live | node -e "const r=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log((r.containers||r)[0].cookieStoreId)")"
TAB_ID="$(node bin/cli.mjs rpc tabs.open "{\"url\":\"https://example.org\",\"cookieStoreId\":\"$CONTAINER_ID\"}" --session live | node -e "const r=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(r.tabId)")"
node bin/cli.mjs rpc page.snapshot "{\"tabId\":$TAB_ID}" --session live
# Pick a specific @eN ref printed by page.snapshot before calling page.act:
# node bin/cli.mjs rpc page.act "{\"tabId\":$TAB_ID,\"ref\":\"@e1\",\"action\":\"click\"}" --session liveOn PowerShell, set the secret with $env:FLOORP_AGENT_TOKEN = node -e "console.log(require('crypto').randomBytes(24).toString('hex'))".
Connect an MCP Client
Pass the token through env instead of CLI args so it stays out of process listings. Omit --connect to run against the offline simulator; on macOS/Linux point --connect at $XDG_RUNTIME_DIR/floorp-agent-native/live.sock (or ~/.local/state/floorp-agent-native/live.sock).
{
"mcpServers": {
"floorp-agent-native": {
"command": "node",
"args": ["/path/to/floorp-agent-native/bin/cli.mjs", "mcp", "--connect", "\\\\.\\pipe\\floorp-agent-native-live"],
"env": {
"FLOORP_AGENT_TOKEN": "your-session-token"
}
}
}
}If installed globally (npm install -g), replace node bin/cli.mjs with the floorp-agent binary.
Manual Profile Staging (Optional)
To register the Native Messaging host for a separate long-lived profile (while loading the temporary add-on via about:debugging):
node bin/cli.mjs install-plan --write-dir ./staged-floorp-hostCopy staged-floorp-host/user.js into a duplicated profile (never your daily profile), register the generated Native Messaging manifest, load addon/manifest.json in about:debugging, and verify with node bin/cli.mjs doctor.
Related MCP server: firefox-bridge
Why Build Inside Gecko?
Playwright and CDP MCP servers already extract accessibility trees and isolate cookie jars per BrowserContext, and they remain the right choice for cross-browser CI. Running inside Gecko instead gives you capabilities that CDP/WebDriver BiDi do not expose:
Persistent Multi-Account Containers (
contextualIdentities): Separate agent cookie jars inside native Floorp/Firefox container tabs in a shared window, so a human handoff keeps the exact container session intact.No DevTools or remote debugging port:
JSWindowActorsnapshots hold element references withWeakRefand clear the actor map on tab close, whilewebRequest.filterResponseData(StreamFilter) writes into a capped HAR 1.2 ring buffer chunked below Firefox's 1 MiB Native Messaging frame limit.Zero-LLM compiled routines: Repeated flows compile into semantic-anchor routines that replay deterministically and self-heal across label/layout drift while blocking silent healing onto destructive actions (
delete,pay,transfer) unlessallowHealDestructive: trueis set.Explicit human handoff: When
humanGate.detectedflags a login or verification challenge,tabs.handoffHumansurfaces that tab to a visible window and pauses at a version-pinned checkpoint.
Architecture & Process Boundaries
flowchart LR
Agents["External Agents (MCP / CLI)"] <--> IPC["Local IPC Broker (Named Pipe / 0600 Unix Socket + Token)"]
Sidebar["In-Browser Agent Sidebar"] <--> BG
IPC <-->|"4-byte LE Framing: Subprocess or Native Messaging"| BG["Privileged Add-on (addon/background.js)"]
BG --> Exp["Gecko Experiment API (Services.prefs, AddonManager, resource actors)"]
BG --> Native["WebExtensions (contextualIdentities, cookies, webRequest)"]
BG <--> Actors["JSWindowActorParent / Child (WeakRef @eN, Readability)"]
Native --> HAR["Bounded HAR 1.2 Ring Buffer (900 KiB max chunks)"]Chrome process (
addon/experiment/api.js,AgentNativeParent.sys.mjs): Registers per-tab actors, connects to the host overSubprocess.sys.mjs(or Native Messaging), and enforces opt-in guards aroundServices.prefsandAddonManager.Content process (
AgentNativeChild.sys.mjs): Produces Readability Markdown and@eNARIA trees, pierces open Shadow DOM, checks pixel occlusion viadocument.elementFromPoint, and redacts<input type="password">values before IPC serialization.Local Node.js host (
host/,routines/,bin/cli.mjs): Runs unprivileged outside Gecko, providing the MCP stdio server, CLI JSON-RPC client, routine compiler/runner, and local inspection workbench.
Compiled Routines & 3-Tier Recovery
End-to-end routine lifecycle (example against an active $TAB_ID)
# 1. Record a workflow on an open tab:
node bin/cli.mjs rpc routines.recordStart "{\"id\":\"ops-check\",\"name\":\"Ops Check\",\"tabId\":$TAB_ID}" --session live
node bin/cli.mjs rpc page.act "{\"tabId\":$TAB_ID,\"ref\":\"@e4\",\"action\":\"select\",\"value\":\"failed\"}" --session live
node bin/cli.mjs rpc routines.recordStop '{"autoSave":true}' --session live
# 2. Replay with dry-run healing enabled (returns runId if paused for Tier-2 repair):
node bin/cli.mjs rpc routines.run "{\"routineId\":\"ops-check\",\"tabId\":$TAB_ID,\"dryRunHeals\":true,\"pauseForHeal\":true}" --session live
# 3. Other independent routine commands (pattern mining, Tier-2 resume, and revision rollback):
node bin/cli.mjs rpc routines.suggest '{"minOccurrences":2}' --session live
node bin/cli.mjs rpc routines.resume '{"runId":"<runId-from-routines.run>","healRef":"@e4","expectedSnapshotVersion":2}' --session live
node bin/cli.mjs rpc routines.rollback '{"routineId":"ops-check","version":1}' --session liveRecovery tiers when a page changes:
Tier 0 (Exact semantic match): Multi-signal anchor (
role, label tokens,name,hrefPath, heading + neighbor context) resolves uniquely on the bound origin.Tier 1 (Deterministic heuristic heal): Scores same-role candidates (never crossing password boundaries or mismatched input types) with minimum confidence
0.68, runner-up margin>= 0.12, and a destructive-action guard. In the simulator GIF above, the three renamed controls matched at Tier 1 with confidences0.75(Status filter->Webhook status),0.83(Dry run only->Dry run mode), and0.80(Replay selected->Retry selected webhooks).Tier 2 (Single-step agent repair): Calls an in-process
healerhook or pauses (status: "awaiting_heal") with the compact@eNsnapshot so an external agent can resume viaroutines.resume.
Anchor patches buffer in memory and commit as a new version (max 10 revisions) only after the whole routine and its post-conditions pass. Routine persistence writes nothing to disk unless --routines-file <path> is passed (on Unix, stored with 0o600 atomic temp-file writes and lockfile conflict checks).
Verification & Browser Compatibility
From a source checkout on Node.js 24 (GitHub Actions CI runs npm test, npm run benchmark, and a packed CLI smoke check outside the checkout on Ubuntu and Windows; live browser E2E runs locally where Floorp is installed):
npm test # 30 offline unit + integration tests
npm run benchmark # 2,000-cycle permission-scoped simulator soak
node --test tests/e2e/real-floorp.test.mjs # Local live Floorp E2E (requires installed binary + HTTPS)Live-Verified Build: Floorp 12.21.3 (Gecko 161.0)
Verified locally via tests/e2e/real-floorp.test.mjs (isolated headless profile, zero DevTools/CDP, 18.0–20.9 s wall time):
Public HTTPS & streaming HAR: Loaded Wikipedia (across a live 301 redirect in
firefox-container-1) and Hacker News; extracted compact Markdown (11,999chars vs.131,072-char capped raw HTML),150Wikipedia /120HN@eNrefs, incrementalpage.diff, andStreamFilterresponse bodies under the byte cap.Shadow DOM, occlusion & focus defenses: Verified
<label for>, password redaction,document.elementFromPointmodal occlusion (ELEMENT_OBSCURED), open Shadow DOM piercing, asyncMutationObserverwaits,history.pushStatewakeups, and synchronousonfocustype-flip /pushStatehijack defenses.Containers, routines & privileged guards: Verified
HttpOnlycookie isolation across containers, live record -> DOM drift -> Tier-1 heal -> auto-patch -> Tier-0 -> Tier-2 pause/resume -> human-gate resume,Services.prefsprotection ofextensions.agentNative.*, andAddonManagerout-of-root.xpirefusal.25-cycle live soak:
nsIMemoryReporterManager.residentFastsettled around ~532–550 MiB across 25 live tab lifecycles; the tracked@eNref count returned to0after each lifecycle and the HAR ring stayed within55–92 KiBafter120–134evictions.
Observed Simulator Teardown & Benchmark
Across 3 permission-scoped npm run benchmark runs (Node.js v24.19.0, Windows x64, 2,000 synthetic cycles, heuristic BPE estimator, 512 KiB / 200-entry HAR cap):
Throughput: ~4,530–4,610 simulated cycles/s
Estimated token savings vs. raw fixture HTML: ~95% Readability MD, ~92%
@eNARIA tree, ~76% turn diff vs.@eNTeardown & heap:
0tracked refs after teardown, HAR ring capped at128 / 512 KiB, ~0 MiB net heap drift (-0.01 MiBmeasured) across a 6,000-cycle GC soak
Browser Support Matrix
Browser | Status | Notes |
Floorp | Live-verified |
|
Other Floorp 12.x builds | Target | Same Experiment APIs; verify against your installed build with |
Firefox Unbranded ESR / Dev / Nightly | Target (via | Requires |
Zen Browser / LibreWolf (release) | Unsupported on release builds | Release builds enforce signing; requires an unsigned/unbranded build and fork-specific Native Messaging paths |
Security Boundaries & Trade-offs
Least-privilege default:
prefs.set/restore,addons.install/setEnabled/uninstall, andcookies.*stay disabled unless--allow-privilegedis explicitly passed.addons.installalso denies all paths untilextensions.agentNative.allowedAddonDirsis set (blocking UNC/SMB, traversal, and symlinks).Local transport controls: The workbench enforces loopback
Host+Originchecks,frame-ancestors 'none',nosniff, and a per-bootX-Agent-Tokenon/api/*. Unix IPC sockets require0o700parent directories and0o600socket permissions; Windows Named Pipes do not use POSIX modes, so always setFLOORP_AGENT_TOKENwhen binding a Named Pipe.HAR scope:
webRequest.filterResponseDatacaptures textual response bodies up tomaxBodyBytesPerEntryand disconnects on cap (skipping binary/3xx responses). Socket-level DNS/TLS timings and service-worker internals are outside its scope.
Protocol Reference (51 Methods Across 10 Namespaces)
Namespace | Methods | Default Policy |
|
| Enabled |
|
| Enabled |
|
| Enabled (passwords redacted) |
|
| Enabled |
|
| Enabled |
|
| Enabled |
|
| Enabled |
|
| Split |
|
| Split |
|
|
|
See docs/ARCHITECTURE.md for actor registration, wire framing, and security invariants.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceDrive Firefox-based browsers (Floorp, LibreWolf, Zen, Waterfox, Mullvad, Firefox) from any MCP client — read pages, screenshot, click, fill forms and manage tabs in your real session, over Marionette/WebDriver. OS input & JS eval locked by default.4183 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-capable CLIs to operate real, already-logged-in Firefox tabs via a WebExtension and native messaging, without simulated input. Supports navigation, clicking, typing, reading, screenshots, and console/network capture with policy gating and frame awareness.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables an MCP client to drive a real, already-logged-in Firefox session through a WebExtension rather than a WebDriver connection, so tabs, cookies and logins work as-is without relaunching the browser under remote-control flags. Exposes tools for tab listing and selection, navigation, accessibility-style snapshots, clicking, filling, typing, key presses, file uploads, screenshots and waiting, with per-origin permission grants and opt-in script evaluation.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to attach to a real Firefox session for DOM/CSS, console, network, JavaScript source, and breakpoint inspection, and to drive Windows desktop applications through UI Automation, screenshots, and native input. Runs entirely locally over MCP with no Firefox add-on or npm runtime dependencies.MIT