Skip to main content
Glama
ztobs

Browser Use Server

by ztobs

Servidor de uso del navegador

insignia de herrería

Un servidor de Protocolo de Contexto de Modelo para la automatización de navegadores mediante scripts de Python. Para usar con Cline.

Características

Operaciones del navegador

  • screenshot : captura una captura de pantalla de una página web (página completa o ventana gráfica)

  • get_html : recupera el contenido HTML de una página web

  • execute_js : Ejecutar JavaScript en una página web

  • get_console_logs : Obtener registros de la consola desde una página web

Todas las operaciones admiten pasos de interacción personalizados (por ejemplo, hacer clic en elementos, desplazarse) después de la carga de la página.

Related MCP server: Playwright MCP Server for Security

Prerrequisitos

  1. (Opcional pero recomendado) Instalar Xvfb para la automatización del navegador sin interfaz gráfica:

# Ubuntu/Debian
sudo apt-get install xvfb

# CentOS/RHEL
sudo yum install xorg-x11-server-Xvfb

# Arch Linux
sudo pacman -S xorg-server-xvfb

Xvfb (X Virtual Frame Buffer) crea una pantalla virtual que permite la automatización del navegador sin ser detectado como un bot. Más información sobre Xvfb aquí .

  1. Instalar Miniconda o Anaconda

  2. Crear un entorno Conda:

conda create -n browser-use python=3.11
conda activate browser-use
pip install -r requirements.txt
  1. Configurar la configuración de LLM:

El servidor admite varios proveedores LLM. Puede usar cualquiera de las siguientes claves API:

# Required: Set at least one of these API keys
export GLHF_API_KEY=your_api_key
export GROQ_API_KEY=your_api_key
export OPENAI_API_KEY=your_api_key
export OPENROUTER_API_KEY=your_api_key
export GITHUB_API_KEY=your_api_key
export DEEPSEEK_API_KEY=your_api_key
export GEMINI_API_KEY=your_api_key
export OLLAMA_API_KEY=your_api_key

# Optional: Override default configuration
export MODEL=your_preferred_model  # Override the default model
export BASE_URL=your_custom_url    # Override the default API endpoint
export USE_VISION=false  # Enable/disable vision capabilities (default: false)

El servidor usará automáticamente la primera clave API disponible que encuentre. Opcionalmente, puede personalizar el modelo y la URL base de cualquier proveedor mediante las variables de entorno.

Instalación

Instalación mediante herrería

Para instalar Browser Use Server para Claude Desktop automáticamente a través de Smithery :

npx -y @smithery/cli install @ztobs/cline-browser-use-mcp --client claude
  1. Clonar este repositorio en /home/YOUR_HOME/Documents/Cline/

  2. Instalar dependencias:

npm install
  1. Construir el servidor:

npm run build

Configuración de MCP

Agregue la siguiente configuración a la configuración de Cline MCP:

"browser-use": {
  "command": "node",
  "args": [
    "/home/YOUR_HOME/Documents/Cline/MCP/browser-use-server/build/index.js"
  ],
  "env": {
    // Required: Set at least one API key
    "GLHF_API_KEY": "your_api_key",
    "GROQ_API_KEY": "your_api_key",
    "OPENAI_API_KEY": "your_api_key",
    "OPENROUTER_API_KEY": "your_api_key",
    "GITHUB_API_KEY": "your_api_key",
    "DEEPSEEK_API_KEY": "your_api_key",
    "GEMINI_API_KEY": "your_api_key",
    "OLLAMA_API_KEY": "your_api_key",
    // Optional: Configuration overrides
    "MODEL": "your_preferred_model",
    "BASE_URL": "your_custom_url",
    "USE_VISION": "false"
  },
  "disabled": false,
  "autoApprove": []
}

Reemplazar:

  • YOUR_HOME con el nombre de su directorio de inicio actual

  • your_api_key con sus claves API reales

Uso

Ejecutar el servidor:

node build/index.js

El servidor estará disponible en stdio y admitirá las siguientes operaciones:

Captura de pantalla

Parámetros:

  • url: La URL de la página web (obligatoria)

  • full_page: Si se debe capturar la página completa o solo la ventana gráfica (opcional, valor predeterminado: falso)

  • pasos: acciones u oraciones separadas por comas que describen los pasos a seguir después de cargar la página (opcional)

Obtener HTML

Parámetros:

  • url: La URL de la página web (obligatoria)

  • pasos: acciones u oraciones separadas por comas que describen los pasos a seguir después de cargar la página (opcional)

Ejecutar JavaScript

Parámetros:

  • url: La URL de la página web (obligatoria)

  • script: código JavaScript a ejecutar (obligatorio)

  • pasos: acciones u oraciones separadas por comas que describen los pasos a seguir después de cargar la página (opcional)

Obtener registros de la consola

Parámetros:

  • url: La URL de la página web (obligatoria)

  • pasos: acciones u oraciones separadas por comas que describen los pasos a seguir después de cargar la página (opcional)

Ejemplo de uso de Cline

A continuación se muestran algunas tareas de ejemplo que puede realizar utilizando el servidor de uso del navegador con Cline:

Modificación de elementos de la página web durante el desarrollo

Para cambiar el color de un encabezado en una página que requiere autenticación:

Change the colour of the headline with the text "Alle Foren im Überblick." to deep blue on https://localhost:3000/foren/ page

To check/see the page, use browser-use MCP server to:
Open https://localhost:3000/auth,
Login with ztobs:Password123,
Navigate to https://localhost:3000/foren/,
Accept cookies if required

hint: execute all browser actions in one command with multiple comma-separated steps

Esta tarea demuestra:

  • Automatización del navegador en varios pasos mediante pasos separados por comas

  • Manejo de autenticación

  • Aceptación de cookies

  • Manipulación del DOM

  • Cambios de estilo CSS

El servidor ejecutará estos pasos secuencialmente, manejando cualquier interacción requerida a lo largo del camino.

Configuración

Configuración de LLM

El servidor admite varios proveedores LLM con sus configuraciones predeterminadas:

  • GLHF: Utiliza el modelo deepseek-ai/DeepSeek-V3

  • Ollama: utiliza el modelo qwen2.5:32b-instruct-q4_K_M con una ventana de contexto de 32k

  • Groq: utiliza el modelo deepseek-r1-distill-llama-70b

  • OpenAI: utiliza el modelo gpt-4o-mini

  • Openrouter: utiliza el modelo deepseek/deepseek-chat

  • Github: utiliza el modelo gpt-4o-mini

  • DeepSeek: utiliza el modelo de chat deepseek

  • Géminis: utiliza el modelo gemini-2.0-flash-exp

Puede anular estos valores predeterminados mediante variables de entorno:

  • MODEL : Establezca un nombre de modelo personalizado para cualquier proveedor

  • BASE_URL : Establezca una URL de punto final de API personalizada (si el proveedor la admite)

Apoyo a la visión

El servidor admite capacidades de visión a través de la variable de entorno USE_VISION:

  • Establezca USE_VISION=true para habilitar las capacidades de visión para las operaciones del navegador

  • El valor predeterminado es falso para optimizar el rendimiento cuando no se necesita visión

  • Útil para tareas que requieren comprensión visual del contenido de la página web.

Soporte para Xvfb

El servidor detecta automáticamente si Xvfb está instalado y:

  • Utiliza xvfb-run cuando está disponible, lo que permite una mejor automatización del navegador sin detección de bots.

  • Vuelve a la ejecución directa cuando Xvfb no está instalado

  • Establece la variable de entorno RUNNING_UNDER_XVFB en consecuencia

Se acabó el tiempo

El tiempo de espera predeterminado es de 5 minutos (300 000 ms). Modifique la constante TIMEOUT en build/index.js para cambiarlo.

Manejo de errores

El servidor proporciona mensajes de error detallados para:

  • Errores en la ejecución de scripts de Python

  • Tiempos de espera de funcionamiento del navegador

  • Parámetros no válidos

Depuración

Utilice el Inspector MCP para depurar:

npm run inspector

Usos

Uso del navegador

Licencia

Instituto Tecnológico de Massachusetts (MIT)

Available Tools

4 tools
execute_jsC

Execute JavaScript code on a webpage

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to
scriptYesThe JavaScript code to execute
stepsNoComma-separated actions or sentences describing steps to take after page load (e.g., "click #submit, scroll down" or "Fill the login form and submit")

TDQS

C2.9/5.0
Behavior2/5

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 mentions execution but lacks details on permissions needed, potential side effects (e.g., page modifications), error handling, or execution environment. This is inadequate for a tool that performs code execution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded and efficiently communicates the core function without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of executing JavaScript on a webpage, the lack of annotations, and no output schema, the description is insufficient. It doesn't cover behavioral aspects like safety, return values, or error conditions, leaving significant gaps for an agent to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (url, script, steps). The description adds no additional meaning or context beyond what's in the schema, such as examples or constraints, but doesn't contradict it either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Execute JavaScript code') and target ('on a webpage'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like get_console_logs or get_html, which also interact with webpages but for different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_html or screenshot, nor does it mention prerequisites or constraints. It simply states what the tool does without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_console_logsC

Get the console logs of a webpage

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to
stepsNoComma-separated actions or sentences describing steps to take after page load (e.g., "click #submit, scroll down" or "Fill the login form and submit")

TDQS

C2.9/5.0
Behavior2/5

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 states what the tool does but lacks critical details: it doesn't specify if this requires browser automation, what types of console logs are captured (e.g., errors, warnings), whether it's a read-only operation, or any limitations like timeouts or authentication needs. This leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to grasp immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of interacting with webpages and the lack of annotations and output schema, the description is incomplete. It doesn't address key contextual aspects like what the tool returns (e.g., log format, error handling), behavioral constraints, or how it differs from siblings. For a tool with two parameters and no structured safety hints, more detail is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters ('url' and 'steps'). The description adds no additional meaning beyond what the schema provides, such as explaining the format of console logs or how steps interact with log capture. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('console logs of a webpage'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'execute_js' or 'get_html', which might also interact with webpage content, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'execute_js' (which might execute JavaScript and potentially capture logs) or 'get_html' (which retrieves HTML content). There's no mention of prerequisites, such as whether the webpage needs to be loaded first, or any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_htmlC

Get the HTML content of a webpage

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to
stepsNoComma-separated actions or sentences describing steps to take after page load (e.g., "click #submit, scroll down" or "Fill the login form and submit")

TDQS

C2.9/5.0
Behavior2/5

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 states what the tool does but doesn't describe how it behaves—e.g., whether it follows redirects, handles authentication, respects rate limits, or returns errors. This leaves critical operational details unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded and efficiently communicates the core function without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool with two parameters and potential behavioral complexity. It doesn't address what the tool returns (e.g., raw HTML, status codes), error handling, or dependencies, leaving significant gaps for an AI agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('url' and 'steps') thoroughly. The description doesn't add any meaning beyond what the schema provides, such as clarifying the interaction between parameters or providing examples of 'steps' usage, resulting in a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('HTML content of a webpage'), making the purpose immediately understandable. It doesn't specifically differentiate from sibling tools like 'execute_js' or 'screenshot', but the core function is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'execute_js' or 'screenshot'. It doesn't mention prerequisites, limitations, or scenarios where this tool is preferred over others, leaving usage context entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

screenshotC

Take a screenshot of a webpage

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to
full_pageNoWhether to capture the full page or just the viewport
stepsNoComma-separated actions or sentences describing steps to take after page load (e.g., "click #submit, scroll down" or "Fill the login form and submit")

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It lacks details on permissions needed, potential rate limits, output format (e.g., image type), error handling, or whether it's a read-only or mutative operation, leaving significant gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste, front-loading the core purpose. Every word earns its place, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving webpage interaction and screenshot capture), no annotations, and no output schema, the description is incomplete. It fails to address critical context like what the output returns (e.g., image data or file path), error conditions, or behavioral nuances, leaving the agent under-informed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (url, full_page, steps). The description adds no additional meaning beyond implying webpage capture, which is redundant with the schema's details. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Take') and resource ('screenshot of a webpage'), making the purpose immediately understandable. It distinguishes from siblings like execute_js or get_html by focusing on visual capture rather than code execution or HTML retrieval, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 like get_html for content extraction or execute_js for interactive actions. The description implies usage for webpage capture but offers no context about prerequisites, limitations, or comparative scenarios with sibling tools.

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.

  1. 4 tool updates
    • First observedexecute_js
    • First observedget_console_logs
    • First observedget_html
    • First observedscreenshot

TDQS

A3.5/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: execute_js runs code, get_console_logs retrieves logs, get_html fetches content, and screenshot captures visual output. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case (e.g., execute_js, get_console_logs, get_html, screenshot). The naming is predictable and readable throughout.

Tool Count5/5

With 4 tools, this server is well-scoped for browser automation, covering key operations like executing scripts, retrieving logs, getting content, and taking screenshots. Each tool earns its place without being excessive or insufficient.

Completeness4/5

The tool set covers essential browser interactions for the domain, including execution, logging, content retrieval, and visualization. A minor gap exists in navigation or page manipulation tools (e.g., navigate, click), but core workflows are well-supported.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers