MCP Server Integration
Integrate the Donobu MCP server with your AI coding assistant to test features in real browsers as you develop them.
MCP Server Overview
The Donobu MCP (Model Context Protocol) server acts as a bridge between your AI IDE (like Cursor, Claude, or VS Code with Copilot) and Donobu Studio. It enables your AI assistant to test features of your application in a real browser while you're developing, and can generate Donobu-powered Playwright tests based on successful test runs.
Prerequisites
Before installing the MCP server, ensure you have:
- Donobu Studio desktop application installed and running
- An MCP-compatible AI IDE or coding assistant (Cursor, Claude, VS Code with Copilot, etc.)
- Node.js 18 or higher (for npm-based installation)
Installation
The easiest way to use the Donobu MCP server is via npx, which automatically downloads and runs the latest version without requiring manual installation or updates.
Donobu MCP Configuration
Add this configuration to your MCP configuration file:
{
"mcpServers": {
"donobu": {
"command": "npx",
"args": ["@donobu/mcp@latest"]
}
}
}
Configuration File Locations
The MCP configuration file location varies by client. Most support both a home directory configuration (applies to all projects) and project-specific configuration. Here are the locations of each for some popular MCP clients:
Claude Code (CLI and VS Code extension)
~/.claude.json(in your home directory).mcp.json(in a project directory)
Or just type this on the command line:
claude mcp add donobu -- npx @donobu/mcp@latest
Cursor
~/.cursor/mcp.json(in your home directory).cursor/mcp.json(in a project directory)
Or just click this link:
GitHub Copilot in VS Code
.vscode/mcp.json(in a project directory)
Or just type this on the command line:
code --add-mcp "{\"name\":\"donobu\",\"command\":\"npx\",\"args\":[\"@donobu/mcp@latest\"]}"
Or just click this link:
GitHub Copilot in JetBrains IDEs (WebStorm, IntelliJ, etc)
~/.config/github-copilot/intellij/mcp.json(in your home directory)
GitHub Copilot CLI
~/.copilot/mcp-config.json(in your home directory)
Or use the slash command /mcp add donobu. Then enter the following:
- Server Type:
[2] STDIO - Command:
npx @donobu/mcp@latest - Environment Variables: (leave blank)
- Tools: (leave
*)
Ctrl-S to save.
Codex
~/.codex/config.json(or~/.codex/config.toml, but this will be a slightly different format).mcp.json(in a project directory)
Example Use Cases
Build and test a new feature
Simply ask your AI assistant to implement a new feature and verify that it works as expected. Example prompt:
Add a "dark mode" feature to this app by adding a toggle to the page, and validate that it works correctly (the page is mostly dark, and all page elements are still legible).
Test an existing feature in your local development environment
You can also test existing features in your local development environment. Example prompt:
Test the login flow at http://localhost:3000/login. Enter valid credentials and verify the user is redirected to the dashboard.
Quickly and easily fix bugs
If you encounter a bug, you can quickly and easily fix it by asking your AI assistant to test the feature and fix the bug. Example prompt:
Fix the broken link in the footer labelled "Privacy Policy". Once fixed, verify that the link works correctly.
Once the bug is fixed, you can ask your AI assistant to save the test run as a Playwright test file, to prevent future regressions.
Create a new end-to-end test case
If you want to create a new AI-driven, self-healing Playwright test, you can ask your AI assistant to create a new test for a specific feature or user flow. Example prompt:
Create a new Donobu Playwright test to verify the onboarding flow for a new user. Save the test in the tests/onboarding folder.
Troubleshooting
MCP Server Not Connecting
Problem: The MCP server can't connect to Donobu Studio, or the MCP server itself is not running
Solutions:
- Verify Donobu Studio is running, and that you've added an API key for your favorite LLM provider.
- Verify you're editing the correct config file for your IDE.
- Check the MCP configuration file syntax. Some IDEs, such as VS Code, have a slightly different format ("servers" instead of "mcpServers").
- Restart your AI IDE, or start a new chat session, to ensure that it picks up any recently added MCP servers.
- Try
npx @donobu/mcp@latestdirectly on the command line to make sure it's downloading and installing correctly.
Tests Timeout
Problem: Tests take too long or timeout
Solutions:
- Break complex tests into smaller steps, and test each step individually.
- Use more specific instructions in your prompts.
- Check for slow page loads or network issues.
Advanced Configuration
Using a Specific Version
Pin to a specific version for stability:
{
"mcpServers": {
"donobu": {
"command": "npx",
"args": ["@donobu/mcp@2.1.3"]
}
}
}
Custom Donobu Studio Port
If Donobu Studio runs on a non-default port:
{
"mcpServers": {
"donobu": {
"command": "npx",
"args": ["@donobu/mcp@latest"],
"env": {
"DONOBU_API_URL": "http://localhost:YOUR_PORT"
}
}
}
}
