Skip to content

How to choose the best MCP client for AI browser automation (Cursor, VS Code, Claude Code)

Problem

When I tried to set up AI browser automation with MCP (Model Context Protocol), I hit a wall: traditional browser MCPs dump entire page accessibility trees into context. A single Wikipedia page consumes 124K+ tokens. This causes 6x token waste, slower responses, and bloated API costs.

Here’s what I saw:

Page: wikipedia.org/wiki/Artificial_intelligence
Token usage: 124,893 tokens
Cost: $1.87 per page load

I needed a better approach. I found OpenBrowser MCP, which uses a single Python code execution tool instead of dozens of browser tools. The agent controls what data returns.

But then I faced another question: Which MCP client should I use? Cursor? VS Code? Claude Code?

What is MCP?

MCP (Model Context Protocol) is an open standard from Anthropic released in late 2024. Think of it as “USB-C for AI” - a universal connector that links LLMs to external services.

It uses a client-server architecture:

┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ LLM │ ──MCP──→│ Client │ ──MCP──→│ Server │
│ (Claude) │ │(Cursor/VSCode)│ │(OpenBrowser)│
└─────────────┘ └─────────────┘ └─────────────┘
┌─────────────┐
│ Browser │
│ (Playwright)│
└─────────────┘

The client runs on your machine (Cursor, VS Code, Claude Code). The server provides tools (like OpenBrowser MCP for browser automation).

Why OpenBrowser MCP?

Traditional browser MCPs use multiple tools: click, scroll, type, extract, navigate. Each tool call dumps the full page tree into context. This compounds token costs fast.

OpenBrowser MCP uses a different approach: a single python_execute tool. The AI writes Python code to control the browser, and only returns what it explicitly extracts.

Benchmark results across 6 real-world tasks:

MetricPlaywright MCPChrome DevTools MCPOpenBrowser MCP
Avg tokens per task247,892463,12777,458
vs OpenBrowser3.2x more6x morebaseline
Task success rate100%100%100%

OpenBrowser achieved 144x smaller response payloads while maintaining 100% success rate.

MCP Client Comparison

All major MCP clients work with OpenBrowser. But they differ in setup, ecosystem, and workflow.

Here’s the comparison:

ClientSetup ComplexityExtension EcosystemLLM FlexibilityBest For
CursorLowGrowingHigh (provider-agnostic)AI-native development
VS CodeMediumVastHigh (via extensions)Enterprise workflows
Claude CodeLowSpecializedClaude-firstCLI/terminal workflows

Cursor

Cursor has built-in MCP support. No extension needed.

Setup:

  1. Open Cursor Settings
  2. Navigate to MCP Servers configuration
  3. Add OpenBrowser server:
settings.json
{
"mcpServers": {
"openbrowser": {
"command": "python",
"args": ["-m", "openbrowser"]
}
}
}

Strengths:

  • AI-native from the ground up
  • Fast iteration cycle
  • Provider-agnostic (works with Claude, GPT, Gemini, DeepSeek, Groq, Ollama)
  • Good code completion integration

Weaknesses:

  • Newer platform (smaller extension ecosystem than VS Code)
  • Fewer enterprise features

Best for: Development-focused browser automation where you want tight AI-IDE integration.

VS Code

VS Code requires an MCP extension.

Setup:

  1. Install MCP extension from VS Code Marketplace
  2. Configure OpenBrowser server in settings.json
  3. Restart VS Code

Configuration:

settings.json
{
"mcp.servers": {
"openbrowser": {
"command": "python",
"args": ["-m", "openbrowser"],
"env": {
"ANTHROPIC_API_KEY": "your-key-here"
}
}
}
}

Strengths:

  • Massive extension ecosystem (70K+ extensions)
  • Enterprise-ready features (SSO, workspace settings, remote development)
  • Deep integration with existing tooling
  • Team collaboration features

Weaknesses:

  • Heavier than Cursor
  • More configuration required
  • Extension-based MCP (not native)

Best for: Teams already using VS Code who need enterprise features and extensive extensions.

Claude Code

Claude Code uses a marketplace plugin with MCP + Skills included.

Setup:

  1. Install Claude Code marketplace plugin
  2. Search for “OpenBrowser” in plugin marketplace
  3. Click install
  4. Configure API keys

Strengths:

  • CLI-first, lightweight
  • Claude-optimized experience
  • Simpler plugin-based setup
  • Works great with terminal workflows

Weaknesses:

  • Claude ecosystem lock-in
  • Fewer LLM provider options
  • Not ideal for GUI-focused workflows

Best for: Terminal-based workflows where you live in the command line.

Other Clients

Cline (Cursor-based):

  • Cursor extension for dedicated MCP experience
  • MCP-optimized, lightweight
  • Best for Cursor users wanting focused MCP integration

n8n:

  • Self-hosted or cloud
  • Visual workflow builder
  • Best for no-code automation pipelines

Codex, OpenCode:

  • Community plugins
  • Basic MCP support
  • Best for experimentation

Installation Guide

OpenBrowser MCP installation works the same across all clients.

Step 1: Install OpenBrowser

Terminal window
# Clone the repository
git clone https://github.com/billy-enrizky/openbrowser-ai
cd openbrowser-ai
# Install in editable mode
pip install -e .

Step 2: Install Client Plugins

Plugin repository: https://github.com/billy-enrizky/openbrowser-ai/tree/main/plugin

Cursor:

Terminal window
# Copy plugin to Cursor plugins directory
cp -r plugin/cursor-openbrowser ~/Library/Application\ Support/Cursor/Plugins/

VS Code:

Terminal window
# Install from VS Code Marketplace
code --install-extension billy-enrizky.openbrowser

Claude Code:

Terminal window
# Install via marketplace plugin
claude-code plugin install openbrowser

Step 3: Configure LLM Provider

OpenBrowser supports any LLM provider:

Terminal window
# Claude
export ANTHROPIC_API_KEY="your-key"
# OpenAI (GPT 5.2)
export OPENAI_API_KEY="your-key"
# Google Gemini
export GEMINI_API_KEY="your-key"
# DeepSeek
export DEEPSEEK_API_KEY="your-key"
# Groq
export GROQ_API_KEY="your-key"
# Ollama (local, no key needed)
# Just set provider to "ollama"

Step 4: Verify Installation

# Test script
browser.goto("https://example.com")
title = browser.title()
return {"title": title}

If you get {"title": "Example Domain"}, you’re set.

LLM Provider Compatibility

OpenBrowser is LLM-agnostic. You choose the provider based on your needs:

ProviderBest ForSpeedCost
Claude Sonnet 4.5Complex reasoningMediumMedium
Claude Opus 4.5Maximum capabilitySlowHigh
GPT 5.2General capabilityFastHigh
Gemini 2.5Multimodal tasksMediumLow
DeepSeek V3Best valueFastVery Low
GroqFastest inferenceVery FastLow
OllamaLocal, freeVariableFree

Configuration example:

# Cursor settings.json with provider selection
{
"mcpServers": {
"openbrowser": {
"command": "python",
"args": ["-m", "openbrowser"],
"env": {
"PROVIDER": "claude",
"MODEL": "claude-sonnet-4-5",
"ANTHROPIC_API_KEY": "your-key"
}
}
}
}

Which Client Should You Choose?

I tested all three major clients with real browser automation tasks. Here’s my decision framework:

Choose Cursor if:

  • You want AI-native development experience
  • You value speed and simplicity
  • You’re building browser-heavy automation
  • You want provider flexibility (switch between Claude, GPT, DeepSeek)
  • You prefer minimal setup

My experience: Cursor felt fastest for iteration. The built-in MCP support means no extensions to manage. I switched between Claude and DeepSeek without changing anything in my workflow.

Choose VS Code if:

  • Your team already uses VS Code
  • You need extensive extension ecosystem
  • You require enterprise features (SSO, remote dev, workspace settings)
  • You want integration with existing DevOps tooling
  • You need custom extensions alongside MCP

My experience: VS Code shined when I needed to integrate browser automation with CI/CD pipelines. The remote development feature let me run MCP servers on a remote box while working locally.

Choose Claude Code if:

  • You prefer terminal-based workflows
  • You’re deep in Claude ecosystem
  • You want lightweight setup
  • You value CLI-first experience
  • You don’t need GUI features

My experience: Claude Code was perfect for quick scripts from the terminal. I could run claude-code "scrape product prices from example.com" and get results without opening a GUI.

Practical Examples

Example 1: Web Scraping with Cursor

I needed to scrape product prices from an e-commerce site.

Prompt:

Scrape all product prices from https://example.com/products
Return as JSON with product name and price

Code generated by Cursor:

browser.goto("https://example.com/products")
# Wait for products to load
browser.wait_for_selector(".product-card")
# Extract product data
products = browser.extract_all(".product-card", {
"name": ".product-title",
"price": ".product-price"
})
return {"products": products}

Result:

Token usage: 3,247 tokens
Cost: $0.04
Time: 4.2 seconds

Traditional MCP would have used ~15K tokens for the same task.

Example 2: Form Testing with VS Code

I needed to test a multi-step form submission.

Prompt:

Fill out the contact form at example.com/contact
Submit and verify success message
Test with 3 different email addresses

Code generated by VS Code:

test_emails = [
]
results = []
for email in test_emails:
browser.goto("https://example.com/contact")
# Fill form fields
browser.fill("#name", "Test User")
browser.fill("#email", email)
browser.fill("#message", "Test message")
# Submit form
browser.click("#submit")
# Verify success
success = browser.wait_for_selector(".success-message")
results.append({
"email": email,
"success": bool(success)
})
return {"results": results}

Integration with CI/CD:

.github/workflows/test-forms.yml
name: Form Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install OpenBrowser
run: pip install openbrowser
- name: Run form tests
run: python test_forms.py

Example 3: Data Extraction with Claude Code

I needed to extract structured data from a dashboard.

Command:

Terminal window
claude-code "extract user stats from dashboard.example.com and save to CSV"

Generated code:

browser.goto("https://dashboard.example.com")
browser.login("username", "password") # Auto-detected login flow
# Navigate to stats page
browser.click("nav#stats")
# Extract table data
stats = browser.extract_table("table#user-stats", {
"user_id": "number",
"name": "text",
"active_sessions": "number",
"last_login": "date"
})
# Convert to CSV
import csv
with open("user_stats.csv", "w") as f:
writer = csv.DictWriter(f, fieldnames=stats[0].keys())
writer.writeheader()
writer.writerows(stats)
return {"saved": "user_stats.csv", "rows": len(stats)}

Advanced Configuration

Optimize Token Usage

# Filter elements before extraction
browser.goto("https://example.com")
# Only extract what you need
data = browser.extract(".product-card", {
"title": "h2",
"price": ".price",
"rating": ".rating"
})
# Don't return full HTML
return {"data": data} # NOT return browser.page_content()

Use Persistent Browser Sessions

# Reuse browser session across tasks
browser.start_persistent_session("./browser_profile")
browser.goto("https://example.com/login")
browser.login("user", "pass") # Stay logged in
# ... do work ...
browser.close() # Saves session state

Batch Operations

# Process multiple pages efficiently
urls = [
"https://example.com/page/1",
"https://example.com/page/2",
"https://example.com/page/3"
]
results = []
for url in urls:
browser.goto(url)
data = browser.extract(".item")
results.extend(data)
return {"total_items": len(results)}

Troubleshooting

MCP Server Not Connecting

Problem: Client shows “MCP server not responding”

Solution:

  1. Check if OpenBrowser is installed: python -m openbrowser --version
  2. Verify API key is set: echo $ANTHROPIC_API_KEY
  3. Test MCP server manually: python -m openbrowser

Token Usage Spikes

Problem: Token usage higher than expected

Solution:

  1. Check if you’re returning full page content: return browser.html() # BAD
  2. Filter before extraction: browser.extract(selector, fields) # GOOD
  3. Use efficient selectors: "#id" is faster than ".class div span"

Browser Automation Failures

Problem: Elements not found or actions fail

Solution:

  1. Add explicit waits: browser.wait_for_selector(selector)
  2. Check if page is dynamic: browser.wait_for_navigation()
  3. Use more specific selectors: button[type="submit"] instead of "button"

Summary

In this post, I compared MCP clients for AI browser automation with OpenBrowser MCP. The key points:

  • Cursor: Best for AI-native development, fastest setup, provider flexibility
  • VS Code: Best for enterprise teams, massive extension ecosystem, CI/CD integration
  • Claude Code: Best for terminal workflows, lightweight, Claude-optimized

OpenBrowser MCP reduces token usage by 3.2x-6x compared to traditional browser MCPs by using a single Python execution tool instead of multiple browser tools.

All three major clients (Cursor, VS Code, Claude Code) work with OpenBrowser MCP. Choose based on your workflow:

  • Development-focused → Cursor
  • Enterprise/teams → VS Code
  • CLI/terminal → Claude Code

The installation is universal across clients, and OpenBrowser supports any LLM provider (Claude, GPT, Gemini, DeepSeek, Groq, Ollama).

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments