Description
Describe the bug
When setting up the @playwright/mcp
server in Cursor on Windows, the server shows a "green light" indicating a successful connection. However, none of the Playwright tools (e.g., browser_navigate
) become available. The Cursor extension host console shows the following warning, which appears to be the root cause of the silent failure:
(node:...) ExperimentalWarning: Use 'importAttributes' instead of 'importAssertions'
This suggests the package or its dependencies are using an outdated syntax for import statements, which prevents the server from fully initializing, despite the process starting successfully.
To Reproduce
- Set up the following configuration in
mcp.json
on a Windows machine with a recent version of Cursor. - Restart Cursor.
- Observe the green light for the Playwright MCP server.
- Attempt to call any Playwright tool, such as
playwright_browser_navigate
. The call will fail with "Tool not found". - Check the Cursor developer console (
Help > Toggle Developer Tools > Console
). TheimportAssertions
warning will be present.
mcp.json
Configuration:
{
"playwright": {
"command": "cmd",
"args": [
"/c",
"npx",
"@playwright/mcp@latest"
]
}
}
Expected behavior
The Playwright tools should be loaded and available for use in Cursor.
Key console error:
[Extension Host] (node:...) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `Cursor --trace-warnings ...` to show where the warning was created)
Desktop Environment:
- OS: Windows 11
Additional context
Extensive troubleshooting has been performed, none of which resolved the issue:
- Switched the
npm
registry to a reliable mirror (https://registry.npmmirror.com
). - Initialized a full
npm
project (npm init -y
,npm install @playwright/test
). - Installed Playwright browsers (
npx playwright install
). - Cleared the
npm
cache (npm cache clean --force
).
The issue appears to be inherent to the package's code and its compatibility with the Node.js environment used by Cursor's extension host.