- Browser-use MCP Client
Browser-use MCP Client
Content
Browser-use MCP Client
A modern React application that provides a user-friendly interface for interacting with Model Context Protocol (MCP) servers through Server-Sent Events (SSE).
🎥 Demo
https://github.com/user-attachments/assets/52ab11ad-741f-4506-99ad-9f1972a3aad1
🚀 Features
- Real-time Communication: Direct SSE connection to MCP servers
- Interactive UI: Clean and responsive interface built with React and Tailwind CSS
- Theme Support: Light and dark mode with system preference detection
- Screenshot Preview: Live browser screenshots from MCP server responses
- Message History: Persistent chat history with clear message threading
- Request Management: Cancel in-progress requests and clear chat history
- Connection Management: Easy server connection configuration
📋 Prerequisites
- Node.js (v18 or later)
- pnpm (recommended package manager)
- A running MCP server for connection
- Python 3.8+ (for running the example server)
🚀 Getting Started
-
Clone the Repository
git clone <repository-url> cd browser-use-mcp-client -
Install Dependencies
pnpm install -
Start the Development Server
pnpm dev -
Start the Proxy Server
./proxy/index.js
The application will be available at http://localhost:5173
💻 Usage
🤖 Example MCP Server
Here's an example of a Python-based MCP server that uses browser automation:
#!/usr/bin/env python3
import asyncio
from dotenv import load_dotenv
from typing import Awaitable, Callable
from mcp.server.fastmcp import FastMCP, Context
from browser_use import Agent, Browser, BrowserConfig
from langchain_google_genai import ChatGoogleGenerativeAI
# Load environment variables from .env file
load_dotenv()
# Initialize FastMCP server
mcp = FastMCP("browser-use")
browser = Browser(
config=BrowserConfig(
chrome_instance_path="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --remote-debugging-port=9222",
headless=True
)
)
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash")
agent = None
@mcp.tool()
async def perform_search(task: str, context: Context):
"""Perform the actual search in the background."""
async def step_handler(state, *args):
if len(args) != 2:
return
await context.session.send_log_message(
level="info",
data={"screenshot": state.screenshot, "result": args[0]}
)
asyncio.create_task(
run_browser_agent(task=task, on_step=step_handler)
)
return "Processing Request"
@mcp.tool()
async def stop_search(*, context: Context):
"""Stop a running browser agent search by task ID."""
if agent is not None:
await agent.stop()
return "Running Agent stopped"
async def run_browser_agent(task: str, on_step: Callable[[], Awaitable[None]]):
"""Run the browser-use agent with the specified task."""
global agent
try:
agent = Agent(
task=task,
browser=browser,
llm=llm,
register_new_step_callback=on_step,
register_done_callback=on_step,
)
await agent.run()
except asyncio.CancelledError:
return "Task was cancelled"
except Exception as e:
return f"Error during execution: {str(e)}"
finally:
await browser.close()
if __name__ == "__main__":
mcp.run(transport="sse")
🤝 Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop