Web automation and testing server using SHAFT Engine (Selenium-based)
0 installs
Trust: 34 — Low
Browser
Ask AI about SHAFT MCP
Powered by Claude · Grounded in docs
I know everything about SHAFT MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
SHAFT MCP Server Setup Guide
What is SHAFT MCP?
SHAFT MCP is a Model Context Protocol (MCP) server that enables Claude Desktop to perform web automation tasks using the SHAFT Engine (a Selenium-based test automation framework). This gives Claude powerful browser automation capabilities including:
Core Features
Browser Control: Launch Chrome, Firefox, Safari, or Edge browsers
Element Interaction: Click, hover, type, clear, drag-and-drop elements
AI-Enhanced Element Detection: Find elements by natural language descriptions
Uses STDIO transport for direct integration with Claude Desktop application. See setup instructions below.
2. Remote Deployment (Smithery & Web)
Uses HTTP/SSE transport for web-based access and remote hosting platforms like Smithery.ai, Railway, Render, etc.
📖 For Smithery and remote deployment instructions, see the comprehensive Smithery Deployment Guide which includes:
Step-by-step Smithery deployment
Local testing with Docker
10+ alternative hosting platforms comparison
Configuration options and best practices
Prerequisites
Claude Desktop App (latest version)
Java 25 (OpenJDK 25 or newer) - for JAR-based installation
OR Docker - for Docker-based installation
Maven (only if building from source)
Setup Instructions
You can install SHAFT MCP using either the JAR file or Docker container:
Option A: Using Docker (Recommended for Remote Browser Control)
When using Docker, SHAFT MCP can connect to a Selenium Server running on your host machine, allowing it to control browsers on your computer rather than inside the container.
Step 1: Set up Selenium Server on Host Machine
First, you need to run Selenium Server (Selenium Grid) on your host machine:
# Pull and run Selenium Grid Standalone with Chrome
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" \
selenium/standalone-chrome:latest
# Or for Firefox
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" \
selenium/standalone-firefox:latest
You can verify Selenium is running by visiting: http://localhost:4444
Optional: View the browser session in real-time at http://localhost:7900 (password: secret)
On Linux, --network=host lets the container use the host's network stack, so localhost resolves to the host machine
On macOS and Windows, Docker runs inside a VM, so --network=host does not expose the host's network. Use host.docker.internal instead, which Docker automatically resolves to the host machine's IP
If you're using Selenium Grid on a different port, update the REMOTE_DRIVER_ADDRESS accordingly
Option A (Alternative): Using Docker for Local Browser (Not Recommended)
If you want browsers to run inside the Docker container (not recommended due to limitations), you can use the basic configuration:
Replace /FULL/PATH/TO/SHAFT_MCP/ with the actual absolute path to your repository
Ensure the JAR file version matches what was built (check the target/ directory)
Use forward slashes / even on Windows, or double backslashes \\\\ for Windows paths
Verify Installation
Start Claude Desktop
Check MCP Server Status:
Go to File > Settings > Developer
Look for shaft-mcp in the MCP servers list
Confirm the status shows as running
Test the server with this prompt in Claude:
Use shaft-mcp to launch Chrome, navigate to google.com, search for "selenium webdriver", and get the page title.
Usage Examples
Once configured, you can use Claude to perform complex web automation tasks:
Basic Browser Control
Use shaft-mcp to:
1. Launch Firefox browser
2. Navigate to https://example.com
3. Get the page title and current URL
Element Interaction
Use shaft-mcp to:
1. Launch Chrome
2. Go to a login page
3. Find the username field and type "testuser"
4. Find the password field and type "testpass"
5. Click the login button
AI-Enhanced Element Detection
Use shaft-mcp to:
1. Open a browser and go to amazon.com
2. Click on the search box using AI
3. Type "laptop" in the search field
4. Click the search button using AI
Data Extraction
Use shaft-mcp to:
1. Navigate to a news website
2. Get all the article headlines
3. Extract the main content text
4. Generate a test report
Troubleshooting
Common Issues:
"No active browser session found"
Always initialize a browser first using driver_initialize
MCP Server not running
Verify the JAR file path is correct and absolute
Check that Java 25 is installed and accessible
Ensure Claude Desktop was restarted after config changes
Build failures
Verify Java 25 is installed: java -version
Ensure Maven is available: mvn -version
Try cleaning first: mvn clean
Element not found errors
Use AI-based element detection (element_click_ai, element_type_ai)
Try different locator strategies (CSS, XPath, ID, etc.)
Check if the element is visible with element_is_displayed
Docker container cannot connect to host Selenium Server
On Linux: Make sure you're using --network=host in the docker run arguments
On macOS and Windows: Ensure you're using host.docker.internal instead of localhost in REMOTE_DRIVER_ADDRESS (Docker Desktop on macOS/Windows runs in a VM so --network=host does not expose the host network)
Verify Selenium Server is running: curl http://localhost:4444/status
Check firewall settings aren't blocking port 4444
Make sure REMOTE_DRIVER_ADDRESS is set to the correct Selenium Server URL in the Docker configuration
Browser opens inside Docker container instead of on host
This happens when REMOTE_DRIVER_ADDRESS is not properly configured
Verify the environment variable is set in the Claude Desktop config
Check the SHAFT MCP logs to confirm remote configuration was detected
Advanced Configuration
You can add additional MCP servers alongside SHAFT MCP:
You can also use remote WebDriver with the JAR installation by setting environment variables before starting Claude Desktop:
On macOS/Linux:
export REMOTE_DRIVER_ADDRESS=http://localhost:4444/wd/hub
# Then start Claude Desktop
On Windows (PowerShell):
$env:REMOTE_DRIVER_ADDRESS="http://localhost:4444/wd/hub"
# Then start Claude Desktop
What This Enables
With SHAFT MCP configured, Claude can:
Automate web testing - Run comprehensive test suites on web applications
Perform web scraping - Extract data from websites with complex interactions
Automate repetitive tasks - Fill forms, upload files, navigate workflows
Generate test reports - Create detailed Allure reports with screenshots and logs
Cross-browser testing - Test across Chrome, Firefox, Safari, and Edge
AI-powered element detection - Find elements by description instead of technical locators
This essentially turns Claude into a powerful web automation assistant that can handle complex browser-based tasks that would normally require manual effort or custom scripting.