Skip to content
VS Code

Selenium AI Agent for VS Code

io.github.learn-automated-testing/selenium-ai-agent

Selenium MCP: plan, generate and heal tests; pytest by default, any language; Selenium Grid

client:VS Code transport:stdio runtime:npm

Install Selenium AI Agent in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "selenium-headless",
      "description": "SELENIUM_HEADLESS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "selenium-mcp-toolsets",
      "description": "SELENIUM_MCP_TOOLSETS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "selenium-grid-url",
      "description": "SELENIUM_GRID_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "selenium-attach-cdp",
      "description": "SELENIUM_ATTACH_CDP",
      "password": true
    },
    {
      "type": "promptString",
      "id": "selenium-mcp-output-mode",
      "description": "SELENIUM_MCP_OUTPUT_MODE",
      "password": true
    }
  ],
  "servers": {
    "selenium-ai-agent": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "selenium-ai-agent"
      ],
      "env": {
        "SELENIUM_HEADLESS": "${input:selenium-headless}",
        "SELENIUM_MCP_TOOLSETS": "${input:selenium-mcp-toolsets}",
        "SELENIUM_GRID_URL": "${input:selenium-grid-url}",
        "SELENIUM_ATTACH_CDP": "${input:selenium-attach-cdp}",
        "SELENIUM_MCP_OUTPUT_MODE": "${input:selenium-mcp-output-mode}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Selenium AI Agent in other clients