This guide demonstrates how to use the AutoSpectra MCP server’s browser automation tools, including the newly added visible browser capabilities. These tools can be used in coordination with Cline’s browser_action tools to create powerful development, testing, and automation workflows.
The AutoSpectra MCP server provides the following browser automation tools:
Tool | Description | Visible Mode Support |
---|---|---|
navigate |
Navigate to a URL | ✅ |
click |
Click on an element | ✅ |
type |
Type text into an input field | ✅ |
extract |
Extract data from an element | ✅ |
screenshot |
Take a screenshot | ✅ |
checkAccessibility |
Run accessibility tests | ✅ |
All these tools now support a visible
parameter that, when set to true
, will force the browser to be visible regardless of the configuration settings.
use_mcp_tool({
server_name: "autospectra",
tool_name: "navigate",
arguments: {
url: "https://www.example.com",
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "click",
arguments: {
selector: "#login-button",
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "type",
arguments: {
selector: "#username",
text: "testuser",
clearFirst: true,
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "extract",
arguments: {
selector: ".result-message",
attribute: "textContent",
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "screenshot",
arguments: {
fullPage: true,
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "checkAccessibility",
arguments: {
includeHidden: false,
visible: true
}
});
You can create powerful workflows that combine AutoSpectra’s MCP tools with Cline’s browser_action:
// First, use Cline's browser_action for exploratory testing
browser_action({ action: "launch", url: "http://localhost:3000/login" });
browser_action({ action: "click", coordinate: "450,300" }); // Click on the form
browser_action({ action: "close" });
// Then, use AutoSpectra's MCP tools for automated testing
use_mcp_tool({
server_name: "autospectra",
tool_name: "navigate",
arguments: { url: "http://localhost:3000/login", visible: true }
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "type",
arguments: {
selector: "#username",
text: "testuser",
clearFirst: true,
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "type",
arguments: {
selector: "#password",
text: "password123",
clearFirst: true,
visible: true
}
});
use_mcp_tool({
server_name: "autospectra",
tool_name: "click",
arguments: {
selector: "#login-button",
visible: true
}
});
// Extract the result message
use_mcp_tool({
server_name: "autospectra",
tool_name: "extract",
arguments: {
selector: ".result-message",
visible: true
}
});
Start with visible browsers for debugging: When developing or debugging, use visible: true
to see what’s happening in real-time.
Switch to headless for production: Once your automation is stable, you can remove the visible
parameter for faster, headless execution.
Combine with Cline’s browser_action: Use Cline’s browser_action for exploratory testing and AutoSpectra’s MCP tools for programmatic testing.
Session management: Remember that browser sessions are managed automatically between MCP tool calls, but you should close browser_action sessions explicitly.
Self-healing selectors: Take advantage of AutoSpectra’s self-healing selectors for more robust automation compared to coordinate-based clicks.
If you encounter issues with visible browsers:
.env
file to ensure HEADLESS=false
is set.npm run build
after making changes.npm start
before attempting to use the tools.[DEBUG]
and [INFO]
messages about the headless setting.For more information about the different browser automation approaches and how they work together, refer to these additional documents: