User Agents

Web browsers and everyday web tech, explained

Browser Tools MCP: Web Automation Setup Guide

· 5 min read · Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Browser Tools MCP lets you automate web tasks like filling forms, clicking buttons, and extracting data using natural language prompts through an AI assistant. This guide walks you through configuring the MCP server, connecting it to your browser, and running your first automation script.

What You'll Need

  • A computer running Windows, macOS, or Linux
  • Node.js (version 18 or later) installed
  • An MCP-compatible client (e.g., Claude Desktop, Cursor, or any IDE with MCP support)
  • Google Chrome or Microsoft Edge (Chromium-based browsers work best)
  • Basic familiarity with your terminal/command line

Step-by-Step

  1. Install the MCP server package. Open your terminal and run: npm install -g @browsermcp/mcp. This installs the server globally so it can be accessed from any project.
  2. Configure your MCP client. In your client's MCP settings file (e.g., claude_desktop_config.json for Claude Desktop), add a new server entry with the command browsermcp and no arguments. Restart your client after saving.
  3. Launch the browser extension. Install the Browser Tools MCP extension from the Chrome Web Store or Edge Add-ons. After installation, click the extension icon to open its popup.
  4. Connect the extension to the server. In the extension popup, click the "Connect" button. The extension will attempt to connect to the local MCP server on port 3025. You should see a green status indicator once connected.
  5. Verify the connection. In your MCP client, send a simple prompt like "List the tools available." The client should return a list of browser automation tools (e.g., navigate, click, type, extract).
  6. Run your first automation. Ask your assistant to "Open example.com and get the page title." The assistant will use the navigate tool, wait for the page to load, and then extract the title.
  7. Automate a multi-step task. For example: "Go to a search engine, type 'weather today', press Enter, and tell me the first result." The assistant will chain the tools together.
  8. Use screenshots for debugging. Ask the assistant to "Take a screenshot" at any point. The screenshot is saved to your default downloads folder and helps verify what the browser sees.
  9. Stop automation. To end a session, ask the assistant to "Close the browser" or simply close the browser tab manually. The extension will disconnect automatically.

Common Mistakes

  • Forgetting to install the extension. The MCP server alone cannot control the browser; the extension acts as the bridge. Without it, you'll get connection errors.
  • Using a non-Chromium browser. Firefox and Safari are not supported. Stick with Chrome, Edge, or Brave.
  • Not restarting the client after config changes. MCP clients often cache server lists. Always restart after editing the config file.
  • Assuming the browser is always connected. If you close the browser window, the extension disconnects. You must reconnect manually.
  • Asking for actions on pages that require login. The automation works on your existing browser session, so if you're logged into a site, it uses that session. But if you're not logged in, it can't bypass authentication.

Tips

  • Use explicit selectors. When asking to click a button, mention its text or ID (e.g., "click the button that says 'Submit'") to avoid ambiguity.
  • Wait for page loads. The tools include a wait function. If a page is slow, ask the assistant to "wait 2 seconds" before the next step.
  • Break complex tasks into smaller prompts. Instead of one giant instruction, do it in steps. This makes debugging easier.
  • Keep the browser visible. You can watch the automation in real-time. This helps you spot issues early.
  • Use headless mode for background tasks. If you don't need to watch, you can enable headless mode in the extension settings, but note that some sites block headless browsers.

Troubleshooting

  • Connection refused error. Ensure the MCP server is running (check with ps aux | grep browsermcp on Mac/Linux or Task Manager on Windows). If not, start it manually with browsermcp.
  • Extension shows "Disconnected". Click the extension icon and hit "Connect" again. If that fails, close and reopen the browser, then retry.
  • Tools not showing in client. Verify the server was added correctly in the config file. Check for typos in the command name. Restart the client.
  • Automation fails on a specific site. Some sites use heavy JavaScript or anti-bot measures. Try adding a longer wait time before interacting. If the site blocks automation, you may need to use a different approach.
  • Screenshots are blank or black. This can happen if the browser window is minimized. Keep the window open and visible while taking screenshots.
  • Port already in use. If port 3025 is occupied, change the port in both the server config and the extension settings. They must match.

Frequently Asked Questions

Can I use this with Firefox or Safari?

No, only Chromium-based browsers are supported because the extension relies on Chrome's debugging protocol.

Does this work on websites that require login?

Yes, it uses your existing browser session. If you're already logged in, the automation can interact with those pages. It cannot log in for you.

Is it safe to use on public Wi-Fi?

The automation runs locally. However, any data you send to websites is subject to their security. Use HTTPS sites whenever possible.

Can I schedule automations to run at specific times?

Not directly. You would need to use a task scheduler (like cron) to trigger a script that sends prompts to your MCP client, which is complex. It's easier to run automations on demand.

What if the website changes its layout mid-automation?

The automation may fail because selectors no longer match. You'll need to re-run the task with updated instructions.

Can I extract data into a file?

Yes, you can ask the assistant to save extracted data to a CSV or text file. The assistant can write files locally.