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.
To install the Stealth Browser MCP Server, you'll need Bun installed on your system. Then run:
# Install dependencies
bun install
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
The primary functionality of this server is the screenshot tool, which allows you to capture images of websites while avoiding bot detection.
The screenshot tool accepts these parameters:
url
(string, required): The URL to navigate tofullPage
(boolean, optional, default: true): Whether to capture the entire pageselector
(string, optional): CSS selector to capture only a specific elementheadless
(boolean, optional, default: true): Whether to run in headless mode or visible browser modeWhen 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
});
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.
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.
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"
]
}
}
}
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.
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.