Stealth Browser MCP server

Provides stealth browser capabilities using Playwright and anti-detection techniques for evading bot detection systems during web scraping and automated testing.
Back to servers
Provider
Brian Lloyd-Newberry
Release date
Feb 26, 2025
Language
TypeScript
Stats
9 stars

The Stealth Browser MCP Server provides web browsing capabilities with anti-detection techniques through the Model Context Protocol. It allows clients to navigate websites and capture screenshots while evading common bot detection systems by using modified browser fingerprints.

Installation

To install the Stealth Browser MCP Server, you'll need Bun installed on your system. Then run:

# Install dependencies
bun install

Running the Server

Start the MCP server using one of these commands:

# Run the MCP server in production mode
bun start

# Run the server in development mode
bun dev

# View available tools and their documentation
bun inspect

Using the Screenshot Tool

The primary functionality of this server is the screenshot tool, which allows you to capture images of websites while avoiding bot detection.

Parameters

The screenshot tool accepts these parameters:

  • url (string, required): The URL to navigate to
  • fullPage (boolean, optional, default: true): Whether to capture the entire page
  • selector (string, optional): CSS selector to capture only a specific element
  • headless (boolean, optional, default: true): Whether to run in headless mode or visible browser mode

Example Usage

When using this server through an MCP client, you can make requests to take screenshots like this:

// Example of how an MCP client might call the screenshot tool
const result = await mcp.runTool("screenshot", {
  url: "https://example.com",
  fullPage: true,
  headless: true
});

// To capture just a specific element
const elementResult = await mcp.runTool("screenshot", {
  url: "https://example.com",
  selector: "#main-content",
  fullPage: false
});

// To use a visible browser window (for debugging)
const visibleResult = await mcp.runTool("screenshot", {
  url: "https://example.com",
  headless: false
});

Advanced Configuration

The server uses Playwright with stealth plugins to evade detection. By default, it runs in headless mode and captures full-page screenshots, but you can customize this behavior through the parameters described above.

For the best anti-detection results, consider using headless: false which shows the actual browser window and may provide better evasion of sophisticated detection systems.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later