> For the complete documentation index, see [llms.txt](https://cloudbrowser.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cloudbrowser.gitbook.io/docs/get-started/mcp-server.md).

# MCP Server

An MCP server implementation that provides tools for controlling remote cloud browsers through CloudBrowser.ai with AI-powered automation capabilities.

## Features

* **Remote Browser Management**: Open, close, and control cloud browsers
* **Direct Browser Control**: Puppeteer-based automation via Chrome DevTools Protocol
* **Session Management**: Save and restore browser sessions with cookies/localStorage
* **Remote Desktop Access**: Integration for visual browser control
* **AI-Powered Automation**: Intelligent page content analysis and element interaction
* **Dual Transport**: Support for both stdio and HTTP communication

## Configuration

### Prerequisites

You need a CloudBrowser.ai API token. Get one from [cloudbrowser.ai](https://cloudbrowser.ai).

### Usage with OpenAI Agents, n8n, and Make (HTTP method)

For OpenAI Agents, n8n, and Make integrations, use the HTTP endpoint:

* **Endpoint**: `https://mcp.cloudbrowser.ai`
* **Authorization Header**: `Bearer your_api_token_here`

### Usage with Claude Desktop (STDIO method)

Add this to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "cloudbrowser": {
      "command": "npx",
      "args": ["@cloudbrowser/mcp-server"],
      "env": {
        "CLOUDBROWSER_API_TOKEN": "your_api_token_here"
      }
    }
  }
}
```

## MCP Tools list

### Browser Management

* `open_browser` - Opens a new remote browser instance in the cloud
* `close_browser` - Closes a specific browser instance
* `get_browsers` - Lists all active browser instances
* `start_remote_desktop` - Starts VNC access to a browser
* `stop_remote_desktop` - Stops VNC access to a browser
* `get_saved_sessions` - Lists saved browser sessions
* `remove_saved_session` - Removes a saved session

### Browser Automation

* `connect_to_browser` - Establishes direct control connection to a browser
* `navigate_to_url` - Navigates to a specific URL
* `get_page_content` - Extracts comprehensive page content and structure
* `click_element` - Clicks on page elements using CSS selectors
* `type_text` - Types text into form fields and inputs
* `get_elements` - Gets information about elements matching a selector
* `take_screenshot` - Captures page screenshots
* `evaluate_script` - Executes JavaScript code on the page
