Skip to main content
Glama

pagesnap-mcp

一个 MCP 服务器,用来包装现有的 PageSnap 会话包,让 LLM 能够列出会话、读取定位器,并把它们映射到 Playwright、Selenium 或 Cypress。

这不是一个采集工具。它不会打开浏览器、自动扫描 URL 或抓取浏览器。Playwright 不是依赖项。

采集发生在 pagesnap-playwrightpagesnap-selenium 中。请把这个服务器指向一个会话包的父文件夹(flow\.md 加上 yaml,以及可选的 PROMPT.md)。

如何运行

npm install
npm run build
node dist/index.js

进程通过 stdio 与 MCP 通信,并等待 stdin。它在终端里看起来像卡住了;这是正常现象。用 Ctrl+C 停止。

可选环境变量:PAGESNAP\_SESSIONS\_DIR(默认 ./sessions)是 PageSnap 会话文件夹的父目录。

Related MCP server: Playwright MCP

Cursor MCP 配置

示例 .cursor/mcp.json。把 PAGESNAP\_SESSIONS\_DIR 指向一个 PageSnap 会话父目录,例如 playwright-ts-framework/snapshots

{
  "mcpServers": {
    "pagesnap": {
      "command": "node",
      "args": [
        "/absolute/path/to/pagesnap-mcp/dist/index.js"
      ],
      "env": {
        "PAGESNAP_SESSIONS_DIR": "/absolute/path/to/playwright-ts-framework/snapshots"
      }
    }
  }
}

这个服务器只读取磁盘上已有的包。它不是一个采集工具。

工具

省 token:list\_sessionsread\_session 先返回键和摘要。不会一次性输出 YAML 文件正文。

  • list\_sessions:无参数。从 PAGESNAP\_SESSIONS\_DIR 获取会话。

  • read\_session{ session }flow\.mdyaml 文件名、解析后的控件(上限 200)。

  • map\_locator{ by, value, name?, framework? }。片段、得分、稳定性。frameworkplaywright|selenium|cypress(默认 playwright)。

  • get\_prompt{ session, framework? }。如果存在 PROMPT.md 就返回它;否则返回一个合成的 prompt。

定位

YAML by 值:testidrolelabelidnameplaceholderlinkTextcssxpath。 得分与 PageSnap 一致:testid 98、role 95、label/id 90、name 88、placeholder 85、linkText 75、css 60、xpath 40。 Playwright testid 总是映射到 page.getByTestId(...)。Sauce Demo 使用data-testid,同时使用 Playwright 的 testIdAttribute;仍然输出 getByTestId。通用且没有 role 的 data-testid 节点仍然映射到 getByTestId,绝不会映射到 getByRole('generic')

测试

npx vitest run

许可证

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables browser automation and web interaction through structured accessibility snapshots using Playwright. Provides fast, deterministic web page interaction without requiring screenshots or vision models.
    5,618,931
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides browser automation capabilities for LLMs using Playwright, leveraging structured accessibility snapshots to interact with web pages without needing vision models. It enables tasks like web navigation, data extraction, and automated testing through a lightweight and deterministic toolset.
    16
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to understand web page structure and content through structured data extraction and element discovery using Playwright, eliminating the need for screenshots.
    4
    7
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Drives a real Chromium browser to extract a page's DOM into compact Semantic JSON with Playwright-native locators, enabling AI agents to generate consistent, accurate Playwright tests.
    4
    27
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Screenshots, PDFs and Markdown from any URL or HTML for AI agents, via the SnapForge API

  • E2LLM gives your AI eyes and hands in a real browser: structured perception (SiFR) plus action.

  • AI-powered browser automation — navigate, click, fill forms, and extract data from any website.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fredoz0999/pagesnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server