@shiplightai/mcp2
MCP server for browser UI exploration. Provides tools to launch browser sessions, navigate pages, inspect the DOM, perform actions, and collect locators — designed for coding agents that explore UI then write Playwright tests with @shiplightai/sdk.
Installation
npm install -g @shiplightai/mcp2
Usage
Claude Code
Add to your Claude Code MCP config (~/.claude/settings.json):
{
"mcpServers": {
"shiplight": {
"command": "shiplight-mcp2"
}
}
}
Claude Desktop
Add to your Claude Desktop config:
{
"mcpServers": {
"shiplight": {
"command": "npx",
"args": ["-y", "@shiplightai/mcp2"]
}
}
}
Cursor / Windsurf
Add to your MCP config (.cursor/mcp.json or equivalent):
{
"mcpServers": {
"shiplight": {
"command": "npx",
"args": ["-y", "@shiplightai/mcp2"]
}
}
}
Tools
Session Management (5)
new_session | Launch a browser session with optional device emulation |
save_storage_state | Save cookies/localStorage for session reuse |
close_session | Close a browser session |
close_all | Close all browser sessions |
get_session_state | Get current URL and session type |
Browser Interaction (7)
navigate | Navigate to a URL |
get_page_info | Get page URL and title (lightweight) |
inspect_page | Screenshot + DOM with element indices |
act | Perform browser actions using element indices |
get_locator | Extract Playwright locator for an element |
update_variables | Set session variables for browser tasks |
clear_execution_history | Clear action history for a session |
Debug (4)
get_browser_console_logs | Get console logs (errors, warnings) |
get_browser_network_logs | Get network request logs |
clear_logs | Clear console and network logs |
get_artifact | Retrieve screenshots or DOM snapshots |
Resources
The server exposes two resources for coding agents:
shiplight://schemas/action-entity — Parameter docs for all browser actions
shiplight://docs/agent-sdk — API documentation for @shiplightai/sdk, including a workflow guide for turning UI exploration into test code
Workflow
- Explore — Use
inspect_page + act to navigate the app
- Collect locators — Use
get_locator on elements you want to test
- Write tests — Use the locators in Playwright tests, with
@shiplightai/sdk for AI-powered assertions and self-healing
import { test, expect } from '@playwright/test';
import { createAgent, configureSdk } from '@shiplightai/sdk';
configureSdk({ env: { GOOGLE_API_KEY: process.env.GOOGLE_API_KEY! } });
test('checkout flow', async ({ page }) => {
const agent = createAgent({ model: 'gemini-2.5-pro' });
await page.goto('https://myshop.example.com');
await page.getByRole('button', { name: 'Add to Cart' }).click();
await agent.assert(page, 'Item was added to cart');
await agent.run(page, 'Complete checkout with test data');
});
Environment Variables
WEB_AGENT_MODEL | gemini-2.5-pro | AI model for browser agent |
TERMINATION_TIMEOUT | (none) | Session auto-close timeout in ms |
License
MIT