Midscene provides a MCP server that allows AI assistants to control browsers, automate web tasks and write automation scripts for Midscene.
MCP (Model Context Protocol) is a standardized way for AI models to interact with external tools and capabilities. MCP servers expose a set of tools that AI models can invoke to perform various tasks. In Midscene's case, these tools allow AI models to control browsers, navigate web pages, interact with UI elements, and more.
Generate Midscene test cases for the Sauce Demo site
Add the Midscene MCP server to your MCP configuration:
For more information about configuring AI models, see Choosing an AI Model.
Midscene MCP provides the following browser automation tools:
Category | Tool Name | Description |
---|---|---|
Navigation | midscene_navigate | Navigate to a specified URL in the current tab |
Tab Management | midscene_get_tabs | Get a list of all open browser tabs |
midscene_set_active_tab | Switch to a specific tab by ID | |
Page Interaction | midscene_aiTap | Click on an element described in natural language |
midscene_aiInput | Input text into a form field or element | |
midscene_aiHover | Hover over an element | |
midscene_aiKeyboardPress | Press a specific keyboard key | |
midscene_aiScroll | Scroll the page or a specific element | |
Verification and Observation | midscene_aiWaitFor | Wait for a condition to be true on the page |
midscene_aiAssert | Assert that a condition is true on the page | |
midscene_screenshot | Take a screenshot of the current page | |
Playwright Code Example | midscene_playwright_example | Provides Playwright code examples for Midscene |
midscene_get_tabs: Get a list of all open browser tabs, including their IDs, titles, and URLs
midscene_set_active_tab: Switch to a specific tab by ID
midscene_aiTap: Click on an element described in natural language
midscene_aiInput: Input text into a form field or element
midscene_aiHover: Hover over an element
midscene_aiKeyboardPress: Press a specific keyboard key
midscene_aiScroll: Scroll the page or a specific element
midscene_aiWaitFor: Wait for a condition to be true on the page
midscene_aiAssert: Assert that a condition is true on the page
midscene_screenshot: Take a screenshot of the current page
Problem description
When users simultaneously use Midscene MCP in multiple local clients (Claude Desktop, Cursor MCP, etc.), port conflicts may occur causing server errors
Solution
After each task execution, a Midscene task report is generated. You can open this HTML report directly from the command line: