# shaft-mcp

An MCP server for browser automation and offline failure diagnosis. Useful when an agent writes or fixes SHAFT tests.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 417
- Author: ShaftHQ
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ShaftHQ/SHAFT_ENGINE
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/shaft-mcp

## What it 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.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add shaft-mcp -- docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024
```

### Codex

**Platform CLI**
```bash
codex mcp add shaft-mcp -- docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "shaft-mcp": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "shaft-mcp": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add shaft-mcp docker run -i --rm ghcr.io/shafthq/shaft-engine-mcp:10.4.20261024
```

## When to use it
- 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
- 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 test` run

## Similar
- [migrate](https://affpapa.org/en/nevibecode/skills/migrate.md) — skill · 1586 installs
- [selenium-automation](https://affpapa.org/en/nevibecode/skills/selenium-automation.md) — skill · 1200 installs
- [e2e-testing-automation](https://affpapa.org/en/nevibecode/skills/e2e-testing-automation.md) — skill · 689 installs
- [selenium-skill](https://affpapa.org/en/nevibecode/skills/selenium-skill.md) — skill · 310 installs
- [firecrawl-qa](https://affpapa.org/en/nevibecode/skills/firecrawl-qa.md) — skill · 31400 installs
- [playwright-in-sandbox](https://affpapa.org/en/nevibecode/skills/playwright-in-sandbox.md) — skill · 508 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
