mcpxbridge
v1.0.0
Published
MCP server for browser automation using McpXbridge
Maintainers
Readme
McpXbridge - Model Context Protocol Server for Browser Automation
McpXbridge is a Model Context Protocol (MCP) server that provides browser automation capabilities for AI assistants and applications. It offers a standardized interface for controlling web browsers, enabling seamless integration with MCP-compatible clients such as Cursor, Claude, and other development tools.
Features
- Standards Compliant: Full MCP server implementation following official specifications
- Comprehensive Browser Control: Navigate, interact with elements, and automate web workflows
- Real-time Monitoring: Accessibility tree inspection, console log capture, and screenshot functionality
- Simple Deployment: Quick setup via npx or local installation
- TypeScript Support: Complete type definitions for enhanced development experience
- Cross-Platform: Compatible with Windows, macOS, and Linux environments
System Requirements
- Node.js version 18 or higher
- Chrome or Chromium browser
- McpXbridge browser extension (included)
Installation
Quick Start
npx mcpbridgex@latestLocal Installation
npm install -g mcpbridgex
mcpbridgexConfiguration
Cursor IDE Integration
Create or modify the MCP configuration file in your Cursor settings directory:
File Location:
- Windows:
%APPDATA%/Cursor/User/globalStorage/cursor.mcp/mcp.json - macOS:
~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json - Linux:
~/.config/Cursor/User/globalStorage/cursor.mcp/mcp.json
Configuration (using npx):
{
"mcpServers": {
"mcpbridgex": {
"command": "npx",
"args": ["mcpbridgex"],
"env": {}
}
}
}Configuration (global installation):
{
"mcpServers": {
"mcpbridgex": {
"command": "mcpbridgex",
"args": [],
"env": {}
}
}
}Restart Cursor after saving the configuration file.
Available Tools
Navigation Tools
mcp_mcpbridgex_navigate- Navigate to a specified URLmcp_mcpbridgex_go_back- Navigate to the previous page in browser historygoForward- Navigate to the next page in browser history
Interaction Tools
mcp_mcpbridgex_click- Click on page elements using CSS selectors or ARIA queriesmcp_mcpbridgex_hover- Hover over specified elementstype- Input text into form fields and text areasselectOption- Select options from dropdown menuspressKey- Send keyboard events to the active pagewait- Pause execution for specified time intervals
Inspection Tools
snapshot- Generate accessibility tree snapshots of page contentgetConsoleLogs- Retrieve browser console messages and errorsscreenshot- Capture PNG screenshots of the current page state
Browser Extension Setup
The McpXbridge browser extension facilitates communication between the MCP server and browser tabs:
- Open Chrome or Chromium browser
- Go to the Chrome Web Store
- Search for "McpXbridge" extension
- Click "Add to Chrome" to install the extension
- The extension will connect automatically to your running McpXbridge server
API Reference
McpXbridge implements the Model Context Protocol specification, providing a standardized interface for browser automation. All tools follow MCP conventions for parameter passing and result handling.
Example Usage
// Navigate to a website
await client.callTool('mcp_mcpbridgex_navigate', {
url: 'https://example.com'
});
// Click an element
await client.callTool('mcp_mcpbridgex_click', {
selector: 'button[type="submit"]'
});
// Capture page content
const snapshot = await client.callTool('snapshot');Architecture
McpXbridge consists of:
- MCP Server: Handles client connections and tool execution requests
- Browser Extension: Executes automation commands within browser context
- WebSocket Transport: Manages real-time communication between components
- Tool Registry: Provides standardized browser automation capabilities
Troubleshooting
Common Issues
Server Connection Failed:
- Ensure Node.js version 18+ is installed
- Verify the MCP configuration syntax is correct
- Check that the server process is running
Browser Extension Not Working:
- Confirm the extension is loaded and enabled in Chrome
- Verify the extension has necessary permissions
- Check browser console for error messages
Tool Execution Timeouts:
- Increase wait times for slow-loading pages
- Ensure target elements exist before interaction
- Use snapshots to verify page state before actions
Performance Considerations
- Browser automation tools execute asynchronously
- Large page snapshots may impact performance
- Screenshot generation requires additional processing time
- Multiple concurrent operations should be managed carefully
Security Notes
McpXbridge operates with browser-level permissions and should be used in trusted environments. The extension requires access to active tabs for automation functionality.
Support
For technical support and documentation updates, please refer to the npm package page and version release notes.
License
This software is licensed under the MIT License.
Version: Check npm for the latest release Compatibility: MCP Protocol v1.0+ Node.js: 18.0.0 or higher
