Save login state
save_login_stateLog in once by executing login-page steps, then save browser cookies and storage to a JSON file for reuse as storage state in other tools and Playwright tests.
Instructions
Log in once by running steps on a login page, then save the browser's cookies and storage to .qa-mcp/auth/.json. Pass that file as session.storage_state to other tools, or to Playwright's storageState in tests. Put passwords in environment variables and reference them as ${ENV:NAME}; never pass them literally. The saved file contains session tokens: keep .qa-mcp/auth out of version control.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"steps": "<steps>"
},
"name": "save_login_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Login page URL | |
| name | No | default | |
| steps | Yes | ||
| device | No | Emulate a device for mobile web: a Playwright device name such as "iPhone 15" or "Pixel 7" (list_devices), or "desktop" (default) | |
| success_locator | No | Locator that must be visible after login, e.g. page.getByRole('heading', { name: 'My account' }) |