The MCP Selenium Server enables browser automation through Model Context Protocol (MCP) clients, allowing you to control web browsers programmatically with standardized commands. It supports Chrome and Firefox browsers with features like element interaction, navigation, screenshots, and file uploads.
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 in Goose:
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 NPX in your configuration file 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": "find_element",
"parameters": {
"by": "id",
"value": "search-input",
"timeout": 5000
}
}
Supported locator strategies: id
, css
, xpath
, name
, tag
, class
{
"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": {
"outputPath": "/path/to/screenshot.png"
}
}
{
"tool": "close_session",
"parameters": {}
}
Here's a complete example of how to use the MCP Selenium Server to perform a Google search:
Start Chrome browser:
{
"tool": "start_browser",
"parameters": {
"browser": "chrome"
}
}
Navigate to Google:
{
"tool": "navigate",
"parameters": {
"url": "https://www.google.com"
}
}
Find and click the search box:
{
"tool": "click_element",
"parameters": {
"by": "name",
"value": "q"
}
}
Type a search term:
{
"tool": "send_keys",
"parameters": {
"by": "name",
"value": "q",
"text": "MCP Selenium automation"
}
}
Press Enter to search:
{
"tool": "press_key",
"parameters": {
"key": "Enter"
}
}
Take a screenshot of the results:
{
"tool": "take_screenshot",
"parameters": {}
}
Close the session:
{
"tool": "close_session",
"parameters": {}
}
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