lastest — Claude Code MCP server: visual regression from the agent
Wires your agent to a Lastest instance so it can run visual tests, read screenshot diffs and approve baseline images without leaving the chat.
claude mcp add mcp-server -- npx -y @lastest/mcp-serverWhat lastest does
The server talks MCP over stdio and exposes 20 tools, all named with a lastest_ prefix. CRUD-heavy ones are folded into resource tools that take an action or scope field: lastest_repo handles repositories and their Playwright settings, lastest_test reads and edits individual tests, lastest_area keeps functional groupings, lastest_status reports connectivity and background jobs. Workflow steps stay separate: lastest_run_tests kicks off a build, lastest_heal_test lets the AI healer repair a failing test, lastest_decide_diff approves or rejects images, lastest_validate_diff runs only what the change touches and returns a verdict.
Two launch arguments are mandatory: --url pointing at your Lastest instance and --api-key. Create the key in the Lastest UI under Settings → Runners & API Access → Create API Key. It is displayed once, so copy it right away or issue another.
The scope goes past diff review. An agent can author tests from a URL or a written prompt, maintain saved storageState() blobs and shared setup scripts, publish and revoke /r/<slug> share links, and pull coverage or QA summaries for a repository. Runs can be started with video recording enabled. Every tool answers with a structured payload carrying status, a summary and details.
What it helps with
- run visual tests from an agent chat
- review screenshot diffs and approve baselines
- auto-fix a failing test with AI
- pull repo coverage and QA summaries
- publish a public share link for a build
Example prompts for the agent
- Run the tests in the repo and list what failed
- Show the diffs from the last build and approve the ones where only spacing moved
- Heal the
checkout-flowtest based on its latest run
How to install lastest
Platform CLI
claude mcp add mcp-server -- npx -y @lastest/mcp-serverPlatform CLI
codex mcp add mcp-server -- npx -y @lastest/mcp-serverConfig file
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@lastest/mcp-server"
]
}
}
}Config file
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@lastest/mcp-server"
]
}
}
}Platform CLI
gemini mcp add mcp-server npx -y @lastest/mcp-serverStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about lastest
How do I install lastest in Claude Code?
Run claude mcp add mcp-server -- npx -y @lastest/mcp-server and pass --url plus --api-key for your instance at launch. claude mcp list confirms the connection.
What does lastest do?
It gives an agent access to your Lastest instance: starting visual tests, inspecting screenshot diffs, approving baselines, and managing tests and build share links.
What does the server need to run?
A Lastest instance URL and an API key generated in Settings → Runners & API Access. The key is shown once, so save it immediately.