moli-cdp-server

moli-cdp-server is a skill for Claude Code, Codex from lexmount/moli. It costs 74 tokens per session (709 once invoked), scanned A, original, Apache-2.0.

A skill for starting Moli, a local browser-control server, and connecting browser tools such as Playwright or Puppeteer to it.

In plain words
What is it for?
It helps start and diagnose the connection, inspect browser targets, use real page layout, take screenshots or PDFs, and support coordinate-based input.
Why use it?
It helps agents attach to a running browser-control endpoint when they need browser actions or visual information.

Skill for Claude CodeCodex

About the project

Moli is a Rust-based headless browser that gives AI agents a complete browser runtime for retrieving pages, extracting content, searching the web, and automating browser tasks. It is for agents and developers who need JavaScript, DOM, CSS, networking, storage, rendering, screenshots, or browser automation through CLI, CDP, or WebDriver protocols. The catalogue contains skills and instructions for using Moli.

lexmount/moli · 1,707 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lexmount/moli/moli-cdp-server
Any agent
npx skills add lexmount/moli --skill moli-cdp-server
Clone the repo
git clone --depth 1 https://github.com/lexmount/moli

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moli-cdp-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/lexmount/moli/moli-cdp-server.svg)](https://agentmods.dev/skills/lexmount/moli/moli-cdp-server)
Your own site
<a href="https://agentmods.dev/skills/lexmount/moli/moli-cdp-server"><img src="https://agentmods.dev/badge/skills/lexmount/moli/moli-cdp-server.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 709 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.00709
Opus 5 $0.00037 $0.00354
Sonnet 5 $0.00015 $0.00142
Haiku 4.5 $0.00007 $0.00071

Measured 5d ago against content hash 062405167e89, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

moli-cdp-server scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl --proto '=https' --tlsv1.2 -fsSL \
skills/moli-cdp-server/SKILL.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run Moli's CDP Server

Run one Moli CDP server and connect the requested CDP client to its endpoint. Preserve the client's existing API where Moli supports it.

Workflow

  1. Resolve moli from PATH. If it is unavailable, install the latest prebuilt release for the current platform:

    Linux or macOS:

    curl --proto '=https' --tlsv1.2 -fsSL \
      https://github.com/lexmount/moli/releases/latest/download/moli-installer.sh | sh
    

    On Windows, use PowerShell:

    powershell -ExecutionPolicy ByPass -c "irm https://github.com/lexmount/moli/releases/latest/download/moli-installer.ps1 | iex"
    

    Resolve the installed binary again and run moli --version. The default location is ~/.local/bin/moli on Linux/macOS and %LOCALAPPDATA%\Moli\bin\moli.exe on Windows when it is not yet on PATH.

  2. Start moli serve on the default loopback endpoint http://127.0.0.1:9222.

  3. Add --layout when the workflow needs real element geometry, coordinate input, screenshots, PDFs, or screencasts. Add --resource only when all optional visual/media resources are required.

  4. Probe /json/version before connecting the client.

  5. Connect with the client's remote/attach API; do not launch a second bundled browser.

  6. Close CDP clients cleanly, then stop the Moli server if this workflow owns it.

Playwright over CDP

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");
console.log(await page.locator("body").innerText());

await browser.close();

Integration rules

  • Bind to 127.0.0.1 by default. Expose another host only when the user explicitly needs remote access and has addressed network access controls.
  • Treat Moli as a remote endpoint. Avoid Chrome launch flags and assumptions that require a local Chromium executable.
  • Expect selected CDP coverage, not complete Chrome protocol parity. Preserve explicit unsupported errors.
  • Use a unique port for parallel isolated runs.
  • Persist state intentionally with --profile-dir; otherwise keep runs disposable.
  • Pass proxy, cookie, resource, user-agent, and private-network policy to the Moli server, not to a nonexistent child browser process.

Read the full file on GitHub · 74 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 74 lines · 74 tokens per session scan A 062405167e89

Subscribe to this mod's changes

moli-cdp-server is a skill published in the GitHub repository lexmount/moli (1,707 stars, last pushed today), licensed Apache-2.0. It adds 74 tokens to every session and 709 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

webcmd-browser

Use when a live browser task requires Playwright interaction, authenticated handoff, visible UI verification, or ad-hoc page inspection.

agentrhq/webcmd · 30 tokens

Agent Browser Automation

Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.

PramodDutta/qaskills · 37 tokens

release-process

End-to-end release runbook for playwright-rust — version bump, supply-chain refresh, per-crate CHANGELOGs, tag-prefix routing for the three workspace crates, the safer push-then-tag workflow that waits for CI before publishing, and the post-release follow-ups.

padamson/playwright-rust · 58 tokens

playwright-rs-usage

Procedural reference for using playwright-rs in Rust browser-automation code — object model (Browser/Context/Page/Locator), the locator!() macro, builder pattern for options, auto-wait semantics, adding the crate and installing its browsers, and how to capture / inspect traces for failure diagnosis. Use when writing…

padamson/playwright-rust · 98 tokens

doctest-conventions

Conventions for authoring rustdoc doctests in playwright-rust — the norun annotation, module-level placement, hidden scaffolding lines, and how doctests are exercised in CI vs pre-commit.

padamson/playwright-rust · 49 tokens

opensteer

Direct browser control via CDP. Use when the user wants to automate, inspect, scrape, test, or interact with web pages.

steerlabs/opensteer · 31 tokens