An MCP implementation for Selenium WebDriver
A Model Context Protocol (MCP) server implementation for Selenium WebDriver, enabling browser automation through standardized MCP clients.
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
Selenium MCP
automates browser interactions
npx -y @angiejones/mcp-selenium
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": ["-y", "@angiejones/mcp-selenium"]
}
}
}
To work on this project:
npm install
npm start
To install MCP Selenium for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @angiejones/mcp-selenium --client claude
npm install -g @angiejones/mcp-selenium
Start the server by running:
mcp-selenium
Or use with NPX in your MCP configuration:
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": [
"-y",
"@angiejones/mcp-selenium"
]
}
}
}
Launches a browser session.
Parameters:
browser
(required): Browser to launch
options
: Browser configuration options
headless
: Run browser in headless mode
arguments
: Additional browser arguments
Example:
{
"tool": "start_browser",
"parameters": {
"browser": "chrome",
"options": {
"headless": true,
"arguments": ["--no-sandbox"]
}
}
}
Navigates to a URL.
Parameters:
url
(required): URL to navigate to
Example:
{
"tool": "navigate",
"parameters": {
"url": "https://www.example.com"
}
}
Finds an element on the page.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "find_element",
"parameters": {
"by": "id",
"value": "search-input",
"timeout": 5000
}
}
Clicks an element.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "click_element",
"parameters": {
"by": "css",
"value": ".submit-button"
}
}
Sends keys to an element (typing).
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
text
(required): Text to enter into the element
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "send_keys",
"parameters": {
"by": "name",
"value": "username",
"text": "testuser"
}
}
Gets the text() of an element.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "get_element_text",
"parameters": {
"by": "css",
"value": ".message"
}
}
Moves the mouse to hover over an element.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "hover",
"parameters": {
"by": "css",
"value": ".dropdown-menu"
}
}
Drags an element and drops it onto another element.
Parameters:
by
(required): Locator strategy for source element
value
(required): Value for the source locator strategy
targetBy
(required): Locator strategy for target element
targetValue
(required): Value for the target locator strategy
timeout
: Maximum time to wait for elements in milliseconds
Example:
{
"tool": "drag_and_drop",
"parameters": {
"by": "id",
"value": "draggable",
"targetBy": "id",
"targetValue": "droppable"
}
}
Performs a double click on an element.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "double_click",
"parameters": {
"by": "css",
"value": ".editable-text"
}
}
Performs a right click (context click) on an element.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "right_click",
"parameters": {
"by": "css",
"value": ".context-menu-trigger"
}
}
Simulates pressing a keyboard key.
Parameters:
key
(required): Key to press (e.g., ‘Enter’, ‘Tab’, ‘a’, etc.)
Example:
{
"tool": "press_key",
"parameters": {
"key": "Enter"
}
}
Uploads a file using a file input element.
Parameters:
by
(required): Locator strategy
value
(required): Value for the locator strategy
filePath
(required): Absolute path to the file to upload
timeout
: Maximum time to wait for element in milliseconds
Example:
{
"tool": "upload_file",
"parameters": {
"by": "id",
"value": "file-input",
"filePath": "/path/to/file.pdf"
}
}
Captures a screenshot of the current page.
Parameters:
outputPath
(optional): Path where to save the screenshot. If not provided, returns base64 data.
Example:
{
"tool": "take_screenshot",
"parameters": {
"outputPath": "/path/to/screenshot.png"
}
}
Closes the current browser session and cleans up resources.
Parameters: None required
Example:
{
"tool": "close_session",
"parameters": {}
}
MIT