Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
OPENAI_API_KEY | Yes | Your OpenAI API key | |
MIDSCENE_MODEL_NAME | No | The OpenAI model to use | gpt-4o-mini |
MCP_SERVER_REQUEST_TIMEOUT | No | Timeout for MCP server requests in milliseconds | 800000 |
Schema
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
midscene_playwright_example | Provides Playwright code examples for Midscene. If users need to generate Midscene test cases, they can call this method to get sample Midscene Playwright test cases for generating end-user test cases. Each step must first be verified using the mcp method, and then the final test case is generated based on the playwright example according to the steps executed by mcp |
midscene_navigate | Navigates the browser to the specified URL. Always opens in the current tab. |
midscene_get_tabs | Retrieves a list of all open browser tabs, including their ID, title, and URL. |
midscene_set_active_tab | Switches the browser's focus to the tab specified by its ID. Use midscene_get_tabs first to find the correct tab ID. |
midscene_aiWaitFor | Waits until a specified condition, described in natural language, becomes true on the page. Polls the condition using AI. |
midscene_aiAssert | Asserts that a specified condition, described in natural language, is true on the page. Polls the condition using AI. |
midscene_aiKeyboardPress | Presses a specific key on the keyboard. |
midscene_screenshot | Captures a screenshot of the currently active browser tab and saves it with the given name. |
midscene_aiTap | Locates and clicks an element on the current page based on a natural language description (selector). |
midscene_aiScroll | Scrolls the page or a specified element. Can scroll by a fixed amount or until an edge is reached. |
midscene_aiInput | Inputs text into a specified form field or element identified by a natural language selector. |
midscene_aiHover | Moves the mouse cursor to hover over an element identified by a natural language selector. |