Skip to main content
Build AI workflows that automate browser tasks using n8n and BrowserOS MCP.

Prerequisites

  • Node.js and npm installed (nodejs.org)
  • BrowserOS running with MCP server enabled
  • LLM API key (OpenAI, Claude, etc.)

Setup

Step 1: Install and Run n8n

Run n8n locally:
npx n8n
Access n8n at http://localhost:5678 and complete the initial setup by creating an account.
For global installation: npm install n8n -g, then run n8n anytime.

Step 2: Install MCP Community Node

Go to Settings → Community Nodes and install n8n-nodes-mcp:
Install n8n-nodes-mcp community node

Step 3: Create Workflow

Create a new workflow and add the AI Agent node. Then configure it:
  1. In the AI Agent, add Chat Model (e.g., OpenAI Chat Model) and configure your API credentials
  2. In the AI Agent’s Tools section, search for “mcp” and add MCP Client Tool
Add MCP Client tool to AI Agent

Step 4: Configure AI Agent Prompt

In the AI Agent node, set Source for Prompt to Define below and paste:
choose the right tool based on the user input:{{ $json.chatInput }}
Configure AI Agent prompt

Step 5: Configure MCP Client Credentials

Click on the MCP Client node to configure it:
  1. Credential to connect withCreate New Credential
  2. Select Command Line (stdio)
  3. Command: npx
  4. Arguments: mcp-remote http://127.0.0.1:9101/mcp
Replace 9101 with your BrowserOS MCP port from Settings → MCP in BrowserOS.

Step 6: Configure MCP Tool Execution

In the same MCP Client node:
  1. Operation: Execute Tool
  2. Tool Name: {{ $fromAI("tool") }}
Configure MCP Client node

Step 7: Test Workflow

Save the workflow and test with a chat input:
Open google.com in BrowserOS
Execute and watch BrowserOS respond!

Troubleshooting

Connection issues? Verify:
  • BrowserOS is running
  • MCP server is enabled in BrowserOS settings
  • Port number matches your BrowserOS MCP configuration

Resources

BrowserOS MCP Guide

Learn more about BrowserOS MCP