Content
# Treegress Browser Core
[](https://www.npmjs.com/package/@treegress.com/treegress-browser-core)
[](https://www.npmjs.com/package/@treegress.com/treegress-browser-mcp)
Treegress Browser Core is a Treegress-maintained fork of [Playwright](https://playwright.dev) focused on richer DOM snapshots and locator plans for AI-driven browser automation.
This repository is the source for the published package [`@treegress.com/treegress-browser-core`](https://www.npmjs.com/package/@treegress.com/treegress-browser-core). In production it is typically used together with [`@treegress.com/treegress-browser-mcp`](https://www.npmjs.com/package/@treegress.com/treegress-browser-mcp), which exposes the MCP server layer on top of this core.
## Why Treegress Extends Playwright MCP
AI agents need access to the actual page structure they are testing.
Standard Playwright MCP flows expose an ARIA snapshot derived from the accessibility tree. In real test flows, not just simple demos, this can leave part of the UI outside the model's view when interactable elements are poorly represented in the accessibility layer. Even when an element is returned by an ARIA snapshot, the information about that element can be too abstract for an agent to properly understand how to interact with the website and implement the scenario.
Treegress extends this flow by:
- serializing the full DOM tree
- extracting the full set of interactable elements
- enriching the information about the elements
- assigning a `refId` to each element so downstream tools such as `browser_click`, `browser_fill_form`, and similar operations can target it reliably.
This gives the agent a structurally complete representation of the page instead of a partial accessibility-based abstraction. In practice, that improves element coverage and enables broader, more reliable test scenarios.
If you want to see what Treegress is building in this area, visit [treegress.com](https://treegress.com).
## What This Fork Adds
- Custom DOM snapshot backend for `browser_snapshot`
- Richer snapshot text formatting for LLM agents
- Ref-to-locator plans used by MCP browser tools
- Treegress-specific browser automation flow built on top of Playwright internals
## Installation
### MCP installation
Most users should install the MCP package, not the core package directly.
You can find installation instructions for Treegress MCP by this link: [github.com/MobiDev-Org/treegress-browser-mcp](https://github.com/MobiDev-Org/treegress-browser-mcp)
### Direct core install
Only use this if you explicitly need the browser core package outside the MCP server:
```bash
npm i @treegress.com/treegress-browser-core
```
The CLI binary remains:
```bash
npx --yes --package=@treegress.com/treegress-browser-core@latest treegress-browser-core --help
```
## How It Fits Together
The Treegress browser stack is split into two published packages:
- [`@treegress.com/treegress-browser-core`](https://www.npmjs.com/package/@treegress.com/treegress-browser-core)
- [`@treegress.com/treegress-browser-mcp`](https://www.npmjs.com/package/@treegress.com/treegress-browser-mcp)
Source repositories:
- Core runtime repository: [github.com/MobiDev-Org/treegress-browser-core](https://github.com/MobiDev-Org/treegress-browser-core)
- MCP adapter repository: [github.com/MobiDev-Org/treegress-browser-mcp](https://github.com/MobiDev-Org/treegress-browser-mcp)
Role split:
- `treegress-browser-core` (this repository) is the source of truth for custom-dom snapshot/runtime behavior.
- `treegress-browser-mcp` consumes the core runtime and exposes MCP server/tool integration.
This repository keeps the upstream Playwright monorepo structure. The publishable core package lives in:
- [`packages/playwright-core`](packages/playwright-core)
## Maintainers
Before `npm pack` or `npm publish`, run `npm run build` from the repository root so generated runtime artifacts are current. Full release and verification steps live in [`DEVELOPING.md`](DEVELOPING.md).
## Based On Playwright
This is a customized fork built on top of Microsoft Playwright.
- Upstream repository: [github.com/microsoft/playwright](https://github.com/microsoft/playwright)
- Upstream docs: [playwright.dev](https://playwright.dev)
- License: Apache-2.0
Treegress-specific changes should stay clearly separated from upstream behavior where possible. The goal of this fork is to extend Playwright for Treegress browser automation, not to obscure its origin.
## Copyright And Licensing
Copyright 2026 MobiDev Corporation. All rights reserved.
This project is licensed under the Apache License 2.0, except for `packages/injected/src/customDomSerializer.ts`, which is subject to a custom non-commercial license. See the file header for details.
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
firecrawl
Firecrawl MCP Server enables web scraping, crawling, and content extraction.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers