Skip to main content
Glama

pagesnap-mcp

기존 PageSnap 세션 팩을 감싸는 MCP 서버로, LLM이 세션을 나열하고 로케이터를 읽어 Playwright, Selenium 또는 Cypress로 매핑할 수 있게 합니다.

이 도구는 캡처 도구가 아닙니다. 브라우저를 열지 않고, URL을 자동 스캔하거나 브라우저를 내려받지 않습니다. Playwright는 의존성이 아닙니다.

캡처는 pagesnap-playwright 또는 pagesnap-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: Browser MCP Server

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"
      }
    }
  }
}

이 서버는 이미 디스크에 존재하는 팩만 읽습니다. 캡처 도구가 아닙니다.

도구

토큰 효율적 처리: list_sessions와 read_session은 먼저 키와 요약만 반환합니다. YAML 파일 본문은 덤프하지 않습니다.

  • list_sessions: 인자 없음. PAGESNAP_SESSIONS_DIR에서 세션을 나열합니다.

  • read_session: { session }. flow.md, yaml 파일 이름, 파싱된 컨트롤(최대 200개)을 반환합니다.

  • map_locator: { by, value, name?, framework? }. 스니펫, 점수, 안정성을 반환합니다. framework: playwright|selenium|cypress(기본값 playwright).

  • get_prompt: { session, framework? }. PROMPT.md가 있으면 그 내용을, 없으면 합성된 프롬프트를 반환합니다.

로케이터

YAML by 값: testid, role, label, id, name, placeholder, linkText, css, xpath. 점수는 PageSnap과 동일합니다: testid 98, role 95, label/id 90, name 88, placeholder 85, linkText 75, css 60, xpath 40. Playwright에서 testid는 항상 page.getByTestId(...)로 매핑됩니다. Sauce Demo는 Playwright testIdAttribute를 통해 data-test를 사용하지만, 여전히 getByTestId를 생성해야 합니다. role이 없는 일반 data-testid 노드도 getByTestId로 매핑하며, getByRole('generic')으로 매핑하지 않습니다.

테스트

npx vitest run

라이선스

MIT

Available Tools

4 tools
get_promptA

Return PROMPT.md for a session if present; otherwise synthesize a test-generation prompt from flow.md and ranked locators.

Inputs: session (required), framework.

list_sessionsA

List PageSnap session packs under PAGESNAP_SESSIONS_DIR (default ./sessions). Returns a summary only: name, path, mtime, goal, stepCount. Does not capture or open a browser.

Inputs: no named parameters.

map_locatorA

Map a PageSnap YAML locator {by, value} to a Playwright, Selenium, or Cypress snippet with score and stability. Sauce Demo data-test ids still emit getByTestId (configure testIdAttribute in Playwright). Never maps testid to getByRole('generic').

Inputs: by (required), value (required), name, framework.

read_sessionA

Read one PageSnap session: flow.md, YAML file names, and parsed controls (cap 200). Token-efficient: keys/summary first; does not dump YAML file bodies.

Inputs: session (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool maps to a clearly distinct concern: listing sessions, reading session details, translating locators, and generating prompts. There is no overlap that would cause an agent to select the wrong tool.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern: list_sessions, read_session, map_locator, get_prompt. This makes the tool set predictable and easy to navigate.

    Tool Count5/5

    Four tools is a tight, focused scope. Each tool earns its place and supports a distinct step in the PageSnap session inspection workflow without redundancy.

    Completeness4/5

    The read-and-analyze workflow is well covered: list, read, map, and prompt. A minor gap is the lack of session creation or mutation tools, but the descriptions frame this as a read-only inspection tool, so the gaps are acceptable.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • 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.
      8 npm
      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
      6 npm
      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.
      13
      35 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to interact with web pages through structured accessibility snapshots using Playwright, providing fast and lightweight browser automation without needing vision models.
      Apache 2.0