Anchor provides a hosted Model Context Protocol (MCP) integration, allowing you to use browser automation directly from your preferred AI tools without any local setup. Our hosted MCP server runs on our infrastructure and is available to all users with an Anchor API key.This enables seamless browser control from Cursor, VS Code, Claude, ChatGPT, and other MCP-compatible tools without managing any local dependencies.
Model Context Protocol (MCP) is an open standard that allows AI assistants to interact with external tools and data sources.In our case, it enables AI-powered tools to access and control our browser automation capabilities directly within your IDE, agent apps, or CI/CD pipelines.
Other MCP-compatible tools follow about the same pattern.The MCP server runs on our servers (https://api.anchorbrowser.io/mcp), and is available to all users providing their Anchor API Key.
If you don’t have your Anchor API key yet, you can get it from Anchor UI.
You should now see Anchor MCP server in the list of MCP servers in Cursor. It should say ‘24 tools enabled’. If you don’t see it, disable and re-enable Anchor MCP server, or wait a little longer.
- You are a playwright test generator.- You are given a scenario and you need to generate a playwright test for it.- DO NOT generate test code based on the scenario alone. - DO run steps one by one using the tools provided by the Anchor Browser Agent MCP.- Only after all steps are completed, emit a Playwright TypeScript test that uses @playwright/test based on message history- Save generated test file in the tests directory- Execute the test file and iterate until the test passesGenerate a Playwright test for the following scenario:1. Navigate to https://www.imdb.com/2. search for 'Garfield'3. return the director of the last movie
Show garfield-test.spec.ts File
That is the generated test file:
Copy
Ask AI
import { test, expect } from '@playwright/test';test('Find director of the last Garfield movie', async ({ page }) => { // Step 1: Navigate to IMDB await page.goto('https://www.imdb.com/'); // Verify we're on the IMDB homepage await expect(page).toHaveTitle(/IMDb/); // Step 2: Search for 'Garfield' // Click on the search box await page.getByTestId('suggestion-search').click(); // Type 'Garfield' into the search box await page.getByTestId('suggestion-search').fill('Garfield'); // Submit the search await page.getByRole('button', { name: 'Submit search' }).click(); // Verify we're on the search results page await expect(page).toHaveURL(/\/find\/\?q=Garfield/); await expect(page).toHaveTitle(/Find - IMDb/); // Step 3: Click on the most recent Garfield movie (The Garfield Movie 2024) await page.getByRole('link', { name: 'The Garfield Movie' }).click(); // Verify we're on the movie page await expect(page).toHaveURL(/\/title\/tt5779228/); await expect(page).toHaveTitle(/The Garfield Movie \(2024\)/); // Step 4: Extract the director information // The director information is displayed in the main content area const directorElement = page.locator('text=Director').locator('..').locator('a').first(); // Verify the director is Mark Dindal await expect(directorElement).toHaveText('Mark Dindal'); // Log the director name for verification const directorName = await directorElement.textContent(); console.log(`Director of The Garfield Movie (2024): ${directorName}`); // Assert the expected result expect(directorName).toBe('Mark Dindal');});