angiejones mcp selenium

angiejones mcp selenium avatar

by angiejones

An MCP implementation for Selenium WebDriver

What is angiejones mcp selenium

MCP Selenium Server

smithery badge

A Model Context Protocol (MCP) server implementation for Selenium WebDriver, enabling browser automation through standardized MCP clients.

Video Demo (Click to Watch)

Watch the video

Features

  • Start browser sessions with customizable options
  • Navigate to URLs
  • Find elements using various locator strategies
  • Click, type, and interact with elements
  • Perform mouse actions (hover, drag and drop)
  • Handle keyboard input
  • Take screenshots
  • Upload files
  • Support for headless mode

Supported Browsers

  • Chrome
  • Firefox

Use with Goose

Option 1: One-click install

Copy and paste the link below into a browser address bar to add this extension to goose desktop:

goose://extension?cmd=npx&arg=-y&arg=%40angiejones%2Fmcp-selenium&id=selenium-mcp&name=Selenium%20MCP&description=automates%20browser%20interactions

Option 2: Add manually to desktop or CLI

  • Name: Selenium MCP
  • Description: automates browser interactions
  • Command: npx -y @angiejones/mcp-selenium

Use with other MCP clients (e.g. Claude Desktop, etc)

{
  "mcpServers": {
    "selenium": {
      "command": "npx",
      "args": ["-y", "@angiejones/mcp-selenium"]
    }
  }
}

Development

To work on this project:

  1. Clone the repository
  2. Install dependencies: npm install
  3. Run the server: npm start

Installation

Installing via Smithery

To install MCP Selenium for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @angiejones/mcp-selenium --client claude

Manual Installation

npm install -g @angiejones/mcp-selenium

Usage

Start the server by running:

mcp-selenium

Or use with NPX in your MCP configuration:

{
  "mcpServers": {
    "selenium": {
      "command": "npx",
      "args": [
        "-y",
        "@angiejones/mcp-selenium"
      ]
    }
  }
}

Tools

start_browser

Launches a browser session.

Parameters:

  • browser (required): Browser to launch
    • Type: string
    • Enum: ["chrome", "firefox"]
  • options: Browser configuration options
    • Type: object
    • Properties:
      • headless: Run browser in headless mode
        • Type: boolean
      • arguments: Additional browser arguments
        • Type: array of strings

Example:

{
  "tool": "start_browser",
  "parameters": {
    "browser": "chrome",
    "options": {
      "headless": true,
      "arguments": ["--no-sandbox"]
    }
  }
}

navigate

Navigates to a URL.

Parameters:

  • url (required): URL to navigate to
    • Type: string

Example:

{
  "tool": "navigate",
  "parameters": {
    "url": "https://www.example.com"
  }
}

find_element

Finds an element on the page.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "find_element",
  "parameters": {
    "by": "id",
    "value": "search-input",
    "timeout": 5000
  }
}

click_element

Clicks an element.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "click_element",
  "parameters": {
    "by": "css",
    "value": ".submit-button"
  }
}

send_keys

Sends keys to an element (typing).

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • text (required): Text to enter into the element
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "send_keys",
  "parameters": {
    "by": "name",
    "value": "username",
    "text": "testuser"
  }
}

get_element_text

Gets the text() of an element.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "get_element_text",
  "parameters": {
    "by": "css",
    "value": ".message"
  }
}

hover

Moves the mouse to hover over an element.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "hover",
  "parameters": {
    "by": "css",
    "value": ".dropdown-menu"
  }
}

drag_and_drop

Drags an element and drops it onto another element.

Parameters:

  • by (required): Locator strategy for source element
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the source locator strategy
    • Type: string
  • targetBy (required): Locator strategy for target element
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • targetValue (required): Value for the target locator strategy
    • Type: string
  • timeout: Maximum time to wait for elements in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "drag_and_drop",
  "parameters": {
    "by": "id",
    "value": "draggable",
    "targetBy": "id",
    "targetValue": "droppable"
  }
}

double_click

Performs a double click on an element.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "double_click",
  "parameters": {
    "by": "css",
    "value": ".editable-text"
  }
}

right_click

Performs a right click (context click) on an element.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "right_click",
  "parameters": {
    "by": "css",
    "value": ".context-menu-trigger"
  }
}

press_key

Simulates pressing a keyboard key.

Parameters:

  • key (required): Key to press (e.g., 'Enter', 'Tab', 'a', etc.)
    • Type: string

Example:

{
  "tool": "press_key",
  "parameters": {
    "key": "Enter"
  }
}

upload_file

Uploads a file using a file input element.

Parameters:

  • by (required): Locator strategy
    • Type: string
    • Enum: ["id", "css", "xpath", "name", "tag", "class"]
  • value (required): Value for the locator strategy
    • Type: string
  • filePath (required): Absolute path to the file to upload
    • Type: string
  • timeout: Maximum time to wait for element in milliseconds
    • Type: number
    • Default: 10000

Example:

{
  "tool": "upload_file",
  "parameters": {
    "by": "id",
    "value": "file-input",
    "filePath": "/path/to/file.pdf"
  }
}

take_screenshot

Captures a screenshot of the current page.

Parameters:

  • outputPath (optional): Path where to save the screenshot. If not provided, returns base64 data.
    • Type: string

Example:

{
  "tool": "take_screenshot",
  "parameters": {
    "outputPath": "/path/to/screenshot.png"
  }
}

close_session

Closes the current browser session and cleans up resources.

Parameters: None required

Example:

{
  "tool": "close_session",
  "parameters": {}
}

License

MIT

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP 服务器,用于管理桌面图片、查看详情、压缩、移动等(完全让Trae实现)

mcp
zhixiaoqiang antd components mcp avatar

zhixiaoqiang antd components mcp

An MCP service for Ant Design components query | 一个减少 Ant Design 组件代码生成幻觉的 MCP 服务,包含系统提示词、组件文档、API 文档、代码示例和更新日志查询

designantdapi

Submit Your MCP Server

Share your MCP server with the community

Submit Now