MCP Browser
by neoforge-dev
NeoForge Browser MCP server - used to test the frontend
What is MCP Browser
MCP Browser
A headless browser interface for the Model Control Protocol (MCP).
Features
- Headless browser automation using Playwright
- Web UI for browser interaction
- WebSocket communication for real-time updates
- Real-time browser event subscription system
- Integration with MCP for AI agents
Prerequisites
- Python 3.13+
- uv for dependency management
- Docker (for containerized usage)
Local Development
Setup with uv
# Clone the repository
git clone https://github.com/yourusername/mcp-browser.git
cd mcp-browser
# Install dependencies
uv venv .venv
source .venv/bin/activate
uv pip install -e .
# Install Playwright browsers
python -m playwright install
Running Locally
For a simple test without Xvfb:
./simple_test.sh
For a full test with Xvfb (requires X11):
./test_local.sh
Docker Deployment
Build and run using Docker Compose:
# Set your MCP secret
export MCP_SECRET=your_secret_key
# Build and run
docker-compose up --build
Or use the provided script:
./run.sh
Configuration
The following environment variables can be set:
MCP_SECRET
: Secret key for MCP authenticationSERVER_PORT
: Port to run the server on (default: 7665)PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
: Set to 1 to skip browser download and run in headless-only mode
API Endpoints
GET /
: Web UIGET /api/status
: Get browser and MCP client statusWebSocket /ws
: WebSocket endpoint for real-time communicationWebSocket /ws/browser/events
: WebSocket endpoint for browser event subscriptionsGET /api/browser/subscribe
: Subscribe to browser eventsGET /api/browser/unsubscribe
: Unsubscribe from browser eventsGET /api/browser/subscriptions
: List active event subscriptions
Event Subscriptions
The MCP Browser supports real-time event subscriptions via WebSockets. This allows clients to receive browser events as they happen, including:
- Page events (navigation, load, error)
- DOM events (mutations, changes)
- Console events (logs, warnings, errors)
- Network events (requests, responses, errors)
For detailed documentation and examples of the event subscription system, see:
License
MIT
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
Fetch
Web content fetching and conversion for efficient LLM usage
Playwright
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.
puppeteer-mcp-server
Puppeteer
Browser automation and web scraping
Playwright Universal MCP
A universal Playwright MCP server for browser automation in containerized environments
MCP Server Playwright
MCP Server Playwright - A browser automation service for Claude Desktop
OneNote MCP Server
MCP server for browsing and interacting with OneNote web app using browser-use automation
Playwright
๐ Fetcher MCP - Playwright Headless Browser Server
MCP server for fetch web page content using Playwright headless browser.
Scrappey MCP Server
Allow LLMs to control a browser with Scrappey
Submit Your MCP Server
Share your MCP server with the community
Submit Now