Skip to content

search_engine_batch with Google engine returns raw HTML instead of JSON intermittently #167

Description

@3L1AS

Description

When using the MCP tool with , the response intermittently returns raw HTML instead of parsed JSON. This happens roughly 50% of the time.

Error

Unexpected non-JSON response from Bright Data for search_engine_batch

The error originates inside the compiled .mcpb bundle (), not in any downstream consumer. The bundle appears to pass through the raw Google SERP HTML when the underlying API returns a non-JSON response, without validating or retrying.

Related

Workarounds for consumers

  • Use or for search results
  • Use the tool as an alternative search method

Suggested fix

The MCP server should validate that the Google SERP API response is valid JSON before returning it to the caller. If the response is not JSON, it should either retry the request or return a clear error indicating the upstream API returned unexpected content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions