AgentHubAgentHub

browser-devtools-mcp

MCP ServerMCP Registry官方收录

io.github.serkan-ozal/browser-devtools-mcp · v0.9.1

Playwright browser & Node.js MCP. ARIA refs, screenshots, ref-based interactions.

概览

browser-devtools-mcp 是一个MCP Server,收录自 官方 MCP Registry。支持 streamable-http、stdio 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "browser-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "browser-devtools-mcp"
      ]
    }
  }
}

环境变量

PLATFORM可选

Platform: browser (default) or node for Node.js backend debugging.

PORT可选

Port for HTTP transport.

SESSION_IDLE_SECONDS可选

Idle session timeout (seconds).

SESSION_IDLE_CHECK_SECONDS可选

Interval for checking idle sessions (seconds).

SESSION_CLOSE_ON_SOCKET_CLOSE可选

Close session when socket closes.

CONSOLE_MESSAGES_BUFFER_SIZE可选

Maximum console messages to buffer.

HTTP_REQUESTS_BUFFER_SIZE可选

Maximum HTTP requests to buffer.

BROWSER_SERVER_INSTRUCTIONS_ENABLE可选

When true, include server instructions in MCP server info (browser platform). Default: true.

BROWSER_POLICY_UI_DEBUGGING_ENABLE可选

When true, include UI_DEBUGGING_POLICY in server policies (browser platform). Default: false.

BROWSER_HEADLESS_ENABLE可选

Run browser in headless mode.

BROWSER_PERSISTENT_ENABLE可选

Use persistent browser context (preserves cookies, localStorage, extensions).

BROWSER_CDP_ENDPOINT_URL可选

CDP attach: http(s) root or ws(s) URL. Resolves via /json/version, /json/list, or ws /devtools/browser (Chrome 136+). Mutually exclusive with BROWSER_PERSISTENT_ENABLE.

BROWSER_CDP_ENABLE可选

When true and no BROWSER_CDP_ENDPOINT_URL: probe 127.0.0.1:9222 then :9229 for CDP. Else use BROWSER_CDP_ENDPOINT_URL or default http://127.0.0.1:9222.

BROWSER_CDP_OPEN_INSPECT可选

On loopback CDP failure, if Chrome is running, open chrome://inspect/#remote-debugging. Default true. Set false to disable.

BROWSER_PERSISTENT_USER_DATA_DIR可选

Directory for persistent browser context user data.

BROWSER_USE_INSTALLED_ON_SYSTEM可选

Use system-installed Chrome browser instead of Playwright's bundled browser.

BROWSER_EXECUTABLE_PATH可选

Custom browser executable path.

BROWSER_CHROMIUM_SANDBOX可选

When false, launches Chromium with --no-sandbox. Required for Docker/Lambda/CI.

BROWSER_LAUNCH_ARGS可选

Extra Chromium launch args (comma-separated).

BROWSER_ALLOWED_DOMAINS可选

Comma-separated list of allowed hostnames. When set, all requests to non-matching hosts are aborted. Subdomains match automatically.

BROWSER_LOCALE可选

Browser locale (e.g., "en-US", "tr-TR").

OTEL_ENABLE可选

Enable OpenTelemetry integration.

OTEL_SERVICE_NAME可选

OpenTelemetry service name.

OTEL_SERVICE_VERSION可选

OpenTelemetry service version.

OTEL_ASSETS_DIR可选

Directory containing OpenTelemetry bundle files.

OTEL_INSTRUMENTATION_USER_INTERACTION_EVENTS可选

User interaction events to instrument (comma-separated, e.g., "click,submit").

OTEL_EXPORTER_TYPE可选

OpenTelemetry exporter type: "otlp/http", "console", or "none".

OTEL_EXPORTER_HTTP_URL可选

OpenTelemetry collector base URL (e.g., "http://localhost:4318").

OTEL_EXPORTER_HTTP_HEADERS可选secret

OpenTelemetry exporter HTTP headers (comma-separated key=value pairs).

AWS_REGION可选

AWS region for Bedrock usage.

AWS_PROFILE可选

AWS profile name for Bedrock usage.

AMAZON_BEDROCK_ENABLE可选

Enable Amazon Bedrock usage.

AMAZON_BEDROCK_IMAGE_EMBED_MODEL_ID可选

Amazon Bedrock image embedding model ID.

AMAZON_BEDROCK_TEXT_EMBED_MODEL_ID可选

Amazon Bedrock text embedding model ID.

AMAZON_BEDROCK_VISION_MODEL_ID可选

Amazon Bedrock vision model ID.

FIGMA_ACCESS_TOKEN可选secret

Figma API access token for design comparison.

FIGMA_API_BASE_URL可选

Figma API base URL.

DAEMON_PORT可选

Daemon mode port (CLI).

DAEMON_SESSION_IDLE_SECONDS可选

Daemon mode idle session timeout (seconds).

DAEMON_SESSION_IDLE_CHECK_SECONDS可选

Daemon mode idle session check interval (seconds).

NODE_SERVER_INSTRUCTIONS_ENABLE可选

When true, include server instructions in MCP server info (node platform). Default: true.

NODE_POLICY_DEBUGGING_ENABLE可选

When true, include NODE_DEBUGGING_POLICY in server policies (node platform). Default: false.

NODE_INSPECTOR_HOST可选

Inspector host for debug_connect when MCP runs in Docker (e.g. host.docker.internal). Default: 127.0.0.1.

TOOL_OUTPUT_SCHEMA_DISABLE可选

When true, omit tool output schema from MCP tool registration (can reduce token usage for some clients).

AVAILABLE_TOOL_DOMAINS可选

Comma-separated tool domains to enable (e.g. navigation,interaction,a11y,scenario). Unset = all tools. Browser: a11y, content, debug, figma, interaction, navigation, o11y, react, scenario, run, stub, sync. Node: debug, run.

WORKING_DIR可选

Working directory for project-level config (.browser-devtools-mcp/). Default: process.cwd().

SEARCH_STRATEGY可选

Search strategy: SIMPLE (default, minisearch + stemmer) or FTS5 (better-sqlite3, optional dep).

SCENARIO_SEARCH_STRATEGY可选

Override SEARCH_STRATEGY for scenario search only.

相关资源

统一 Manifest

{
  "id": "io.github.serkan-ozal/browser-devtools-mcp",
  "type": "mcp-server",
  "version": "0.9.1",
  "displayName": "browser-devtools-mcp",
  "description": "Playwright browser & Node.js MCP. ARIA refs, screenshots, ref-based interactions.",
  "repository": {
    "url": "https://github.com/serkan-ozal/browser-devtools-mcp",
    "source": "github"
  },
  "homepage": "https://github.com/serkan-ozal/browser-devtools-mcp",
  "distribution": {
    "packages": [
      {
        "registryType": "npm",
        "identifier": "browser-devtools-mcp",
        "version": "0.9.1",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "PLATFORM",
            "description": "Platform: browser (default) or node for Node.js backend debugging."
          },
          {
            "name": "PORT",
            "description": "Port for HTTP transport."
          },
          {
            "name": "SESSION_IDLE_SECONDS",
            "description": "Idle session timeout (seconds)."
          },
          {
            "name": "SESSION_IDLE_CHECK_SECONDS",
            "description": "Interval for checking idle sessions (seconds)."
          },
          {
            "name": "SESSION_CLOSE_ON_SOCKET_CLOSE",
            "description": "Close session when socket closes."
          },
          {
            "name": "CONSOLE_MESSAGES_BUFFER_SIZE",
            "description": "Maximum console messages to buffer."
          },
          {
            "name": "HTTP_REQUESTS_BUFFER_SIZE",
            "description": "Maximum HTTP requests to buffer."
          },
          {
            "name": "BROWSER_SERVER_INSTRUCTIONS_ENABLE",
            "description": "When true, include server instructions in MCP server info (browser platform). Default: true."
          },
          {
            "name": "BROWSER_POLICY_UI_DEBUGGING_ENABLE",
            "description": "When true, include UI_DEBUGGING_POLICY in server policies (browser platform). Default: false."
          },
          {
            "name": "BROWSER_HEADLESS_ENABLE",
            "description": "Run browser in headless mode."
          },
          {
            "name": "BROWSER_PERSISTENT_ENABLE",
            "description": "Use persistent browser context (preserves cookies, localStorage, extensions)."
          },
          {
            "name": "BROWSER_CDP_ENDPOINT_URL",
            "description": "CDP attach: http(s) root or ws(s) URL. Resolves via /json/version, /json/list, or ws /devtools/browser (Chrome 136+). Mutually exclusive with BROWSER_PERSISTENT_ENABLE."
          },
          {
            "name": "BROWSER_CDP_ENABLE",
            "description": "When true and no BROWSER_CDP_ENDPOINT_URL: probe 127.0.0.1:9222 then :9229 for CDP. Else use BROWSER_CDP_ENDPOINT_URL or default http://127.0.0.1:9222."
          },
          {
            "name": "BROWSER_CDP_OPEN_INSPECT",
            "description": "On loopback CDP failure, if Chrome is running, open chrome://inspect/#remote-debugging. Default true. Set false to disable."
          },
          {
            "name": "BROWSER_PERSISTENT_USER_DATA_DIR",
            "description": "Directory for persistent browser context user data."
          },
          {
            "name": "BROWSER_USE_INSTALLED_ON_SYSTEM",
            "description": "Use system-installed Chrome browser instead of Playwright's bundled browser."
          },
          {
            "name": "BROWSER_EXECUTABLE_PATH",
            "description": "Custom browser executable path."
          },
          {
            "name": "BROWSER_CHROMIUM_SANDBOX",
            "description": "When false, launches Chromium with --no-sandbox. Required for Docker/Lambda/CI."
          },
          {
            "name": "BROWSER_LAUNCH_ARGS",
            "description": "Extra Chromium launch args (comma-separated)."
          },
          {
            "name": "BROWSER_ALLOWED_DOMAINS",
            "description": "Comma-separated list of allowed hostnames. When set, all requests to non-matching hosts are aborted. Subdomains match automatically."
          },
          {
            "name": "BROWSER_LOCALE",
            "description": "Browser locale (e.g., \"en-US\", \"tr-TR\")."
          },
          {
            "name": "OTEL_ENABLE",
            "description": "Enable OpenTelemetry integration."
          },
          {
            "name": "OTEL_SERVICE_NAME",
            "description": "OpenTelemetry service name."
          },
          {
            "name": "OTEL_SERVICE_VERSION",
            "description": "OpenTelemetry service version."
          },
          {
            "name": "OTEL_ASSETS_DIR",
            "description": "Directory containing OpenTelemetry bundle files."
          },
          {
            "name": "OTEL_INSTRUMENTATION_USER_INTERACTION_EVENTS",
            "description": "User interaction events to instrument (comma-separated, e.g., \"click,submit\")."
          },
          {
            "name": "OTEL_EXPORTER_TYPE",
            "description": "OpenTelemetry exporter type: \"otlp/http\", \"console\", or \"none\"."
          },
          {
            "name": "OTEL_EXPORTER_HTTP_URL",
            "description": "OpenTelemetry collector base URL (e.g., \"http://localhost:4318\")."
          },
          {
            "name": "OTEL_EXPORTER_HTTP_HEADERS",
            "description": "OpenTelemetry exporter HTTP headers (comma-separated key=value pairs).",
            "isSecret": true
          },
          {
            "name": "AWS_REGION",
            "description": "AWS region for Bedrock usage."
          },
          {
            "name": "AWS_PROFILE",
            "description": "AWS profile name for Bedrock usage."
          },
          {
            "name": "AMAZON_BEDROCK_ENABLE",
            "description": "Enable Amazon Bedrock usage."
          },
          {
            "name": "AMAZON_BEDROCK_IMAGE_EMBED_MODEL_ID",
            "description": "Amazon Bedrock image embedding model ID."
          },
          {
            "name": "AMAZON_BEDROCK_TEXT_EMBED_MODEL_ID",
            "description": "Amazon Bedrock text embedding model ID."
          },
          {
            "name": "AMAZON_BEDROCK_VISION_MODEL_ID",
            "description": "Amazon Bedrock vision model ID."
          },
          {
            "name": "FIGMA_ACCESS_TOKEN",
            "description": "Figma API access token for design comparison.",
            "isSecret": true
          },
          {
            "name": "FIGMA_API_BASE_URL",
            "description": "Figma API base URL."
          },
          {
            "name": "DAEMON_PORT",
            "description": "Daemon mode port (CLI)."
          },
          {
            "name": "DAEMON_SESSION_IDLE_SECONDS",
            "description": "Daemon mode idle session timeout (seconds)."
          },
          {
            "name": "DAEMON_SESSION_IDLE_CHECK_SECONDS",
            "description": "Daemon mode idle session check interval (seconds)."
          },
          {
            "name": "NODE_SERVER_INSTRUCTIONS_ENABLE",
            "description": "When true, include server instructions in MCP server info (node platform). Default: true."
          },
          {
            "name": "NODE_POLICY_DEBUGGING_ENABLE",
            "description": "When true, include NODE_DEBUGGING_POLICY in server policies (node platform). Default: false."
          },
          {
            "name": "NODE_INSPECTOR_HOST",
            "description": "Inspector host for debug_connect when MCP runs in Docker (e.g. host.docker.internal). Default: 127.0.0.1."
          },
          {
            "name": "TOOL_OUTPUT_SCHEMA_DISABLE",
            "description": "When true, omit tool output schema from MCP tool registration (can reduce token usage for some clients)."
          },
          {
            "name": "AVAILABLE_TOOL_DOMAINS",
            "description": "Comma-separated tool domains to enable (e.g. navigation,interaction,a11y,scenario). Unset = all tools. Browser: a11y, content, debug, figma, interaction, navigation, o11y, react, scenario, run, stub, sync. Node: debug, run."
          },
          {
            "name": "WORKING_DIR",
            "description": "Working directory for project-level config (.browser-devtools-mcp/). Default: process.cwd()."
          },
          {
            "name": "SEARCH_STRATEGY",
            "description": "Search strategy: SIMPLE (default, minisearch + stemmer) or FTS5 (better-sqlite3, optional dep)."
          },
          {
            "name": "SCENARIO_SEARCH_STRATEGY",
            "description": "Override SEARCH_STRATEGY for scenario search only."
          }
        ]
      }
    ],
    "remotes": [
      {
        "transport": "streamable-http",
        "url": "https://{your_mcp_server_host}/mcp"
      }
    ]
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.serkan-ozal/browser-devtools-mcp",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.serkan-ozal%2Fbrowser-devtools-mcp/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
browser-devtools-mcp — MCP Server 安装与配置 · AgentHub