browser-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@browser-mcp-server navigate to https://example.com and capture console output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Browser MCP Server
A Model Context Protocol (MCP) server that provides browser automation capabilities, specifically for capturing console output from web pages.
Features
browser-console: Navigate to a URL and capture console output from the browser
browser-server-console: Spawn a local Express static server for a directory and capture console output from the served content
Built with Puppeteer for reliable browser automation
Supports custom timeouts and wait conditions
Static file serving for local development and testing
Automatic port detection (finds next available port if requested port is busy)
Related MCP server: MCP Browser Logger
Installation
npm installUsage
As an MCP Server
This server is designed to be used with MCP-compatible clients. Add it to your MCP client configuration:
{
"mcpServers": {
"browser-mcp-server": {
"command": "npx",
"args": ["browser-mcp-server"]
}
}
}Direct Usage
You can also run the server directly:
npm startOr in development mode with auto-reload:
npm run devTools
browser-console
Navigate to a URL and capture console output from the browser.
Parameters:
url(required): The URL to navigate totimeout(optional): Timeout in milliseconds (default: 30000)waitFor(optional): CSS selector to wait for before capturing consolecommands(optional): Browser commands to execute (e.g., "click .button wait 2s")stream(optional): Whether to stream output in real-time (default: true)
Commands syntax:
wait <time>: Wait for specified time (e.g., "5s", "1000ms")click <selector>: Click on element matching CSS selector
Example:
{
"name": "browser-console",
"arguments": {
"url": "https://example.com",
"timeout": 10000,
"waitFor": "#main-content",
"commands": "click .load-more-btn wait 2s click .submit",
"stream": true
}
}browser-server-console
Spawn an Express static server for a directory and capture console output from the served content.
Parameters:
directory(required): The directory to serve staticallyport(optional): Preferred port to run the server on (will automatically find next available if busy, default: 3000)path(optional): Path to navigate to after starting server (default: "/")timeout(optional): Timeout in milliseconds (default: 30000)waitFor(optional): CSS selector to wait for before capturing consolecommands(optional): Browser commands to execute (e.g., "click .button wait 2s")stream(optional): Whether to stream output in real-time (default: true)
Commands syntax:
wait <time>: Wait for specified time (e.g., "5s", "1000ms")click <selector>: Click on element matching CSS selector
Example:
{
"name": "browser-server-console",
"arguments": {
"directory": "./public",
"port": 3001,
"path": "/index.html",
"timeout": 10000,
"waitFor": "#app",
"commands": "click #start-btn wait 3s",
"stream": false
}
}Implementation Status
Basic MCP server structure
Tool schema definition
Browser navigation with Puppeteer
Console output capture
Real-time console message streaming
Browser command execution (click, wait)
Error handling for browser issues
Support for custom timeouts and wait conditions
True streaming output (currently batched)
Support for different browser types
Development
The main server implementation is in src/index.js. The current implementation includes:
MCP server setup with proper tool registration
Input validation for the browser-console tool
Error handling and graceful shutdown
Placeholder implementation for browser functionality
Dependencies
@modelcontextprotocol/sdk: MCP SDK for server implementationpuppeteer: Browser automation library for console captureexpress: Web framework for static file serving@types/node: TypeScript definitions for Node.js
License
MIT
Available Tools
2 toolsbrowser-consoleB
Navigate to a URL and capture console output from the browser with streaming support
Inputs: url (required), stream, timeout, waitFor, +1 more.
browser-server-consoleB
Spawn an Express static server for a directory and capture console output from the served content
Inputs: directory (required), path, port, stream, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools share a common goal of capturing console output but are clearly differentiated by their input: one navigates to an existing URL, the other serves a directory first. The descriptions make this distinction obvious, though the similar 'browser-console' phrasing could cause slight hesitation.
Both tools follow the 'browser-<noun>' pattern with hyphens and end in 'console'. The second tool inserts 'server' to indicate the serving step, which is a minor deviation but still predictable and consistent in style.
With only two tools, the server feels minimal but appropriately scoped for its narrow focus on console capture. This is borderline, as two tools may be thin for a general-purpose browser server, but the purpose is specific enough to warrant a small set.
The tool set covers the two primary ways to obtain browser console output: from an arbitrary URL and from locally served content. Minor gaps exist, such as no way to interact with the page or manage a long-running server, but the core workflows are well covered.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
MCP server to assist with JxBrowser development.
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Live browser debugging for AI assistants — DOM, console, network via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation that enables browser automation through standardized MCP clients, supporting features like navigation, element interaction, and screenshots across Chrome, Firefox, and Edge browsers.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that captures browser console logs and network requests via the Chrome DevTools Protocol. It allows users to monitor real-time logs, inspect network traffic, and execute JavaScript code directly in the browser context.1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that connects to your browser to capture screenshots, inspect console logs, network requests, and more via Chrome DevTools Protocol.2-
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for browser automation using Playwright to control Chrome browsers.10MIT