Skip to main content

Get started with Memora Browser.

Start the server, connect your tools and give your agent its first page. Each section stands on its own, so jump to the one you need.

Install

Memora Browser needs Node.js 20 or later. The npm package is being prepared for release; once it is published you can run it directly with npx:

$ npx memora-browser --port 9222

Until then, run it from the source folder:

From source
cd memora-browser
npm install
npm start -- --port 9222

Start the server

With no command, Memora Browser starts an automation server. By default it serves the Chrome DevTools Protocol on ws://127.0.0.1:9222 with stealth mode on. Use --protocol webdriver to serve Selenium instead.

OptionWhat it doesDefault
-p, --port <number>Port for CDP, WebDriver and HTTP9222
-h, --host <string>Address to listen on127.0.0.1
--protocol <cdp|webdriver>cdp for Playwright and Puppeteer, webdriver for Seleniumcdp
--max-sessions <number>Maximum concurrent WebDriver sessions16
--no-stealthTurn off the Chrome 130 stealth profileon
--eval <url>Load one URL, print its snapshot and exit—
--mcpRun as an MCP server over stdio—

Fetch a page

fetch loads one URL, runs its scripts and prints it in the format you choose. See Fetch & dump for examples.

$ npx memora-browser fetch https://example.com --dump action_map
OptionWhat it doesDefault
-d, --dump <format>markdown, html, structured_data, semantic_tree or action_mapmarkdown
--dump-selector <selector>Only output elements matching a CSS selector—
--dump-max-bytes <bytes>Cap the output size—
--wait-ms <ms>Wait after the page loads—

MCP server

Add this to your client’s MCP config (for example mcp.json in Cursor or claude_desktop_config.json). The full tool list is on the MCP server page.

mcp.json
{
  "mcpServers": {
    "memora-browser": {
      "command": "npx",
      "args": ["-y", "memora-browser", "--mcp"]
    }
  }
}

Connect a client

Start the server, then connect instead of launching a browser. More detail on the CDP & WebDriver page.

Playwright
import { chromium } from 'playwright';

const browser = await chromium.connectOverCDP('http://127.0.0.1:9222');
const context = browser.contexts()[0];
const page = context.pages()[0] || await context.newPage();
await page.goto('https://example.com');
Puppeteer
import puppeteer from 'puppeteer-core';

const browser = await puppeteer.connect({ browserURL: 'http://127.0.0.1:9222' });
const page = await browser.newPage();
await page.goto('https://example.com');
Selenium (Python) — start with --protocol webdriver
from selenium import webdriver

driver = webdriver.Remote("http://127.0.0.1:9222", options=webdriver.ChromeOptions())
driver.get("https://example.com")

Use it as a library

Import the engine directly to load pages, read the action map and act on it without running a server.

agent.ts
import { MemoraBrowser } from 'memora-browser';

const browser = new MemoraBrowser({ stealth: true });
const page = browser.newPage();
await page.goto('https://app.example.com/login');

const snapshot = page.getSemanticSnapshot();
// snapshot.actionMapText, snapshot.markdown, snapshot.tokenEstimate

page.type('@1', 'agent@example.com');
const branch = page.fork();   // copy of the page and its session
page.click('@3');

Memora CDP and HTTP API

Alongside the standard CDP domains (Page, Runtime, DOM, Network, Target, Input), the server adds a Memora domain and two HTTP endpoints:

  • Memora.getSemanticSnapshot — action map, actions, Markdown, token estimate and interactive count
  • Memora.act — run an action by ID, for example { actionId: "@1", type: "type", text: "…" }
  • Memora.getMarkdown — the current page as Markdown
  • GET /memora/snapshot?id=<pageId> — the snapshot as JSON over HTTP
  • GET /memora/goto?url=<url> — navigate and return the snapshot in one request

Network options

Both the server and fetch accept these options.

OptionWhat it does
--http-proxy <url>Proxy for all requests: http://, https:// or socks5://, with optional user:pass@
--proxy-bearer-token <token>Send Proxy-Authorization: Bearer <token>
--proxy-bypass <hosts>Comma-separated hosts that skip the proxy
--use-env-proxyUse HTTP_PROXY, HTTPS_PROXY, ALL_PROXY and NO_PROXY
--http-header <header>Extra "Name: Value" header for every request (repeatable)
--user-agent <ua>Override the User-Agent header
--http-timeout <ms>Navigation request timeout
--insecure-disable-tls-host-verificationSkip TLS certificate checks (self-signed certificates)
--obey-robotsCheck every request against the site’s robots.txt (RFC 9309) and block disallowed ones
--robots-agent <token>Name matched against robots.txt User-agent lines (default MemoraBrowser)

See what it can do.

Each feature has its own page with examples and answers to common questions.