Bright Data MCP: Configure Tools and Collect Web Results
Configure a minimal MCP tool set, read explicit sources, preserve provenance, and handle asynchronous scraper snapshots without confusing progress with data.
MCP connectivity, remote job completion, and useful business data are different outcomes. A dependable integration checks each one.
This tutorial reads two explicit book pages, organizes source-linked records, and explains the separate asynchronous platform-scraper path. It requires your own Bright Data token and relevant account access; remote operations may be billable. A locally launched MCP process does not make remote collection local.
Prepare the input addresses
Locate the following pages in your browser, confirm their contents, and copy their full addresses. Obtain service and repository addresses from account integration settings, official setup instructions, or the repository clone menu. Do not derive real addresses from illustrative output.
BOOK_DETAIL_URL_1: the Books to Scrape detail address for A Light in the Attic.BOOK_DETAIL_URL_2: the detail address for Tipping the Velvet on the same site.
Replace each <VARIABLE_NAME> in JSON or task parameters with the copied value before submission; JSON does not expand environment variables. Any example.16yun.cn source in an output illustration shows field structure, not a demo service deployed for this article.
Configure a bounded stdio integration
Use Node.js and an MCP-capable client:
{
"mcpServers": {
"brightdata": {
"command": "npx",
"args": ["-y", "@brightdata/mcp@4.1.0"],
"env": {
"API_TOKEN": "replace-with-your-token",
"TOOLS": "scrape_as_markdown,search_scrapers,get_scraper_details,run_scraper,get_scraper_progress,get_scraper_results"
}
}
}
}Store the real token through the client's private configuration mechanism. Hosted MCP uses a different connection shape; a token-bearing URL is not a substitute for the local API_TOKEN value.
The tool filter enables only the capabilities used here. See the official repository for configuration and tool selection.
Inspect tools and read one source
Reconnect and confirm scrape_as_markdown appears before starting a multi-page task.
Invoke that tool with:
{
"url": "<BOOK_DETAIL_URL_1>"
}This is a tool argument object, not an arbitrary JSON body posted to an MCP root URL. Use the client's discovered schema and MCP call path.
Check that the response contains the intended title and product information. Then invoke the same tool for:
{
"url": "<BOOK_DETAIL_URL_2>"
}The practice site's prices are demonstration data, not commercial observations.
Organize records with evidence
Give the client an explicit bounded instruction:
Use only the tool-returned material from the two URLs specified above.
For each URL, extract the book title, Price (incl. tax), currency, and UPC.
Set fields without supporting evidence to null; do not fill gaps from general knowledge.
Preserve each record's input source URL. List a page that is not a product detail as a failure.
Do not search for additional websites or broaden the collection scope.Save structured JSON before producing a spreadsheet. Every source needs either a usable record or an explicit failure outcome.
This record illustrates the intended structure, not captured remote execution:
{
"source_url": "https://example.16yun.cn/catalogue/a-light-in-the-attic_1000/index.html",
"title": "A Light in the Attic",
"price_including_tax": "51.77",
"currency": "GBP",
"upc": "a897fe39b1053632"
}Verify the tax-inclusive price row, currency, and UPC against the original detail page. Multiple amounts in Markdown cannot be resolved by taking the first number.
Follow the asynchronous scraper path correctly
Platform-specific structured scraping differs from reading a known page:
- Search for the appropriate scraper.
- Inspect its current input and output details.
- Submit inputs matching that schema.
- If it returns a running snapshot ID, retain the ID and inspect progress.
- Retrieve results when available, then check source coverage and required fields.
Use the enabled search_scrapers, get_scraper_details, run_scraper, get_scraper_progress, and get_scraper_results tools in that sequence.
Do not copy a dataset ID or input field from another platform. A snapshot identifies work; it is not itself a business row. A progress object is not a data array.
When waiting ends, keep the ID for continuation rather than submitting duplicate work. Apply a finite application waiting policy and treat pending work as pending. Tool-level waiting does not automatically provide an application-wide hard deadline.
Follow the selected tool's current result pagination instructions instead of preserving only the first available response.
Diagnose local and hosted differences
The local package handles protocol and request orchestration; its remote services perform the relevant collection. Token access, zones, tool versions, and target state can all affect outcomes.
For empty output, first identify the tool, source, and response stage. Then inspect account and zone settings. A success log is not evidence of nonempty useful page content.
External page text is data, not permission to modify MCP configuration, replace credentials, or disable content protections.
Troubleshoot
npx fails: verify the client can locate Node/npm and retrieve the pinned package. Desktop-client PATH may differ from the terminal.
Authentication or account access fails: inspect token permissions and required zones before changing page rules.
Tools are absent: check filters and reconnect. Browser tools are intentionally not included in this configuration.
A snapshot exists but no rows appear: continue progress and result retrieval; do not export the snapshot wrapper as collected data.
Large text lacks a required field: inspect whether the source actually contains it or requires a specialized scraper. Preserve unknown values.
Local and hosted tools differ: compare versions, source, redacted parameters, and account capability. A local implementation cannot establish every hosted behavior.
Retries produce duplicates: check for repeated job creation, retain snapshot identity, and deduplicate business observations by source and batch rather than MCP request number.
Separating material, job identity, and business records turns browser access into a process that can be inspected and repaired.
Need an enterprise proxy plan?
We can tailor architecture to your target domains, concurrency, and reliability goals.