home / mcp / browser use ollama mcp server

Browser Use Ollama MCP Server

Local MCP server to automate browser actions via Ollama models using Playwright and MC protocol.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cam10001110101-mcp-server-browser-use-ollama": {
      "command": "/path/to/.venv/bin/python",
      "args": [
        "/path/to/src/server.py"
      ],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "OLLAMA_MODEL": "qwen3"
      }
    }
  }
}

You can automate browser tasks locally by exposing an MCP server that communicates with Ollama-hosted models and controls a Playwright browser. This setup gives you natural language-driven automation, robust session management, and visual feedback through screenshots, all running securely on your machine.

How to use

You interact with the MCP server using an MCP client or an interactive Python client. Start a local server process, connect your client to it, and begin giving natural language instructions like navigating to a page, clicking elements, typing text, and extracting data. The server translates your requests into browser actions via Playwright and returns results or visual feedback after each step so you can adjust your approach in real time.

Common work patterns include starting a long-running interactive session for a task, then issuing a sequence of commands or a single complex instruction that the AI expands into browser actions. You can provide task descriptions from the command line or from a text file, with model-driven planning guiding the actions and a full conversation history retained for context.

How to install

Prerequisites: install Python 3.8 or newer and ensure Ollama is installed and running on your machine. You should also have a modern Python package manager available.

Step 1: Install the package and dependencies locally using uv as the installer, then install browser tooling.

# Clone the project repository
git clone https://github.com/Cam10001110101/mcp-server-browser-use-ollama
cd mcp-server-browser-use-ollama

# Install with uv (recommended)
uv pip install -e .
playwright install

# Start Ollama and pull a model in separate terminals
ollama serve
ollama pull qwen3

Explicit MCP server configuration (stdio mode)

You can run the MCP server locally by connecting your client to a Python runtime that executes the server script. The following example shows how you wire the server in a configuration file.

{
  "mcpServers": {
    "browser_use_ollama": {
      "command": "/path/to/.venv/bin/python",
      "args": ["/path/to/src/server.py"]
    }
  }
}

Available tools

launch_browser

Launch a browser instance and navigate to a URL.

click_element

Click at specific coordinates within the page.

click_selector

Click an element identified by a CSS selector.

type_text

Type text at the current cursor position.

scroll_page

Scroll the page up or down.

get_page_content

Extract readable text content from the current page.

get_dom_structure

Retrieve the DOM structure up to a specified depth.

extract_data

Extract structured data matching a pattern from the page content.

take_screenshot

Capture a screenshot of the current browser view.

close_browser

Close the active browser session.