Fix MCP Browser Automation Missing Cursor
In this article
When the cursor disappears during MCP (Model Context Protocol) browser automation, it usually means the automation tool's virtual pointer is not being rendered or is out of sync with the browser's viewport. This guide walks you through the most common fixes, from simple refreshes to deeper configuration changes. You'll need access to your MCP server configuration files and the browser's developer tools.
What You'll Need
- Access to your MCP server configuration (e.g.,
mcp.jsonorsettings.json) - Browser developer tools (F12 on Windows/Linux, Cmd+Option+I on macOS)
- Basic familiarity with your terminal or command line
- Optional: A screenshot tool to capture the browser state
Step-by-Step
- Refresh the browser view. Often the cursor is simply not being repainted. Press F5 or Ctrl+R (Cmd+R on Mac) to reload the page. If the cursor reappears, you're done. If not, continue.
- Check if the cursor is actually moving. Run a simple automation script that moves the mouse to a known coordinate (e.g.,
page.mouse.move(100, 100)). If the cursor does not move, the issue is with the MCP tool's pointer handling. If it moves but is invisible, the issue is rendering. - Disable hardware acceleration in the browser. In Chrome or Edge, go to Settings > System and turn off “Use hardware acceleration when available”. Restart the browser. Hardware acceleration can sometimes cause the virtual cursor to not render.
- Update your browser and MCP server. Outdated versions often have bugs related to pointer events. Check for browser updates and update your MCP server package (e.g.,
npm update @modelcontextprotocol/server-browser). - Adjust the MCP server's viewport settings. Some MCP servers, like Playwright MCP, allow you to set a custom viewport. If the viewport size is set to 0 or an unusual value, the cursor may be rendered outside the visible area. In your MCP configuration, set a standard viewport, e.g.,
"viewport": {"width": 1280, "height": 720}. - Reset the MCP server's state. Stop the MCP server process, delete any temporary cache files (often in
~/.cache/mcpornode_modules/.cache), and restart the server. This clears any corrupted pointer state. - Reinstall the MCP browser automation package. If the above fails, uninstall and reinstall the MCP server. This ensures no corrupted files remain. For example, with npm:
npm uninstall @modelcontextprotocol/server-browserthennpm install @modelcontextprotocol/server-browser. - Try a different browser. If you're using Chrome, switch to Firefox or Edge. Some browsers handle virtual cursors differently. Update your MCP configuration to point to the new browser executable.
- Check for CSS overlay issues. If the page has a custom cursor or an element that hides the cursor (e.g.,
cursor: none), the automation cursor may be hidden. Use the browser's developer tools to inspect the element under the cursor and see if any CSS rule is hiding it. Temporarily override it withcursor: auto !importantin the console. - Run the MCP server in headless mode. If you're using a headed browser, switch to headless mode. Sometimes the virtual cursor is only rendered in headless mode. In your MCP config, set
"headless": true.
Common Mistakes
- Assuming it's a browser issue. The problem is almost always in the MCP server's pointer handling, not the browser itself.
- Not checking the viewport size. A viewport of 0x0 will make the cursor invisible.
- Forgetting to restart the MCP server after config changes. Changes to
mcp.jsonor similar files require a full restart of the server, not just a page refresh. - Using an outdated browser. Old browser versions may not support the latest pointer events used by MCP.
Tips
- Always test with a simple script first to isolate whether the cursor moves at all.
- Use the browser's remote debugging port (e.g.,
--remote-debugging-port=9222) to manually inspect the page while automation runs. - Keep a backup of your working MCP configuration before making changes.
- If you're using a custom user profile, try a fresh profile to rule out profile corruption.
Troubleshooting
If the cursor is still missing after following all steps, try these additional checks:
- Check the MCP server logs. Look for any errors related to mouse events or rendering. Logs are usually printed to the terminal where the server runs.
- Verify the automation tool is actually controlling the browser. Use the browser's task manager (Shift+Esc in Chrome) to see if the automation process is running.
- Try a different MCP browser server. If you're using
@playwright/mcp, try@modelcontextprotocol/server-puppeteeror vice versa. Different implementations may handle the cursor differently. - Check for conflicting extensions. Browser extensions can interfere with pointer events. Disable all extensions and test again.
- If all else fails, restart your computer. This clears any lingering system-level graphics or pointer issues.
Frequently Asked Questions
Why does the cursor disappear only during automation, not when I use the browser manually?
Because the automation tool injects its own virtual cursor, which is separate from your physical mouse. That virtual cursor may not be rendered correctly due to a bug or misconfiguration.
Does the missing cursor affect the automation's functionality?
Not necessarily. The automation can still click and move without a visible cursor. The missing cursor is a visual issue, not a functional one, unless you need to visually track the pointer.
Can I make the cursor visible again without restarting the server?
Sometimes yes. Try refreshing the page or running a small script that moves the mouse to a different position. If that doesn't work, you'll need to restart the server.
Is this a known issue with all MCP browser servers?
It's more common with some servers than others, but it's not universal. Playwright MCP and Puppeteer MCP have both had reports of this issue, but it's often fixed with updates.
Will changing the viewport size affect my automation scripts?
Yes, if your scripts rely on specific coordinates. Changing the viewport may break selectors that depend on element positions. Adjust your scripts accordingly.
Do I need to reinstall the browser after trying all fixes?
No, that's rarely necessary. The issue is almost always in the MCP server or its configuration, not the browser itself.