mcp-server-browser-use-ollama
Enables AI agents to automate browser interactions with Amazon, including product search, comparison, and data extraction.
Enables AI agents to automate browser interactions with GitHub, including repository search and analysis.
Enables AI agents to automate browser interactions with Google, including web searches and result extraction.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Browser Automation with Ollama
A powerful browser automation system that enables AI agents to control web browsers through the Model Context Protocol (MCP). This implementation is specifically designed to work with Ollama local models, providing a secure and efficient way to automate browser interactions using locally-hosted AI models.
Features
MCP Integration: Targets MCP 2026-07-28 with native discovery and per-request metadata; see protocol coverage.
Ollama Model Support: Optimized for local AI models running through Ollama
Browser Control: Complete browser automation with Playwright (Chrome, Firefox, Safari)
AI-Driven Automation: Natural language browser control via local LLMs
Screenshot Capabilities: Visual feedback and debugging support
Session Management: Multiple browser sessions with automatic cleanup
Interactive Mode: Continuous feedback loop between AI and browser state
Optimized Display: Browser launches maximized (1920x1080) to minimize scrolling
Related MCP server: openmcp
Quick Start
Prerequisites
Installation
# Clone the repository
git clone https://github.com/Cam10001110101/mcp-server-browser-use-ollama
cd mcp-server-browser-use-ollama
# Install with uv (recommended)
uv sync --locked
uv run --locked playwright install chromium
# Start Ollama and pull a model
ollama serve # In one terminal
ollama pull qwen3 # In another terminalUsage
The system can be used in two modes:
Option 1: Direct MCP Integration (with Claude Desktop)
Configure in claude_desktop_config.json:
{
"mcpServers": {
"browser-use-ollama": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/src/server.py"]
}
}
}Option 2: Ollama-Driven Automation
# Interactive automation with conversation history
uv run --locked python src/client.py src/server.py
# Custom task via command line
uv run --locked python src/client.py src/server.py "Navigate to Google and search for 'Ollama models'"
# Complex task from file
uv run --locked python src/client.py src/server.py task_description.txt --file
# With custom model
uv run --locked python src/client.py src/server.py "Your task" --model llama3.2:latestAvailable Tools
The MCP server provides 10 browser automation tools:
launch_browser(url)- Launch browser and navigate to URLclick_element(session_id, x, y)- Click at coordinatesclick_selector(session_id, selector)- Click element by CSS selectortype_text(session_id, text)- Type text at current positionscroll_page(session_id, direction)- Scroll page up/downget_page_content(session_id)- Extract page text contentget_dom_structure(session_id, max_depth)- Get DOM treeextract_data(session_id, pattern)- Extract structured datatake_screenshot(session_id)- Capture screenshotclose_browser(session_id)- Close browser session
Examples
Basic Web Search
uv run --locked python src/client.py src/server.py "Search for 'Ollama models' on Google and summarize the top 3 results"E-commerce Analysis
uv run --locked python src/client.py src/server.py "Compare wireless headphones on Amazon - create a table with prices, ratings, and features"Research Workflow
uv run --locked python src/client.py src/server.py "Research transformer architecture improvements in 2024, visit 5 sources, and compile a summary"File-based Complex Tasks
# Create a task file
echo "Navigate to GitHub, search for MCP repositories, and analyze the top 5 results" > my_task.txt
# Run the task
uv run --locked python src/client.py src/server.py my_task.txt --fileEnvironment Variables
OLLAMA_MODEL: Specify Ollama model (default:qwen3)OLLAMA_HOST: Ollama API endpoint (default:http://localhost:11434)
Security
Use this server only through a trusted local MCP client. It controls a browser with the network access of your user account, including localhost and private networks. Run it as an unprivileged user on a host that supports the Chromium sandbox; launch fails rather than falling back to an unsandboxed browser.
Webpage text and model responses are untrusted. Use a dedicated browser environment without sensitive accounts, restrict network access externally when processing untrusted tasks, and supervise actions that submit data or change remote state. The server does not provide a network isolation or prompt-injection boundary.
See security remediation and verification for the review scope, fixes, dependency audit commands and remaining limitations.
Testing
# Install locked development tools
uv sync --locked --extra dev
# Run unit tests and real MCP stdio protocol checks
uv run --locked pytest -m "not e2e"
# Run browser security regression tests (POSIX shell)
uv run --locked playwright install chromium
RUN_BROWSER_TESTS=1 uv run --locked pytest -m e2eProject Structure
mcp-server-browser-use-ollama/
├── src/ # Core source code
│ ├── server.py # MCP server implementation
│ └── client.py # Interactive client with full automation capabilities
├── tests/ # Test suite
├── docs/ # Additional documentation
├── pyproject.toml # Project configuration
└── README.md # This fileArchitecture
The system uses a client-server architecture with MCP protocol:
User → Client → MCP Protocol → Server → Playwright BrowserServer: Pure MCP SDK server providing browser automation tools
Client: Langchain-Ollama integration for natural language processing
Transport: stdio-based MCP communication
Browser: Playwright automation for cross-browser support
Key Features
Interactive Feedback Loop
The client maintains a continuous dialogue with Ollama for dynamic automation:
Ollama receives results after each action
Can adjust strategy based on browser state
Maintains full conversation history for context
Supports both command-line and file-based task input
Advanced Capabilities
Conversation History: 32k token context window for complex multi-step tasks
Action Parsing: JSON and heuristic parsing of LLM responses
File Input: Support for complex task descriptions from files
Model Selection: Easy switching between Ollama models
Debug Mode: Comprehensive logging for troubleshooting
Flexible Model Support
Works with any Ollama-compatible model
Optimized for coding models (qwen3, qwen2.5-coder:7b)
Configurable context windows and parameters
Temperature=0 for deterministic outputs
Robust Error Handling
Automatic browser session cleanup
Graceful recovery from parsing errors
Comprehensive logging for debugging
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Let your AI agent operate any website through a real, logged-in browser session.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceBrowser automation for AI agents via the Model Context Protocol, enabling web navigation, form filling, screenshots, and more using Chromium.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to automate web tasks such as browsing, clicking, typing, and taking screenshots via the Model Context Protocol.1MIT
- AlicenseAqualityBmaintenanceEnables browser automation through the Model Context Protocol, allowing AI agents to control Chrome, Firefox, or Edge for tasks like navigation, clicking, typing, and screenshots.4165 npmMIT
- AlicenseNot gradedqualityDmaintenanceTurn your Chrome browser into an AI-powered automation tool, enabling browser control, content analysis, and semantic search via Model Context Protocol.MIT