|
| 1 | +--- |
| 2 | +description: "The recommended MCP servers and tools for using QIT with AI coding agents. Covers Playwright MCP for browser observation, Xdebug MCP for PHP debugging, and how they work together in a typical test development workflow." |
| 3 | +--- |
| 4 | + |
| 5 | +# Recommended Tools |
| 6 | + |
| 7 | +These MCP servers give your AI agent direct access to the browser and PHP runtime, making it significantly more effective at writing tests, debugging failures, and investigating issues. |
| 8 | + |
| 9 | +## Playwright MCP |
| 10 | + |
| 11 | +[Playwright MCP](https://github.com/anthropics/playwright-mcp) lets your agent control a real browser: navigate pages, read the accessibility tree, take screenshots, fill forms, and click elements. Essential for writing test packages and debugging test failures. |
| 12 | + |
| 13 | +Your agent uses it to: |
| 14 | +- Explore your extension's admin and frontend UI before writing tests |
| 15 | +- Observe exact accessible names and page structure for reliable selectors |
| 16 | +- Debug failing tests by navigating to the failing page and inspecting what's actually there |
| 17 | + |
| 18 | +See [Browser Observation](./test-packages/browser-observation.md) for the detailed workflow. |
| 19 | + |
| 20 | +## Xdebug MCP |
| 21 | + |
| 22 | +[Xdebug MCP](https://github.com/kpanuragh/xdebug-mcp) lets your agent do PHP step debugging conversationally: set breakpoints, step through code, inspect variables, and evaluate expressions. No IDE needed. |
| 23 | + |
| 24 | +Your agent uses it to: |
| 25 | +- Set breakpoints in plugin code and step through execution |
| 26 | +- Inspect variable state at runtime to understand behavior |
| 27 | +- Trace function calls to find where things go wrong |
| 28 | + |
| 29 | +Pair it with QIT's built-in Xdebug support: |
| 30 | + |
| 31 | +```qitbash |
| 32 | +qit env:up --xdebug --plugin=your-extension |
| 33 | +``` |
| 34 | + |
| 35 | +See [Xdebug Debugging](../environment/xdebug.md) for environment setup and configuration. |
| 36 | + |
| 37 | +## How They Work Together |
| 38 | + |
| 39 | +A typical AI-driven test development workflow uses all three tools: |
| 40 | + |
| 41 | +1. **QIT CLI** starts the environment and runs tests |
| 42 | +2. **Playwright MCP** observes the UI to discover selectors and verify behavior |
| 43 | +3. **Xdebug MCP** debugs PHP when something unexpected happens server-side |
| 44 | + |
| 45 | +For example, when a test fails because checkout doesn't complete: |
| 46 | +- Your agent uses Playwright MCP to navigate to checkout and see the current UI state |
| 47 | +- If the UI looks correct but the order still fails, it uses Xdebug MCP to set a breakpoint in the payment processing code and step through it |
| 48 | +- Once it finds the issue, it fixes the code and uses QIT CLI to re-run the test |
| 49 | + |
| 50 | +This is the workflow described in detail in [Writing Test Packages with AI](./test-packages/writing-with-agents.md). |
0 commit comments