The MCP Selenium Server enables browser automation through standardized Model Context Protocol (MCP) clients, providing a convenient way to control Chrome, Firefox, and Edge browsers for automated testing and web interactions.
Copy and paste this link into your browser address bar to add the extension to Goose Desktop:
goose://extension?cmd=npx&arg=-y&arg=%40angiejones%2Fmcp-selenium&id=selenium-mcp&name=Selenium%20MCP&description=automates%20browser%20interactions
Add these details to Goose Desktop or CLI:
Selenium MCP
automates browser interactions
npx -y @angiejones/mcp-selenium
Add this configuration to your MCP client settings:
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": ["-y", "@angiejones/mcp-selenium"]
}
}
}
You can install the package globally:
npm install -g @angiejones/mcp-selenium
Run the server directly if installed globally:
mcp-selenium
Or use with NPX in your MCP configuration as shown in the installation section.
{
"tool": "start_browser",
"parameters": {
"browser": "chrome",
"options": {
"headless": true,
"arguments": ["--no-sandbox"]
}
}
}
{
"tool": "navigate",
"parameters": {
"url": "https://www.example.com"
}
}
{
"tool": "close_session",
"parameters": {}
}
{
"tool": "find_element",
"parameters": {
"by": "id",
"value": "search-input",
"timeout": 5000
}
}
{
"tool": "click_element",
"parameters": {
"by": "css",
"value": ".submit-button"
}
}
{
"tool": "send_keys",
"parameters": {
"by": "name",
"value": "username",
"text": "testuser"
}
}
{
"tool": "get_element_text",
"parameters": {
"by": "css",
"value": ".message"
}
}
{
"tool": "hover",
"parameters": {
"by": "css",
"value": ".dropdown-menu"
}
}
{
"tool": "drag_and_drop",
"parameters": {
"by": "id",
"value": "draggable",
"targetBy": "id",
"targetValue": "droppable"
}
}
{
"tool": "double_click",
"parameters": {
"by": "css",
"value": ".editable-text"
}
}
{
"tool": "right_click",
"parameters": {
"by": "css",
"value": ".context-menu-trigger"
}
}
{
"tool": "press_key",
"parameters": {
"key": "Enter"
}
}
{
"tool": "upload_file",
"parameters": {
"by": "id",
"value": "file-input",
"filePath": "/path/to/file.pdf"
}
}
{
"tool": "take_screenshot",
"parameters": {}
}
You can also specify an output path:
{
"tool": "take_screenshot",
"parameters": {
"outputPath": "/path/to/screenshot.png"
}
}
When finding elements, you can use these locator strategies:
For example, to find an element by ID:
{
"by": "id",
"value": "login-button"
}
Or to find an element using CSS selectors:
{
"by": "css",
"value": ".navbar .dropdown-toggle"
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "selenium" '{"command":"npx","args":["-y","@angiejones/mcp-selenium"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": [
"-y",
"@angiejones/mcp-selenium"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": [
"-y",
"@angiejones/mcp-selenium"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect