MCP Macaco Playwright

MCP Macaco Playwright

Official
macacoai

Provides comprehensive browser automation through Playwright with 50+ functions for web scraping, testing, and automated browsing tasks. Includes Chrome DevTools Protocol support and is optimized for AI agents.

Enables comprehensive browser automation and web interaction through Playwright with 50+ specialized functions for navigation, form filling, data extraction, and Chrome DevTools Protocol support. Designed specifically for AI agents to perform complex web workflows including scraping, testing, and automated browsing tasks.

1269 views1Local (stdio)

What it does

  • Navigate web pages and control browser instances
  • Fill forms and handle file uploads automatically
  • Extract data and take screenshots from web pages
  • Monitor network requests and console messages
  • Execute custom JavaScript in browser context
  • Handle browser dialogs and alerts

Best for

AI agents performing web scraping tasksAutomated browser testing and QA workflowsWeb automation for data collectionAutomated form filling and submission
50+ specialized automation functionsChrome DevTools Protocol integrationMulti-browser support (Chrome, Firefox, Safari, Edge)

About MCP Macaco Playwright

MCP Macaco Playwright is an official MCP server published by macacoai that provides AI assistants with tools and capabilities via the Model Context Protocol. Playwright automation for AI agents: 50+ functions for browser automation, form filling, Chrome DevTools, and web scrapi It is categorized under browser automation, search web. This server exposes 28 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install MCP Macaco Playwright in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

MCP Macaco Playwright is released under the NOASSERTION license.

Tools (28)

browser_close

Close the browser context, terminating all associated tabs and pages

browser_resize

Resize the browser window to simulate different device viewports. Available options: mobile (375x667px - iPhone), tablet (768x1024px - iPad), desktop (1280x720px - HD)

browser_console_messages

Retrieves all console messages (logs, errors, warnings, info, debug) from the browser tab's console output.

browser_handle_dialog

Handles native browser dialogs that appear from JavaScript alert(), confirm(), or prompt() calls. Can accept/dismiss and provide text input for prompts.

browser_evaluate

Runs custom JavaScript functions in the browser, targeting either the page or specific elements, and returns the result.

MCP Macaco Playwright

Enhanced Playwright Tools for Model Context Protocol (MCP) with Chrome DevTools Protocol (CDP) Support

Overview

MCP Macaco Playwright is a comprehensive browser automation server that provides AI agents with powerful web interaction capabilities through the Model Context Protocol. It combines Playwright's robust browser automation with CDP integration for advanced debugging and control scenarios.

Features

  • Complete Browser Automation: Navigate, interact, and extract data from web pages
  • Chrome DevTools Protocol (CDP) Support: Connect to existing browser instances
  • AI-Optimized: Designed specifically for AI agents and automated workflows
  • Comprehensive Tool Set: 50+ specialized functions for web automation
  • Multi-Browser Support: Chrome, Firefox, Safari, and Edge
  • Screenshot & Snapshot Capabilities: Visual and accessibility-based page capture
  • Form Automation: Complete form filling and submission workflows
  • Network Monitoring: Track requests, responses, and console messages

Installation

npm install mcp-macaco-playwright

Quick Start

import { createConnection } from "mcp-macaco-playwright";

// Create MCP server connection
const server = await createConnection();

// Use with MCP client
await client.callTool({
  name: "browser_navigate",
  arguments: { url: "https://example.com" },
});

Function Reference

Navigation Functions

browser_navigate

Navigate to a specific URL.

Parameters:

  • url (string, required): The URL to navigate to

Example:

await client.callTool({
  name: "browser_navigate",
  arguments: { url: "https://github.com" },
});

browser_navigate_back

Go back to the previous page in browser history.

Parameters: None

Example:

await client.callTool({
  name: "browser_navigate_back",
  arguments: {},
});

browser_navigate_forward

Go forward to the next page in browser history.

Parameters: None

Example:

await client.callTool({
  name: "browser_navigate_forward",
  arguments: {},
});

Page Analysis Functions

browser_snapshot

Capture an accessibility snapshot of the current page for analysis and interaction.

Parameters: None

Example:

await client.callTool({
  name: "browser_snapshot",
  arguments: {},
});

browser_take_screenshot

Take a visual screenshot of the page or specific element.

Parameters:

  • type (string, optional): Image format ('png' or 'jpeg', default: 'png')
  • filename (string, optional): Custom filename for the screenshot
  • element (string, optional): Human-readable element description
  • ref (string, optional): Element reference from snapshot
  • fullPage (boolean, optional): Capture full scrollable page

Example:

await client.callTool({
  name: "browser_take_screenshot",
  arguments: {
    type: "png",
    fullPage: true,
    filename: "homepage.png",
  },
});

Element Interaction Functions

browser_click

Click on a specific element on the page.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_click",
  arguments: {
    element: "Sign in button",
    ref: "button-signin-123",
  },
});

browser_double_click

Perform a double-click on an element.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_double_click",
  arguments: {
    element: "File icon",
    ref: "file-icon-456",
  },
});

browser_right_click

Perform a right-click to open context menu.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_right_click",
  arguments: {
    element: "Image thumbnail",
    ref: "img-thumb-789",
  },
});

Text Input Functions

browser_type

Type text into an editable element.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot
  • text (string, required): Text to type
  • submit (boolean, optional): Press Enter after typing
  • slowly (boolean, optional): Type character by character

Example:

await client.callTool({
  name: "browser_type",
  arguments: {
    element: "Search input field",
    ref: "search-input-123",
    text: "playwright automation",
    submit: true,
  },
});

browser_press_key

Press a specific key on the keyboard.

Parameters:

  • key (string, required): Key name (e.g., 'Enter', 'ArrowLeft', 'a')

Example:

await client.callTool({
  name: "browser_press_key",
  arguments: { key: "Escape" },
});

Form Functions

browser_select_option

Select options in a dropdown menu.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot
  • values (array, required): Array of values to select

Example:

await client.callTool({
  name: "browser_select_option",
  arguments: {
    element: "Country dropdown",
    ref: "country-select-456",
    values: ["United States"],
  },
});

browser_check_checkbox

Check or uncheck a checkbox element.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot
  • checked (boolean, required): Whether to check (true) or uncheck (false)

Example:

await client.callTool({
  name: "browser_check_checkbox",
  arguments: {
    element: "Terms and conditions checkbox",
    ref: "terms-checkbox-789",
    checked: true,
  },
});

browser_select_radio

Select a radio button.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_select_radio",
  arguments: {
    element: "Payment method: Credit Card",
    ref: "payment-radio-cc",
  },
});

browser_clear_input

Clear the content of an input field.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_clear_input",
  arguments: {
    element: "Email input field",
    ref: "email-input-123",
  },
});

Data Extraction Functions

browser_get_text

Extract text content or attribute values from elements.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot
  • attribute (string, optional): Specific attribute to extract (e.g., 'href', 'src')

Example:

await client.callTool({
  name: "browser_get_text",
  arguments: {
    element: "Product price",
    ref: "price-display-456",
  },
});

browser_get_elements

Get multiple elements matching a selector.

Parameters:

  • selector (string, required): CSS selector to find elements
  • attribute (string, optional): Attribute to extract from each element

Example:

await client.callTool({
  name: "browser_get_elements",
  arguments: {
    selector: ".product-card h3",
    attribute: "textContent",
  },
});

Scrolling and Focus Functions

browser_scroll_to

Scroll to a specific element or coordinate position.

Parameters:

  • element (string, optional): Human-readable element description
  • ref (string, optional): Element reference from page snapshot
  • x (number, optional): X coordinate to scroll to
  • y (number, optional): Y coordinate to scroll to
  • behavior (string, optional): Scroll behavior ('auto' or 'smooth')

Example:

await client.callTool({
  name: "browser_scroll_to",
  arguments: {
    element: "Footer section",
    ref: "footer-section-123",
    behavior: "smooth",
  },
});

browser_focus_element

Set focus on a specific element.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_focus_element",
  arguments: {
    element: "Search input",
    ref: "search-input-456",
  },
});

browser_blur_element

Remove focus from a specific element.

Parameters:

  • element (string, required): Human-readable element description
  • ref (string, required): Element reference from page snapshot

Example:

await client.callTool({
  name: "browser_blur_element",
  arguments: {
    element: "Email input",
    ref: "email-input-789",
  },
});

Wait Functions

browser_wait_for

Wait for specific conditions to be met.

Parameters:

  • time (number, optional): Time to wait in seconds
  • text (string, optional): Text to wait for to appear
  • textGone (string, optional): Text to wait for to disappear

Example:

await client.callTool({
  name: "browser_wait_for",
  arguments: {
    text: "Loading complete",
    time: 5,
  },
});

Tab Management Functions

browser_tab_list

List all open browser tabs.

Parameters: None

Example:

await client.callTool({
  name: "browser_tab_list",
  arguments: {},
});

browser_tab_new

Open a new browser tab.

Parameters:

  • url (string, optional): URL to navigate to

README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
browser-automation

Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Triggers include "browse", "navigate to", "go to website", "extract data from webpage", "screenshot", "web scraping", "fill out form", "click on", "search for on the web". When taking actions be as specific as possible.

23
playwright-browser-automation

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.

20
playwright-skill

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.

4
browser-daemon

Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.

4
playwright-testing

Test web applications and games using Playwright on MiniPC. Use when verifying frontend functionality, debugging UI behavior, capturing screenshots, or QA testing games. Supports headless browser automation via nodes.run or browser.proxy.

3
web-testing

Web testing with Playwright, Vitest, k6. E2E/unit/integration/load/security/visual/a11y testing. Use for test automation, flakiness, Core Web Vitals, mobile gestures, cross-browser.

1