loading…
Search for a command to run...
loading…
Run real Playwright E2E tests from your AI coding agent.
Run real Playwright E2E tests from your AI coding agent.
MCP server for Assert — lets your AI coding agent generate, run, and inspect E2E tests without leaving the chat.
Describe a user flow in plain English. Assert generates a Playwright test, executes it in a real browser, and returns step-level results and failure screenshots — all from a single tool call in Cursor, Claude, Windsurf, or any MCP-compatible agent.
Sign up free at assert.click to get your API key and project ID before using this package.
>=18.171. Create assert.config.json in your repo:
{
"projectApiKey": "assert_project_key_here",
"projectId": "project_123"
}
2. Add the MCP server to your agent config:
{
"mcpServers": {
"assert": {
"command": "npx",
"args": ["-y", "@assert-click/mcp"],
"env": {
"ASSERT_CONFIG": "/absolute/path/to/assert.config.json"
}
}
}
}
That's it. Your agent now has access to all four Assert tools.
ASSERT_API_KEY: API key (alternative to storing it in assert.config.json)ASSERT_PROJECT_ID: optional default project IDASSERT_CONFIG: optional path to a config file or directoryThe MCP server will look for these files from the current directory upward:
assert.config.jsonassert.config.local.jsonassert.config.local.json is merged on top of assert.config.json.
If you prefer env-based secrets instead of committing the key:
{
"projectApiKeyEnv": "ASSERT_API_KEY",
"projectId": "project_123"
}
assert_generateGenerate a Markdown scenario from a plain-English description.
Input:
description: string — what the user should be able to dourl: string — the starting URLproject_id?: stringsave?: boolean — save to the project (default: true)Returns:
{
"scenario_id": "scenario_123",
"markdown": "URL: https://example.com/login\nSCENARIO: Login\nPROCESS:\n - Fill \"email\" with \"[email protected]\"\nEXPECT: Dashboard",
"saved": true
}
assert_runExecute a saved scenario or ad-hoc Markdown in a real browser.
Input:
scenario_id?: stringmarkdown?: stringproject_id?: stringrequest_id?: stringExactly one of scenario_id or markdown must be provided.
Returns:
{
"run_id": "run_123",
"status": "queued",
"estimated_duration_seconds": null
}
assert_statusFetch step-level results for a run.
Input:
run_id: stringReturns:
{
"run_id": "run_123",
"status": "passed",
"duration_ms": 4200,
"steps": [
{
"description": "Fill email",
"status": "passed",
"error": null,
"screenshot_url": null
}
],
"failure_summary": null,
"full_log_url": null
}
assert_listList saved scenarios for a project.
Input:
project_id?: stringcursor?: stringlimit?: numberReturns:
{
"scenarios": [
{
"id": "scenario_123",
"name": "Login flow",
"project_id": "project_123",
"last_run_status": "passed",
"last_run_at": "2026-03-31T10:00:00.000Z",
"url": "https://example.com/login"
}
],
"next_cursor": null
}
Errors are returned as structured JSON:
{
"error": {
"code": "INVALID_API_KEY",
"message": "The ASSERT_API_KEY is invalid or missing.",
"field": null
}
}
Common codes:
INVALID_API_KEYSCENARIO_NOT_FOUNDRUN_NOT_FOUNDVALIDATION_ERRORUPSTREAM_ERRORMIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"assert": {
"command": "npx",
"args": []
}
}
}