Model Context Protocol
Using the MCP server for Hyperbrowser integration.
Overview
The MCP server provides a standardized interface for AI models to access Hyperbrowser's web automation capabilities. This server implementation supports key functions like web scraping, structured data extraction, and web crawling.
You can see the MCP server code at https://github.com/hyperbrowserai/mcp
Installation
Prerequisites
Node.js (v14 or later)
npm or yarn package manager
Setup
Clone the repository:
Install dependencies:
Build the server:
Configuration
Client Setup
Configure your MCP client to connect to the Hyperbrowser MCP server:
Alternative Setup Using Shell Script
For clients that don't support the env
field (like Cursor):
Edit run_server.sh
to include your API key:
Tools
Scrape Webpage
Retrieves content from a specified URL in various formats.
Method: scrape_webpage
Parameters:
url
: string - The URL to scrapeoutputFormat
: string[] - Desired output formats (markdown
,html
,links
,screenshot
)apiKey
: string (optional) - API key for authenticationsessionOptions
: object (optional) - Browser session configuration
Example:
Extract Structured Data
Extracts data from webpages according to a specified schema.
Method: extract_structured_data
Parameters:
urls
: string[] - List of URLs to extract data from (supports wildcards)prompt
: string - Instructions for extractionschema
: object (optional) - JSON schema for the extracted dataapiKey
: string (optional) - API key for authenticationsessionOptions
: object (optional) - Browser session configuration
Example:
Crawl Webpages
Navigates through multiple pages on a website, optionally following links.
Method: crawl_webpages
Parameters:
url
: string - Starting URL for crawlingoutputFormat
: string[] - Desired output formatsfollowLinks
: boolean - Whether to follow page linksmaxPages
: number (default: 10) - Maximum pages to crawlignoreSitemap
: boolean (optional) - Skip using site's sitemapapiKey
: string (optional) - API key for authenticationsessionOptions
: object (optional) - Browser session configuration
Example:
Session Options
All tools support these common session configuration options:
useStealth
: boolean - Makes browser detection more difficultuseProxy
: boolean - Routes traffic through proxy serverssolveCaptchas
: boolean - Automatically solves CAPTCHA challengesacceptCookies
: boolean - Automatically handles cookie consent popups
Last updated