playwright-plus-python-mcp

playwright-plus-python-mcp

A Model Context Protocol server offering browser automation via Playwright and integrated note management.

148
Stars
23
Forks
148
Watchers
5
Issues
playwright-plus-python-mcp implements a Model Context Protocol (MCP) server that provides Playwright-powered browser automation tools through a standardized context interface. It supports operations like navigation, screenshotting, DOM interaction, script evaluation, and content extraction. Additionally, it includes a simple note storage resource with summarization prompts for managing and summarizing notes. This MCP server integrates tightly with tools such as Claude Desktop and provides configuration guidance for local and published server deployments.

Key Features

Implements the Model Context Protocol server
Browser automation capabilities using Playwright
Support for navigating URLs, taking screenshots, clicking elements, filling forms, and evaluating JavaScript
Custom resource system for storing and accessing notes via a note:// URI scheme
Prompt for summarizing notes with adjustable detail level
Command-line interface integration for local and desktop environments
Ability to extract HTML and text content from the browser page
Operations via standardized API and context interface
Development and debugging support with MCP Inspector
Configurable publishing and development workflows

Use Cases

Automating website testing and content extraction
Generating browser page summaries for stored notes
Interacting with and manipulating web pages programmatically
Storing and managing notes with context-aware access
Performing end-to-end browser workflows driven by AI prompts
Taking targeted or full-page screenshots during test automation
Filling out web forms automatically for testing or data entry
Evaluating and running custom JavaScript in a controlled browser session
Contextual knowledge management and summarization for desktop AI assistants
Integrating standardized browser automation tools into larger AI workflows

README

playwright-server MCP server

\A MCP server with playwright tools\

Components

Resources

The server implements a simple note storage system with:

  • Custom note:// URI scheme for accessing individual notes
  • Each note resource has a name, description and text/plain mimetype

Prompts

The server provides a single prompt:

  • summarize-notes: Creates summaries of all stored notes
    • Optional "style" argument to control detail level (brief/detailed)
    • Generates prompt combining all current notes with style preference

Tools

The server implements the following tools:

  • playwright_navigate: Navigates to a specified URL. This operation will automatically create a new session if there is no active session.
    • Requires a url argument (string).
  • playwright_screenshot: Takes a screenshot of the current page or a specific element.
    • Requires a name argument (string) for the screenshot file name.
    • Optional selector argument (string) to specify a CSS selector for the element to screenshot. If no selector is provided, a full-page screenshot is taken.
  • playwright_click: Clicks an element on the page using a CSS selector.
    • Requires a selector argument (string) to specify the CSS selector for the element to click.
  • playwright_fill: Fills out an input field.
    • Requires a selector argument (string) to specify the CSS selector for the input field.
    • Requires a value argument (string) to specify the value to fill.
  • playwright_evaluate: Executes JavaScript code in the browser console.
    • Requires a script argument (string) to specify the JavaScript code to execute.
  • playwright_click_text: Clicks an element on the page by its text content.
    • Requires a text argument (string) to specify the text content of the element to click.
  • playwright_get_text_content: Get the text content of all visiable elements.
  • playwright_get_html_content: Get the HTML content of the page.
    • Requires a selector argument (string) to specify the CSS selector for the element.

Configuration

[TODO: Add configuration details specific to your implementation]

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
bash
uv sync
  1. Build package distributions:
bash
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
bash
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

bash
npx @modelcontextprotocol/inspector uv --directory C:\Users\YUNYING\Documents\project\python\mcp\playwright-server run playwright-server

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Star History

Star History Chart

Repository Owner

Repository Details

Language Python
Default Branch master
Size 23 KB
Contributors 2
License Apache License 2.0
MCP Verified Sep 5, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • mcp

    mcp

    Universal remote MCP server connecting AI clients to productivity tools.

    WayStation MCP acts as a remote Model Context Protocol (MCP) server, enabling seamless integration between AI clients like Claude or Cursor and a wide range of productivity applications, such as Notion, Monday, Airtable, Jira, and more. It supports multiple secure connection transports and offers both general and user-specific preauthenticated endpoints. The platform emphasizes ease of integration, OAuth2-based authentication, and broad app compatibility. Users can manage their integrations through a user dashboard, simplifying complex workflow automations for AI-powered productivity.

    • 27
    • MCP
    • waystation-ai/mcp
  • mcp-server-js

    mcp-server-js

    Enable secure, AI-driven process automation and code execution on YepCode via Model Context Protocol.

    YepCode MCP Server acts as a Model Context Protocol (MCP) server that facilitates seamless communication between AI platforms and YepCode’s workflow automation infrastructure. It allows AI assistants and clients to execute code, manage environment variables, and interact with storage through standardized tools. The server can expose YepCode processes directly as MCP tools and supports both hosted and local installations via NPX or Docker. Enterprise-grade security and real-time interaction make it suitable for integrating advanced automation into AI-powered environments.

    • 31
    • MCP
    • yepcode/mcp-server-js
  • mcpmcp-server

    mcpmcp-server

    Seamlessly discover, set up, and integrate MCP servers with AI clients.

    mcpmcp-server enables users to discover, configure, and connect MCP servers with preferred clients, optimizing AI integration into daily workflows. It supports streamlined setup via JSON configuration, ensuring compatibility with various platforms such as Claude Desktop on macOS. The project simplifies the connection process between AI clients and remote Model Context Protocol servers. Users are directed to an associated homepage for further platform-specific guidance.

    • 17
    • MCP
    • glenngillen/mcpmcp-server
  • mcp-server-templates

    mcp-server-templates

    Deploy Model Context Protocol servers instantly with zero configuration.

    MCP Server Templates enables rapid, zero-configuration deployment of production-ready Model Context Protocol (MCP) servers using Docker containers and a comprehensive CLI tool. It provides a library of ready-made templates for common integrations—including filesystems, GitHub, GitLab, and Zendesk—and features intelligent caching, smart tool discovery, and flexible configuration options via JSON, YAML, environment variables, or CLI. Perfect for AI developers, data scientists, and DevOps teams, it streamlines the process of setting up and managing MCP servers and has evolved into the MCP Platform for enhanced capabilities.

    • 5
    • MCP
    • Data-Everything/mcp-server-templates
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results