shaft-mcp — Claude Code MCP server: browser automation
An MCP server for browser automation and offline failure diagnosis. Useful when an agent writes or fixes SHAFT tests.
claude mcp add shaft-mcp -- docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024What shaft-mcp does
shaft-mcp hands an AI agent SHAFT's tooling: running browser scenarios, taking screenshots, and diagnosing why a test failed without touching the network. It sits on top of SHAFT_ENGINE, which manages Selenium and Appium drivers, synchronizes actions, and produces an Allure report for every run.
The server runs in a container, so Docker has to be present before the first call. Setup is one command — the agent pulls the image and talks to it over stdio. Inside are the same tools listed in SHAFT's MCP tools reference, plus CLI commands for people who prefer the terminal.
Failure diagnosis is offline and deterministic: the result does not depend on whether the network is reachable at the moment of analysis. That matters in CI, where external services are often down. If your tests are Java and already built with Maven, there is nothing extra to configure — the server works against the same project.
What it helps with
- run a browser scenario from a chat with the agent
- capture a screenshot at a specific step
- diagnose a failed test without network access
- produce an Allure report for a run
- wire SHAFT tooling into an agent inside a container
Example prompts for the agent
- Run the SHAFT browser test for the login page and show me the screenshot
- Diagnose why the last test failed and suggest a fix
- Generate the Allure report for the last
mvn testrun
How to install shaft-mcp
Platform CLI
claude mcp add shaft-mcp -- docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024Platform CLI
codex mcp add shaft-mcp -- docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024Config file
{
"mcpServers": {
"shaft-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024"
]
}
}
}Config file
{
"servers": {
"shaft-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024"
]
}
}
}Platform CLI
gemini mcp add shaft-mcp docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about shaft-mcp
How do I install shaft-mcp in Claude?
With one command: claude mcp add shaft-mcp -- docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024. Docker must be installed and running.
What does shaft-mcp do?
It gives the agent SHAFT tools for browser automation, screenshots, and offline diagnosis of failed tests.
Do I need SHAFT_ENGINE in my project?
Yes, the server works with the SHAFT_ENGINE engine. If your tests already build with Maven using the io.github.shafthq:shaft-engine dependency, no extra setup is needed.