mcp-browser-automation
Click on "Install 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., "@mcp-browser-automationGo to example.com and take a screenshot"
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.
mcp-browser-automation
An MCP (Model Context Protocol) server for generic browser automation using Playwright. Exposes a headless Chromium instance as a set of callable tools so that MCP clients — such as AI coding assistants — can navigate pages, inspect elements, execute JavaScript, capture screenshots, and monitor console logs and network traffic.
Requirements
Node.js 18+
npm
Related MCP server: Playwright MCP
Installation
npm install
npx playwright install chromiumUsage
npm run build
npm startOr for development with hot reload:
npm run devThe server listens on stdin/stdout using the MCP stdio transport. Configure your MCP client to launch it as a subprocess.
Claude Desktop:
{
"mcpServers": {
"browser-automation": {
"command": "npx",
"args": ["github:ritesh-jain/MCP-Browser-Automation"]
}
}
}Opencode:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mcp-browser-automation": {
"type": "local",
"enabled": true,
"command": [
"npx",
"github:ritesh-jain/MCP-Browser-Automation"
]
}
}
}Tools
Tool | Description |
| Navigate to a URL. Supports custom viewport and mobile emulation. |
| Take a full-page screenshot (saved to |
| Retrieve browser console logs. Optionally clear after read. |
| Retrieve network requests and responses. Optionally clear after read. |
| Execute arbitrary JavaScript in the page context. |
| Click, type, fill, or select on a CSS selector. |
| Return tag name, id, class, inner text, outer HTML, and computed styles for an element. |
Project Structure
src/
types.ts Shared type definitions
McpServer.ts MCP protocol layer — tool registration and dispatch
BrowserManager.ts Playwright orchestration — browser lifecycle and page interactions
index.ts Entry pointHow It Works
index.tscreates anMcpBrowserServerand connects viaStdioServerTransport.An MCP client discovers tools via the
ListToolsrequest and calls them viaCallToolRequest.McpBrowserServerlazily initializes the browser on the first tool call and delegates toBrowserManager.The browser stays open across calls, enabling multi-step interactions on the same page.
License
ISC
Available Tools
7 toolscapture_screenshotB
Take a screenshot of the current page
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the screenshot file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for behavioral disclosure. It only states the action, omitting important details such as whether it captures the viewport or full page, whether it returns a file path or base64, and whether it waits for page load. This is inadequate for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that is front-loaded and contains no fluff. It earns its place by clearly stating the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one optional parameter and no output schema, but the description still leaves critical gaps: it does not explain what the tool returns, whether the screenshot is saved to a file, or what behavior to expect. For a tool without annotations, this is insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, 'name', is fully described in the input schema as 'Optional name for the screenshot file' (100% schema coverage). The description adds no additional meaning, but the baseline of 3 is appropriate since the schema already covers the parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Take a screenshot of the current page' uses a specific verb ('take') and a clear resource ('screenshot of the current page'). It clearly distinguishes this tool from siblings like navigate, get_console_logs, or execute_js, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied: use this when a visual capture of the current page is needed. However, there is no explicit guidance on when not to use it or how it compares to alternatives, leaving the agent to infer the context from the tool's name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_jsB
Execute arbitrary JavaScript in the browser context
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The JS code to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only states that arbitrary JS is executed, without mentioning potential side effects, page state changes, permission requirements, or what happens on errors. This is a significant gap for a tool that runs arbitrary code, which could alter the page or cause navigation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no unnecessary words or repetition. It effectively communicates the core action in the most efficient way possible, earning top marks for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having only one parameter, the tool's complexity demands more context. The description does not explain what the tool returns (e.g., the script's result), how it handles async operations, or any risks associated with arbitrary code execution. This makes the description incomplete for safe and correct use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully covers the only parameter 'script' with the description 'The JS code to execute'. The tool description adds no further semantic meaning beyond inferring that the script is JavaScript, so the baseline score of 3 is appropriate because the schema already handles the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Execute arbitrary JavaScript in the browser context' uses a specific verb ('execute') and resource ('JavaScript in the browser context'), making the purpose immediately clear. It distinctly separates this tool from siblings like navigate, capture_screenshot, and get_console_logs, which all have different functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description does not mention any prerequisites, exclusions, or scenarios where other tools (e.g., interact, inspect_element) might be more appropriate, leaving the agent without clear decision-making support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_console_logsB
Get browser console logs
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Clear logs after retrieving |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the core action, omitting any side effects (like clearing logs) or return format. The optional 'clear' parameter is defined in the schema but not mentioned in the description, so critical behavioral nuance is missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no redundant wording. It is front-loaded and immediately communicates the tool's purpose, earning full marks for efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no annotations, no output schema, and a minimal description. The description does not explain the return structure, potential volume of logs, or interactions with the 'clear' parameter. For a single-parameter tool, this is insufficient to fully guide an agent without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% because the only parameter 'clear' has a description ('Clear logs after retrieving'), so the schema already defines it. The description adds no additional meaning beyond the schema, making the baseline 3 appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get browser console logs' uses a specific verb ('get') and a clear resource ('browser console logs'), which distinguishes it from sibling tools like capture_screenshot or navigate. It is unambiguous and direct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when the tool is needed (whenever console logs are desired), but it does not explicitly state when to prefer this tool over alternatives or mention any exclusions. For a simple getter, this is adequate but not exemplary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_network_trafficB
Get network requests and responses
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Clear traffic after retrieving |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It does not mention that the 'clear' parameter can delete traffic after retrieval, nor does it describe output format, permissions, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no unnecessary words. It efficiently conveys the verb and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one optional parameter and full schema coverage, so the minimal description is adequate. However, it lacks any mention of return structure or side effects, leaving some context gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and includes a description for the only parameter 'clear'. The tool description adds no extra parameter meaning, but baseline 3 is appropriate since the schema handles parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states the verb 'Get' and the specific resource 'network requests and responses', which clearly distinguishes it from siblings like get_console_logs. It could be more specific about scope (e.g., current session, all network activity), but the core purpose is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives like get_console_logs or inspect_element. There is no context about debugging scenarios or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_elementC
Get details of a specific element
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector of the element |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation via 'Get', but does not state whether the tool executes JavaScript, what state it requires (e.g., page loaded), or what the return value looks like. It also does not disclose potential side effects or errors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise and front-loaded. However, it is under-specified: it omits essential details about the output and the nature of parameters, which makes it less useful than a well-structured description. It is not as extreme as a tautology, but it lacks completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has a simple schema (one required parameter) but no output schema and no annotations. The description does not explain what details are returned, what format they take, or any behavioral preconditions. This forces the agent to guess or invoke the tool to learn, which is incomplete for a tool with zero output schema coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool description adds no parameter-specific meaning; it does not mention the 'selector' parameter. However, the input schema provides a clear description ('CSS selector of the element') with 100% coverage, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool retrieves details for an element ('Get details of a specific element'), which identifies the verb and resource. However, it lacks specificity about what 'details' includes (e.g., CSS styles, bounding box, attributes), and does not distinguish this from sibling tools like interact or execute_js.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to use this tool compared to alternatives. The description only states the function without mentioning any context, prerequisites, or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
interactC
Interact with a page element
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of interaction | |
| value | No | Value to type or select | |
| selector | Yes | CSS selector of the element |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure, but it says nothing about side effects, error handling, or element state requirements. It merely restates the action without revealing what happens on failure, waiting behavior, or whether it triggers navigation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, making it concise. However, it is under-specified; it contains no concrete actions or context, which reduces its value. It is not verbose, but it also does not earn its place as a useful specification.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple tool with three parameters, the description is too minimal to provide adequate context. It lacks information about interaction types, when to use it, and what outcomes to expect. The schema helps, but the description's vagueness leaves the overall picture incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides complete descriptions for all three parameters, so the baseline is 3. The description itself adds no parameter-level meaning, and it does not clarify the distinction between 'type' and 'fill' or when the 'value' is needed. However, the schema already covers the syntax.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Interact with a page element' provides a verb and resource, but 'interact' is vague and does not specify the concrete actions (click, type, fill, select) that the schema reveals. It distinguishes from siblings like navigate or capture_screenshot, but not sharply enough to be immediately clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidance is provided. The description does not indicate when to use this tool over alternatives like execute_js or inspect_element, nor does it mention any prerequisites or exclusions. This leaves the agent without decision support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v1.0.0- First observed
capture_screenshot - First observed
execute_js - First observed
get_console_logs - First observed
get_network_traffic - First observed
inspect_element - First observed
interact - First observed
navigate
TDQS
Each tool targets a distinct browser capability: navigation, screenshot, console logs, network traffic, JS execution, element interaction, and element inspection. There is no meaningful overlap between them; even interact and inspect_element are clearly differentiated as action vs. introspection.
Tool names are predominantly snake_case with a verb-first pattern (navigate, interact, inspect_element, execute_js). Minor inconsistency exists in the prefix: get_console_logs and get_network_traffic use 'get_', while capture_screenshot uses 'capture_' instead of 'get_'. Overall the pattern is readable and predictable.
Seven tools is a well-scoped set for browser automation, covering essential operations without excess. This is within the ideal 3-15 range and each tool serves a distinct purpose.
The tool surface covers core browser automation needs: navigation, screenshots, logs, network, JavaScript execution, and element interactions/inspection. Some advanced features like tab management, cookie handling, or explicit waiting are missing, but execute_js can compensate, and the common workflows are complete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
MCP server to assist with JxBrowser development.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
MCP server for Mint — AI-powered QA that runs your app in a real browser on every PR.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.82-
- AlicenseNot gradedqualityDmaintenanceEnables browser automation and web scraping by exposing Playwright tools through an HTTP-based MCP server. Users can navigate pages, interact with web elements, capture screenshots, and extract structured content using a persistent Chromium instance.MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive browser automation MCP server using Playwright, offering 50+ tools for page control, element interaction, content extraction, and more across multiple browser engines.211MIT
- AlicenseAqualityDmaintenanceStateful MCP server wrapping Playwright for browser automation. Provides tools to navigate, interact, and extract data from web pages via a persistent browser session.191,414MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ritesh-jain/MCP-Browser-Automation'
If you have feedback or need assistance with the MCP directory API, please join our Discord server