๐ ๐ - Compress web page HTML into compact structured maps that preserve actionable elements, so agents canโฆ
PageMap
ไปฅไธๆๅฝ่ช่ฏฅไปๅบ็ README๏ผ็ๆฎต๏ผ ยท ๅจ GitHub ่ฏปๅฎๆด README โ
PageMap converts raw HTML (100K+ tokens) into structured, AI-readable page maps (2-5K tokens) โ a **97% token reduction**. It works as an MCP server, Python SDK, and CLI, supporting 16 page types and 30+ e-commerce sites. Agents can read, click, type, and navigate any web page.
> *"Give your agent eyes and hands on the web."*
---
Why PageMap?
Playwright MCP dumps 50-540KB accessibility snapshots per page, overflowing context windows after 2-3 navigations. Firecrawl and Jina convert HTML to markdown โ read-only, no interaction.
PageMap gives your agent a **compressed, actionable** view of any web page:
| | PageMap | Playwright MCP | Firecrawl | Jina Reader |
|--|:------:|:---------:|:-----------:|:--------:|
| **Tokens / page** | **2-5K** | 6-50K | 10-50K | 10-50K |
| **Interaction** | **click / type / select / hover** | Raw tree parsing | Read-only | Read-only |
| **Multi-page sessions** | **Unlimited** | Breaks at 2-3 pages | N/A | N/A |
| **Task success (94 tasks)** | **84.7%** | 61.5% | 64.5% | 57.8% |
| **Avg tokens / task** | **2,710** | 13,737 | 13,888 | 11,424 |
| **Cost / 94 tasks** | **$1.06** | $4.09 | $3.98 | $2.26 |
> Benchmarked across 11 e-commerce sites, 94 static tasks, 7 conditions. 8,100+ tests passing.
---
Quick Start
Chromium is auto-installed on first use โ no manual playwright install needed.
Install
MCP Client Config
Add to Claude Code, Cursor, Windsurf, or Claude Desktop:
> **Claude Desktop (macOS)**: Use the absolute path to uvx โ run which uvx (e.g. /opt/homebrew/bin/uvx).
> **VS Code (Copilot)**: Use "servers" instead of "mcpServers" in .vscode/mcp.json.
Docker
---
Features
13 MCP Tools โ Read + Interact
Not just reading โ your agent can click buttons, fill forms, select options, manage tabs, and navigate across pages. 13 tools cover the full browsing workflow:
get_page_map ยท execute_action ยท fill_form ยท scroll_page ยท wait_for ยท take_screenshot ยท get_page_state ยท navigate_back ยท batch_get_page_map ยท open_tab ยท switch_tab ยท list_tabs ยท close_tab
16 Page Types, Auto-Detected
PageMap automatically classifies pages and applies optimized extraction for each type:
product_detail ยท listing ยท search_results ยท article ยท news ยท video ยท login ยท form ยท checkout ยท dashboard ยท help_faq ยท settings ยท error ยท documentation ยท landing ยท blocked
E-Commerce Deep Coverage
Built-in support for **30+ major e-commerce sites** across 4 tiers:
- **Global mega-platforms** โ Amazon, eBay, AliExpress, SHEIN, Walmart, Rakuten
- **Global fashion** โ Zara, H&M, Nike, Uniqlo, ASOS, Zalando, SSENSE, Farfetch, COS
- **Korea** โ Coupang, Naver Shopping, Musinsa, 29CM, W Concept, SSG, 11st
- **Japan/China** โ ZOZO, Tmall, JD.com, Taobao
Structured extraction of prices, options (size/color), ratings, availability โ with automatic cookie consent handling and login barrier detection.
Smart Recovery
PageMap detects problems and tells your agent what to do:
- **Barrier detection** โ Login required? Bot blocked? Out of stock? Age verification? Popup overlay? PageMap adds a barrier field with the diagnosis and suggested next steps
- **Cookie consent auto-dismiss** โ 7 CMP providers auto-detected (Cookiebot, OneTrust, TrustArc, Didomi, Quantcast, Usercentrics, generic fallback). 5-tier dismiss cascade: CMP JS API โ Reject โ Accept โ Dismiss โ Close symbol. GDPR reject-first default policy
- **Popup overlay detection** โ AX tree role="dialog" + HTML regex 2-phase detection. Promotional popups (newsletter, exit-intent) auto-dismissed
- **Bot detection awareness** โ Detects Cloudflare, Turnstile, reCAPTCHA, hCaptcha, and Akamai. Reports the provider and suggests wait/retry strategies
- **Stale ref recovery** โ When DOM changes invalidate refs, PageMap returns clear guidance to re-fetch