- Home
- MCP servers
- Midscene
Midscene
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"maurocor-mcp-midscene": {
"command": "npx",
"args": [
"-y",
"@midscene/mcp"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"MIDSCENE_MODEL_NAME": "gpt-4o-mini",
"MCP_SERVER_REQUEST_TIMEOUT": "800000"
}
}
}
}You can automate Playwright workflows and generate tests by using the MidScene MCP Server. It lets you describe tasks in natural language, and it translates them into automated actions and test artifacts that integrate with Playwright, backed by MidScene AI.
How to use
You interact with the MidScene MCP Server through an MCP client. Create a prompt that describes the automated flow you want, such as opening a page, filling fields, clicking buttons, and verifying outcomes. The server uses MidScene’s AI to interpret your instructions and orchestrate Playwright-based steps, producing tests and runnable commands.
Typical usage patterns include: describing a login test, outlining a multi-page user journey, or generating data-driven test cases. Provide any necessary context, such as the target URLs, selectors, and expected messages. The server will translate your prompt into an executable Playwright test flow and can export a ready-to-run test file in your project’s e2e folder.
How to install
Prerequisites: you need Node.js installed on your system (generally LTS version is recommended). You also need a valid API key for the AI model you intend to use.
Install dependencies for the project that contains the MCP server and your tests.
Configure the MCP server in your development environment to enable MidScene integration, then start sending prompts to generate tests and automate flows.
Install steps you will perform in your environment:
# Install dependencies
npm install
# or
yarn install
MCP configuration and usage notes
The MCP server is configured to run as a local process and take commands from an MCP client. The configuration shown here uses an npx-based stdio setup that runs the MidScene MCP package and provides environment variables for model selection, API access, and timeouts.
{
"mcpServers": {
"mcp_midscene": {
"command": "npx",
"args": ["-y", "@midscene/mcp"],
"env": {
"MIDSCENE_MODEL_NAME": "gpt-4o-mini",
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"MCP_SERVER_REQUEST_TIMEOUT": "800000"
}
}
}
}
Envío de prompts en el cliente MCP
Abre tu cliente MCP y crea un nuevo prompt con el texto que describe la acción o prueba que quieres realizar. Por ejemplo, puedes pedir que el sistema abra una página, complete un formulario y verifique un mensaje de error.
Después de ejecutar el prompt, el MCP Server generará un flujo de Playwright y, si corresponde, un archivo de prueba en la carpeta e2e de tu proyecto. Puedes exportar, guardar o adaptar ese contenido según tus necesidades.
Notas y recomendaciones
Asegúrate de mantener tus claves de API seguras y no las compartas públicamente. Proporciona solo la información necesaria en tus prompts para que la IA pueda generar el flujo correcto sin exponer datos sensibles.
Available tools
ai
General AI interaction to process prompts and determine actions.
aiTap
Click interaction to simulate tapping a UI element.
aiHover
Hover interaction to move the cursor over an element.
aiInput
Text input operation to fill fields.
aiKeyboardPress
Keyboard key press interactions.
aiScroll
Scroll or navigate within a page.
aiQuery
Query the AI for information or decisions during automation.
aiAssert
Assert or verify expected outcomes.
aiWaitFor
Wait for a condition or AI-driven event to occur.