About
Run real Playwright E2E tests from your AI coding agent.
README
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.
What your agent can do
- Generate — describe a flow, get back a Markdown scenario ready to save and run
- Run — execute a saved scenario or ad-hoc Markdown against a real Chromium browser
- Inspect — fetch step-level pass/fail, error messages, and failure screenshot URLs
- List — browse saved scenarios visible to the API key
Requirements
- Node.js
>=18.17 - A project-scoped Assert key — get one at assert.click
Setup
1. 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.
Private URLs
Targets such as localhost, 127.0.0.1, and LAN or VPN IP addresses are blocked by default.
Use a public URL unless the machine executing the Assert run is intentionally configured to allow private targets with:
ALLOW_PRIVATE_TARGETS=true
Set that on the machine or process running Assert. Do not put it in assert.config.json.
Environment variables
ASSERT_API_KEY: API key (alternative to storing it inassert.config.json)ASSERT_PROJECT_ID: optional default project IDASSERT_CONFIG: optional path to a config file or directory
Config files
The MCP server will look for these files from the current directory upward:
assert.config.jsonassert.config.local.json
assert.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"
}
Tools
assert_generate
Generate 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: false)
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_run
Execute a saved scenario or ad-hoc Markdown in a real browser.
Input:
scenario_id?: stringmarkdown?: stringproject_id?: stringrequest_id?: string
Exactly one of scenario_id or markdown must be provided.
Returns:
{
"run_id": "run_123",
"status": "queued",
"estimated_duration_seconds": null
}
assert_status
Fetch step-level results for a run.
Input:
run_id: string
Returns:
{
"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_list
List saved scenarios visible to the API key.
Input:
project_id?: stringcursor?: stringlimit?: number
project_id is currently reserved for future filtering support. The current API lists all scenarios visible to the API key.
Returns:
{
"scenarios": [
{
"id": "scenario_123",
"name": "Login flow",
"project_id": null,
"last_run_status": "passed",
"last_run_at": "2026-03-31T10:00:00.000Z",
"url": "https://example.com/login"
}
],
"next_cursor": null
}
Errors
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_ERROR
License
MIT
Install Assert in Claude Desktop, Claude Code & Cursor
unyly install assertInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add assert --env ALLOW_PRIVATE_TARGETS="" --env ASSERT_CONFIG="" -- npx -y @assert-click/mcpStep-by-step: how to install Assert
FAQ
Is Assert MCP free?
Yes, Assert MCP is free — one-click install via Unyly at no cost.
Does Assert need an API key?
Yes, it requires environment variables: ALLOW_PRIVATE_TARGETS, ASSERT_CONFIG. Unyly injects them into the config during install.
Is Assert hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Assert in Claude Desktop, Claude Code or Cursor?
Open Assert on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Changes
Versions and requested access over time.
- New version published
- New version published
Related MCPs
Playwright
Browser automation, scraping, screenshots
by MicrosoftPuppeteer
Browser automation and web scraping.
by modelcontextprotocolopentabs-dev/opentabs
Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a
by opentabs-devrobhunter/agentdeals
1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan
by robhunterhlydecker/ucsc-genome-mcp
MCP server to interact with the UCSC Genome Browser API, letting you find genomes, chromosomes, and more.
by hlydecker34892002/bilibili-mcp-js
A MCP server that supports searching for Bilibili content. Provides LangChain integration examples and test scripts.
by 34892002achiya-automation/safari-mcp
Native Safari browser automation for AI agents with 80+ tools. No Chrome dependency, optimized for Apple Silicon with 60% less CPU overhead.
by achiya-automationagent-infra/mcp-server-browser
Browser automation capabilities using Puppeteer, both support local and remote browser connection.
by bytedanceaparajithn/agent-scraper-mcp
Web scraping MCP server for AI agents. 6 tools: clean content extraction, structured scraping with CSS selectors, full-page screenshots via Playwright, link ext
by aparajithnapireno/DOMShell
Browse the web using filesystem commands (ls, cd, grep, click). 38 MCP tools map Chrome's Accessibility Tree to a virtual filesystem via a Chrome Extension.
by apirenoCompare Assert with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All browse MCPs