Skip to main content
Glama
playwright-spa-mcp

playwright-spa-mcp

🎭 Playwright SPA MCP

The Playwright MCP server built for modern web apps β€” persistent sessions, React/Vue/Angular support, 143+ devices and smart DOM waiting.

License: MIT Node MCP SDK

Installation Β· Why Β· Tools Β· Examples Β· Limitations

Overview

An MCP server that drives a real Chromium browser, purpose-built for Single Page Applications. Your assistant can log in, click, type and screenshot β€” and the SPA's state survives across calls:

You: Log into app.example.com, open the dashboard and screenshot it.

Assistant: (calls spa_session_start, then spa_chain [type-realistic β†’ click β†’ wait-for-idle], then spa_screenshot) Logged in and captured the dashboard β€” React state preserved across the session.

Related MCP server: MCP Playwright Server

Why this server?

Feature

playwright-spa-mcp

Other Playwright MCPs

Persistent sessions

βœ…

❌

React/Vue/Angular detection

βœ…

❌

Smart DOM idle waiting

βœ…

❌

Realistic typing

βœ…

❌

Device emulation

143+

Limited

Action chains

βœ…

❌

HTTP with browser cookies

βœ…

❌

Installation

# One command β€” no clone needed
claude mcp add playwright-spa -- npx -y github:manganate006/playwright-spa-mcp

# Install the Chromium browser Playwright drives
npx playwright install chromium

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "playwright-spa": {
      "command": "npx",
      "args": ["-y", "github:manganate006/playwright-spa-mcp"]
    }
  }
}
git clone https://github.com/manganate006/playwright-spa-mcp.git
cd playwright-spa-mcp
npm install
npx playwright install chromium
claude mcp add playwright-spa -- node $(pwd)/src/index.js

Tools

22 tools, spa_ prefix. Chain-action list, 143+ device shortcuts and CLI usage: docs/ADVANCED.md.

Group

Tools

πŸ“Έ Screenshot & navigation

spa_screenshot, spa_navigate, spa_go_back, spa_go_forward, spa_wait_idle

πŸ“ Interactions

spa_click, spa_fill, spa_type_realistic, spa_upload, spa_drag

⛓️ Chains

spa_chain (run many actions in one call)

πŸ” Sessions

spa_session_start, spa_session_end, spa_session_list

πŸ”Ž Inspection

spa_get_text, spa_assert, spa_evaluate, spa_http_request

πŸ–ΌοΈ iframes

spa_iframe_click, spa_iframe_fill

ℹ️ Discovery

spa_list_devices, spa_list_actions

Examples

Log into a React app and keep the session β€” realistic typing fires React's onChange:

spa_session_start({ session: "myapp" })

spa_chain({
  session: "myapp",
  url: "https://app.example.com/login",
  spaMode: "react",
  chain: [
    { action: "type-realistic", selector: "#email", value: "user@example.com" },
    { action: "type-realistic", selector: "#password", value: "secret123" },
    { action: "click", selector: "button[type=submit]" },
    { action: "wait-for-idle" },
    { action: "screenshot" }
  ]
})

// Same session β€” React state is preserved
spa_click({ session: "myapp", selector: ".dashboard-item" })

Mobile device emulation:

spa_screenshot({ url: "https://example.com", device: "iPhone 15 Pro", fullPage: true })

Authenticated API call reusing the session cookies:

spa_http_request({ session: "myapp", url: "https://api.example.com/user/profile", method: "GET" })

Limitations

  • Chromium only β€” Firefox/WebKit are not wired up; requires npx playwright install chromium

  • Local browser β€” spawns a real browser process; not suited to sandboxes without one

  • SPA heuristics β€” React/Vue/Angular readiness is detected heuristically (spaMode: "auto"); heavy custom frameworks may need explicit wait-for / wait-for-idle

  • Sessions are in-memory β€” they live with the server process and don't persist across restarts

SPA framework support

Detects and waits correctly for React (finishes rendering, proper onChange), Vue (v-model bindings) and Angular (Zone.js stability). Use spaMode: "auto" to detect automatically. Details in docs/ADVANCED.md.

Built with this MCP

Project

Description

atp.mangi.fr

🎾 ATP tennis stats since 1968

piscinade.com

🏊 Pool-party finder in France

License

MIT Β© manganate006

Available Tools

22 tools
spa_assertC

Run assertions on page elements.

Inputs: type (required), selector (required), url, value, +2 more.

spa_chainA

Execute a chain of actions in sequence. Supports all browser actions plus chain-specific commands like wait, wait-for-idle, press, etc.

Inputs: chain (required), url, device, session, +2 more.

spa_clickB

Click an element with SPA-aware waiting. Waits for DOM to stabilize after click.

Inputs: selector (required), url, session, spaMode, +2 more.

spa_dragC

Drag an element and drop it on another element.

Inputs: target (required), selector (required), url, session, +1 more.

spa_evaluateB

Execute JavaScript in the page context.

Inputs: script (required), url, session.

spa_fillA

Fill an input field with React/Vue/Angular compatibility. Properly triggers framework change events.

Inputs: value (required), selector (required), url, session, +2 more.

spa_get_textC

Get text content of an element.

Inputs: selector (required), url, session.

spa_go_backB

Navigate back in browser history.

Inputs: session, screenshot.

spa_go_forwardA

Navigate forward in browser history.

Inputs: session, screenshot.

spa_http_requestA

Make an HTTP request using the browser context (includes cookies and auth).

Inputs: url (required), body, method, headers, +2 more.

spa_iframe_clickB

Click an element inside an iframe.

Inputs: frame (required), selector (required), url, session, +1 more.

spa_iframe_fillB

Fill an input field inside an iframe.

Inputs: frame (required), value (required), selector (required), url, +2 more.

spa_list_actionsA

List all available actions for the chain command.

Inputs: no named parameters.

spa_list_devicesB

List available device emulation presets.

Inputs: search.

spa_navigateC

Navigate to a URL with device emulation support.

Inputs: url (required), device, session, userAgent, +2 more.

spa_screenshotB

Take a screenshot of a web page with SPA framework support. Waits for DOM to stabilize before capturing.

Inputs: url, device, session, spaMode, +3 more.

spa_session_endB

End a browser session and close the browser.

Inputs: session.

spa_session_listA

List all active browser sessions.

Inputs: no named parameters.

spa_session_startB

Start a new persistent browser session. Use sessions to maintain state between tool calls.

Inputs: device, session, viewport, userAgent.

spa_type_realisticB

Type text character by character with realistic delays. Best for React controlled inputs and forms with live validation.

Inputs: value (required), selector (required), url, delay, +4 more.

spa_uploadC

Upload a file to a file input element.

Inputs: selector (required), url, file, files, +2 more.

spa_wait_idleA

Wait for DOM to become idle (no mutations). Useful for SPAs that update the DOM frequently.

Inputs: maxWait, session, idleTime.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 22 tools

    Disambiguation4/5

    Most tools map cleanly to distinct actions, such as navigate, click, fill, screenshot, and session management. The main ambiguity is between spa_fill and spa_type_realistic for input handling, and spa_chain subsumes many individual actions, but the descriptions generally clarify intent.

    Naming Consistency4/5

    All tools share the consistent spa_ prefix and use snake_case, which makes the set feel coherent. Some names are verb-first like spa_get_text, while others are object-first like spa_iframe_click or noun-like spa_http_request, so the pattern is not perfectly uniform.

    Tool Count3/5

    With 22 tools, the server sits in the heavy 16-25 range. Many tools are justified for browser automation, but iframe variants, the chain command, and session management tools could potentially be consolidated, making the surface feel slightly bloated.

    Completeness4/5

    The tool surface covers the core SPA testing lifecycle well: navigation, clicking, filling, typing, iframes, uploads, drag-and-drop, assertions, sessions, screenshots, and JavaScript evaluation. Minor gaps like explicit dropdown/select handling, hover, and dedicated element-wait commands exist, but they can be worked around with spa_evaluate or spa_chain.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables automated browser testing of web applications using Playwright, supporting user interactions, form submissions, console monitoring, network request inspection, and visual verification through screenshots.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to control web browsers through Playwright automation, providing 50+ tools for navigation, interaction, testing, accessibility audits, and visual testing across Chromium, Firefox, and WebKit.
      24 npm
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A universal browser automation server featuring 63 tools for programmatic Chrome control, multi-tab management, and media interaction using Playwright. It enables advanced actions like session recording, performance profiling, and pixel-based interaction through a safe, isolated browser profile.
      63
      28 npm
      1
      MIT