MCP HubMCP Hub
jakedahn

deno2-playwright-mcp-server

by: jakedahn

A Model Context Protocol server that provides browser automation capabilities using Playwright and Deno 2.

11created 01/12/2024
Visit
Playwright
Deno

📌Overview

Purpose: The framework aims to facilitate browser automation through a Model Context Protocol server using Playwright, enabling interaction with web pages by large language models (LLMs).

Overview: This server, compatible with Deno 2, provides robust capabilities for automating browser tasks such as taking screenshots and executing JavaScript in a real browser environment. Its design draws inspiration from the official Puppeteer MCP server, making it a reliable choice for developers seeking to implement browser-based LLM interactions.

Key Features:

  • Browser Automation: Enables LLMs to interact with web pages seamlessly, enhancing the capabilities of applications that require web automation.

  • Cross-Platform Support: Offers the ability to build executable binaries for various operating systems, including macOS, Linux (x86_64 and ARM64), and Windows, ensuring flexibility and accessibility for multiple environments.


Deno 2 Playwright Model Context Protocol Server Example

A Model Context Protocol server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.

This repo uses Deno 2, which allows compiling a binary that runs without any runtime dependencies.

The code is heavily based on the official Puppeteer MCP server: https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer

How to build

The mac binary build has been tested, but you should be able to build an executable binary for:

  • mac
  • Linux x86_64
  • Linux ARM64
  • Windows x86_64

Build commands:

  • deno task build-mac
  • deno task build-linux-x86_64
  • deno task build-linux-ARM64
  • deno task build-windows-x86_64

How to run

To run the playwright-server binary, update your ~/Library/Application Support/Claude/claude_desktop_config.json to point to the binary:

{
  "mcpServers": {
    "playwright": {
      "command": "/path/to/deno2-playwright-mcp-server/playwright-server"
    }
  }
}