Browser

Browser automation MCP server for Claude Code - provides web interaction tools via Playwright
  • python

1

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sac916-claude-browser-mcp": {
      "command": "browser-mcp",
      "args": [],
      "env": {
        "BROWSER_TYPE": "chromium",
        "BROWSER_TIMEOUT": "30000",
        "BROWSER_HEADLESS": "true"
      }
    }
  }
}

You can run a dedicated MCP Server that uses Playwright to automate browser interactions. It lets you navigate web pages, extract content, fill forms, click elements, take screenshots, and run small JavaScript snippets, all through standardized MCP tools. This makes it easy to embed browser automation into AI workflows, tests, or data collection tasks.

How to use

To use the Browser MCP Server, run it locally or expose it as a service and connect your MCP client. You can perform common browser automation tasks by issuing tools such as navigate_to, get_page_content, click_element, fill_form, take_screenshot, and execute_javascript. Each tool accepts structured arguments and returns a standardized JSON response with success status, data, and metadata, enabling you to orchestrate complex workflows around web content.

How to install

Prerequisites you need before installing:

  • Python 3.8 or higher
  • Node.js (required for Playwright browser installation)
# Clone the repository
git clone <repository-url>
cd claude-browser-mcp

# Install Python package in editable mode
pip install -e .

# Install Playwright browsers
playwright install

Configuration

Set up environment variables to control the browser behavior. You can enable headless mode, choose the browser type, and set a default operation timeout.

export BROWSER_HEADLESS=true          # Run in headless mode
export BROWSER_TYPE=chromium          # Browser type (chromium/firefox/webkit)
export BROWSER_TIMEOUT=30000          # Default timeout in milliseconds

MCP client integration

Add the server to your MCP client configuration so your AI agents can call browser actions. Provide the appropriate command to start the MCP server and leave the arguments array empty if you are using the default start command.

{
  "mcpServers": {
    "browser-automation": {
      "command": "browser-mcp",
      "args": []
    }
  }
}

Common tools and usage patterns

Use navigate_to to load a URL with optional waiting for a selector. Use get_page_content to extract text and links. Use click_element to interact with forms and buttons. Use fill_form to populate input fields and optionally submit. Use take_screenshot to capture the page or a specific element. Use execute_javascript to retrieve information from the page or perform simple manipulations.

Security and reliability notes

The server sanitizes returned content, validates URLs, and imposes resource and timeout limits to prevent abuse and hangs. It is designed to clean up resources after actions to avoid leaks and ensure predictable behavior in automated workflows.

Troubleshooting

If you encounter timeouts or unexpected errors, review the error response which includes the tool name, arguments, and context such as the URL or selector involved. Check environment variables and ensure the specified browser type is installed. Verify that the Playwright browsers are installed on your system.

Available tools

navigate_to

Navigate to a URL with optional waiting for a selector and a timeout to ensure the page is ready before continuing.

get_page_content

Extract text and optionally links from the current page using a selector to scope the content.

click_element

Click elements by a CSS selector with an optional timeout to handle slow-loading elements.

fill_form

Fill form fields by selector with provided values and optionally submit the form to trigger validation and processing.

take_screenshot

Capture a screenshot of the full page, viewport, or a specific element for verification or sharing.

execute_javascript

Run JavaScript inside the browser context and return the result to your client.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational