# Bright Data MCP server

> Lets an AI client search the web, scrape pages, run prebuilt scrapers, and automate a remote browser.

- Repository: https://github.com/brightdata/brightdata-mcp
- Page: https://hostedmcp.org/servers/brightdata/brightdata-mcp
- Official: yes
- Transport: stdio
- Stars: 2727
- License: MIT
- Latest version: 4.8.0

## Install

### Claude Code

```sh
claude mcp add --env 'API_TOKEN=<YOUR_API_TOKEN>' brightdata-mcp -- npx -y @brightdata/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "brightdata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@brightdata/mcp"
      ],
      "env": {
        "API_TOKEN": "<YOUR_API_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "brightdata-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@brightdata/mcp"
      ],
      "env": {
        "API_TOKEN": "<YOUR_API_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"brightdata-mcp","type":"stdio","command":"npx","args":["-y","@brightdata/mcp"],"env":{"API_TOKEN":"<YOUR_API_TOKEN>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "brightdata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@brightdata/mcp"
      ],
      "env": {
        "API_TOKEN": "<YOUR_API_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add brightdata-mcp --env 'API_TOKEN=<YOUR_API_TOKEN>' -- npx -y @brightdata/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.brightdata-mcp]
command = "npx"
args = ["-y", "@brightdata/mcp"]

[mcp_servers.brightdata-mcp.env]
API_TOKEN = "<YOUR_API_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'API_TOKEN=<YOUR_API_TOKEN>' brightdata-mcp npx -- -y @brightdata/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "brightdata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@brightdata/mcp"
      ],
      "env": {
        "API_TOKEN": "<YOUR_API_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `API_TOKEN` | yes | yes | Your API key for Bright Data |
| `API_TOKEN` | no | no |  |
| `BASE_MAX_RETRIES` | no | no | Max retries for base tools on transient errors (0-3, default: 0) |
| `BASE_TIMEOUT` | no | no | Request timeout in seconds for base tools (search & scrape). No limit if unset |
| `BROWSER_ZONE` | no | no |  |
| `BROWSER_ZONE` | no | no | Your browser zone name |
| `GROUPS` | no | no | Comma-separated tool group IDs (e.g., 'ecommerce,browser') |
| `RATE_LIMIT` | no | no |  |
| `SERP_ZONE` | no | no |  |
| `TOOLS` | no | no | Comma-separated tool names to enable |

## Tools (34)

- `scrapers`
- `browser`
- `geo`
- `advanced_scraping`
- `search_engine`
- `search_engine_batch`
- `scrape_as_markdown`
- `scrape_batch`
- `session_stats`
- `search_scrapers`
- `get_scraper_details`
- `run_scraper`
- `get_scraper_progress`
- `get_scraper_results`
- `refresh_scrapers`
- `scraping_browser_navigate`
- `scraping_browser_go_back`
- `scraping_browser_go_forward`
- `scraping_browser_snapshot`
- `scraping_browser_click_ref`
- `scraping_browser_type_ref`
- `scraping_browser_fill_form`
- `scraping_browser_screenshot`
- `scraping_browser_get_text`
- `scraping_browser_get_html`
- `scraping_browser_scroll`
- `scraping_browser_scroll_to_ref`
- `scraping_browser_wait_for_ref`
- `scraping_browser_network_requests`
- `chatgpt_ai_insights`
- `perplexity_ai_insights`
- `list_dataset_fields`
- `search_dataset`
- `ask_brightdata_assistant`

## FAQ

### How do I authenticate with the Bright Data MCP server?

You pass a Bright Data API token, either as a token URL parameter on the hosted endpoint or via the API_TOKEN environment variable when running locally with npx.

### Is there a free tier for Bright Data MCP?

Yes, accounts get 5,000 free requests per month that renew monthly, with no credit card required to start.

### How many tools does the Bright Data MCP server expose?

It exposes 30 tools covering web search, scraping, structured data extraction, browser automation, and LLM response collection.

### Can it get around bot detection and CAPTCHAs?

Yes, every request is routed through Bright Data's unblocking infrastructure, which handles bot detection, CAPTCHAs, rate limits, and geo-restrictions.

### Can I run it locally instead of using the hosted server?

Yes, you can run a local instance with npx @brightdata/mcp and supply your API token through the environment.
