MCP Browser Control Setup Guide¶
This guide explains how to configure MCP (Model Context Protocol) browser control tools in Cursor IDE.
What is MCP Browser Control?¶
MCP browser control allows the AI assistant to: - Navigate web pages - Interact with web elements - Test frontend code changes - Capture screenshots - Automate browser testing
Available MCP Browser Servers¶
Cursor supports two browser MCP servers: 1. cursor-browser-extension - Browser extension-based control 2. cursor-ide-browser - IDE-integrated browser control
Setup Methods¶
Method 1: Via Cursor Settings UI (Recommended)¶
- Open Cursor Settings:
- Press
Ctrl + ,(Windows/Linux) orCmd + ,(macOS) -
Or go to: File → Preferences → Settings
-
Search for MCP:
-
In the settings search bar, type:
MCPorModel Context Protocol -
Add MCP Server:
- Look for "MCP Servers" section
- Click "Add Server" or the "+" button
-
Enter server configuration (see configurations below)
-
Restart Cursor:
- Close and reopen Cursor IDE to activate the MCP server
Method 2: Via Configuration File¶
- Locate MCP Configuration File:
- Windows:
%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - macOS:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Linux:
~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Alternatively, check:
- %USERPROFILE%\.cursor\mcp.json (Windows)
- ~/.cursor/mcp.json (macOS/Linux)
- Edit Configuration File:
- Create the file if it doesn't exist
- Add the following configuration:
Configuration for cursor-ide-browser:¶
{
"mcpServers": {
"cursor-ide-browser": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-puppeteer"
]
}
}
}
Alternative: Using Playwright (More Modern):¶
{
"mcpServers": {
"cursor-ide-browser": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-playwright"
]
}
}
}
Configuration for cursor-browser-extension:¶
{
"mcpServers": {
"cursor-browser-extension": {
"url": "http://localhost:12008/metamcp/cursor-browser-extension/mcp"
}
}
}
Note: For the browser extension method, you'll need to: 1. Install the Cursor browser extension 2. Ensure the extension server is running on port 12008
- Save and Restart:
- Save the configuration file
- Restart Cursor IDE
Verification¶
After setup, verify the MCP server is working:
- Check MCP Resources:
- The AI assistant should be able to list MCP resources
-
Ask: "What MCP resources are available?"
-
Test Browser Control:
- Ask the AI to navigate to a URL
- Example: "Navigate to http://localhost:5180 and take a screenshot"
Troubleshooting¶
MCP Server Not Found¶
- Issue: MCP resources show as empty
- Solution:
- Verify the configuration file path is correct
- Check that Node.js and npm are installed (
node --version,npm --version) - Ensure the MCP server package can be installed via npx
Browser Extension Not Working¶
- Issue: cursor-browser-extension shows connection errors
- Solution:
- Install the Cursor browser extension in your browser
- Check that the extension server is running
- Verify the port (default: 12008) is not blocked
Permission Issues¶
- Issue: MCP server cannot access browser
- Solution:
- Grant necessary permissions in browser settings
- Check firewall/antivirus isn't blocking the connection
Recommended Setup for This Project¶
For the PCB Stackup Generator project, I recommend using Playwright as it provides: - Better cross-browser support - More reliable automation - Better screenshot capabilities - Modern API
Use this configuration:
{
"mcpServers": {
"browser": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-playwright"
],
"env": {
"BROWSER": "chromium"
}
}
}
}
Usage Examples¶
Once configured, you can ask the AI to:
-
Navigate to your app:
-
Test a feature:
-
Take screenshots:
-
Interact with elements: