Add Cookie Management to Cursor Browser Tool

Feature request for product/service

Cursor IDE

Describe the request

Feature Request: Add Cookie Management to Cursor Browser Tool

The Problem

The Cursor browser tool currently exposes Playwright’s Page API but not the BrowserContext API, which means there’s no way to programmatically manage cookies. This creates a significant limitation for authenticated automation workflows.

Why This Matters

Many websites require cookies with attributes that cannot be set via JavaScript:

  • Cookies with httpOnly flag
  • Cookies for different domains/subdomains
  • Cookies with specific secure, sameSite attributes

Current Limitation

Using browser_evaluate() to set cookies fails due to browser security:

document.cookie = "session=TOKEN; domain=.example.com; httpOnly"

Result: Browser’s Same-Origin Policy blocks this, cookies are not set correctly.

Standard Playwright Solution

Other Playwright-based tools expose BrowserContext.addCookies():

await context.addCookies([{
  name: 'session',
  value: 'TOKEN',
  domain: '.example.com',
  httpOnly: true
}])

Result: Cookies are set correctly with all attributes preserved.

Proposed Solution

Add three methods to the Cursor browser tool:

  1. browser_add_cookies(cookies) - Set cookies with full attribute support
  2. browser_get_cookies(urls?) - Read current cookies
  3. browser_clear_cookies() - Clear cookies

This would bring Cursor to feature parity with standard Playwright MCP servers.

Reference

Operating System (if it applies)

Windows 10/11