Skip to directory

BigQuery Migration Service MCP

Google Cloud

Streamable HTTP10 documented tools12

About BigQuery Migration Service MCP

Google Cloud managed MCP server for BigQuery Migration Service. Exact tool names and accessible operations depend on the published server reference and configured Google Cloud permissions.

What you can use it for

  • Translates a single SQL query or script into BigQuery SQL. The translation runs asynchronously. Use the get_translation tool with the returned translation ID to poll its state until it is SUCCEEDED or FAILED . Wait at least two seconds before rechecking the state. To translate multiple queries, use the translate_batch_queries tool instead. A SUCCEEDED state means the translator finished, not that the output is correct. Check translation_logs before using the output. Entries with severity ERROR mark parts of the output that are best effort. RelationNotFound , AttributeNotFound and MissingMetadataError mean the translator didn't know the schema of a referenced table or column. Unresolved types can appear in the output as ERROR_TYPE(...) or Error<error-type> , which is not valid BigQuery SQL. To fix the error, provide the schema by using a metadata .ZIP file generated using the BigQuery Migration Service metadata extractor. Upload the file to Cloud Storage and pass the path to the file in metadata_file_path . If the user did not supply a metadata file, ask for it before guessing. Only when no metadata can be provided, use generate_ddl_suggestion to infer approximate DDL from the query. NoSuchFunction means a function the translator couldn't map was copied into the output verbatim, wrapped in backticks. This query should be rewritten manually. The output isn't validated against BigQuery so it must be validated by using a BigQuery dry run, before it is used.
  • Gets the SQL translation for a given translation ID. If the state is not yet SUCCEEDED or FAILED , wait at least two seconds before rechecking the state. When it is SUCCEEDED , check translation_logs for entries with severity ERROR before using translated_query . For information on what the errors mean and how to resolve them, see translate_query .
  • Explains the SQL translation for a given translation ID started by translate_query , what was changed between the source and the translated query, and why it was changed. Use it to understand the translation and its WARNING or ERROR logs. It doesn't change the translated query.
  • Suggests Data Definition Language (DDL) statements for an input query. For example, CREATE TABLE or CREATE VIEW . The generated DDL provides schema definitions for tables and views that are used in the query. To get DDL suggestions, call this tool, and then use the fetch_ddl_suggestion tool with the returned suggestion ID to poll its state until it is SUCCEEDED or FAILED and retrieve the DDL. Wait at least two seconds before rechecking the state. You can then prepend the retrieved DDL to the original input query and translate it again to improve translation quality. Use this as a fallback when no metadata .ZIP file from the source system is available. The suggested columns and types are inferred from how the query uses them, so they are approximate and may not cover every object. Prefer a metadata .ZIP file passed in metadata_file_path of translate_query for exact results, and ask the user for one before falling back to suggestions. Prepend the suggested DDL to the input query and re-translate. Then, remove the prepended DDL statements such as CREATE TABLE or CREATE VIEW from the final query, and show the assumed schema to the user for review.
  • Fetches the DDL suggestion for a given suggestion ID. If the state is not yet SUCCEEDED or FAILED , wait at least two seconds before rechecking the state. The DDL is in suggestion.suggestion_content . For instructions on using it, see generate_ddl_suggestion .
  • Translates a batch of SQL queries stored in Cloud Storage. Before calling this tool, use gcloud storage rsync to stage all input SQL files and any metadata zip or YAML configuration files in Cloud Storage. Pass the path to the files in source_base_uri . If directories are reused between runs, wipe target_base_uri first so that outputs of a previous run are not mixed with the new ones. The translation runs asynchronously. Use the fetch_batch_translation tool with the returned translation ID to poll its state until it is SUCCEEDED or FAILED . Wait at least 10 seconds before rechecking the state.
Connection and setup
Hosting
Google-managed remote
Transport
Streamable HTTP
Endpoint
https://bigquerymigration.googleapis.com/mcp
Authentication
Google Cloud authentication: OAuth 2.0 using Application Default Credentials (ADC) in supported Google clients, or a client OAuth ID/secret or bearer token in compatible third-party clients. The principal needs mcp.tools.call plus the underlying product permissions; API key authentication is only available for services that explicitly support it.

Requirements

  • A Google Cloud project and access to the target product/resource.
  • Enable this MCP service and its underlying Google Cloud API as required by the product guide.
  • An MCP client that supports Streamable HTTP.
  • An identity with the MCP Tool User role (roles/mcp.toolUser) or equivalent mcp.tools.call permission, plus permissions for the underlying product operations.

Setup steps

  1. Choose the correct global or regional endpoint for your data location; this catalog lists the documented endpoint.
  2. In the Google Cloud project, enable the MCP service and the underlying product API if the product guide requires it.
  3. Authenticate the client with Google Cloud ADC (simplest with Antigravity/Gemini CLI) or configure OAuth 2.0 credentials in a compatible client.
  4. Grant the connecting identity roles/mcp.toolUser and only the product IAM roles needed for the intended operations.
  5. Add bigquerymigration.googleapis.com to the client as a Streamable HTTP MCP server and complete sign-in.
  6. Refresh the client tool list and check that the tools match the product reference; availability may depend on permissions and selected toolset.
Tools 10

The 10 stored tool names cover BigQuery SQL translation, translation polling/explanation and DDL suggestions. These create asynchronous migration workflows but do not execute translated SQL against production databases. Translation completion is not a correctness guarantee; inspect error/warning logs. Google Migration API quotas apply.

  • translate_query

    Translates a single SQL query or script into BigQuery SQL. The translation runs asynchronously. Use the get_translation tool with the returned translation ID to poll its state until it is SUCCEEDED or FAILED . Wait at least two seconds before rechecking the state. To translate multiple queries, use the translate_batch_queries tool instead. A SUCCEEDED state means the translator finished, not that the output is correct. Check translation_logs before using the output. Entries with severity ERROR mark parts of the output that are best effort. RelationNotFound , AttributeNotFound and MissingMetadataError mean the translator didn't know the schema of a referenced table or column. Unresolved types can appear in the output as ERROR_TYPE(...) or Error<error-type> , which is not valid BigQuery SQL. To fix the error, provide the schema by using a metadata .ZIP file generated using the BigQuery Migration Service metadata extractor. Upload the file to Cloud Storage and pass the path to the file in metadata_file_path . If the user did not supply a metadata file, ask for it before guessing. Only when no metadata can be provided, use generate_ddl_suggestion to infer approximate DDL from the query. NoSuchFunction means a function the translator couldn't map was copied into the output verbatim, wrapped in backticks. This query should be rewritten manually. The output isn't validated against BigQuery so it must be validated by using a BigQuery dry run, before it is used.

    01
  • get_translation

    Gets the SQL translation for a given translation ID. If the state is not yet SUCCEEDED or FAILED , wait at least two seconds before rechecking the state. When it is SUCCEEDED , check translation_logs for entries with severity ERROR before using translated_query . For information on what the errors mean and how to resolve them, see translate_query .

    02
  • explain_translation

    Explains the SQL translation for a given translation ID started by translate_query , what was changed between the source and the translated query, and why it was changed. Use it to understand the translation and its WARNING or ERROR logs. It doesn't change the translated query.

    03
  • generate_ddl_suggestion

    Suggests Data Definition Language (DDL) statements for an input query. For example, CREATE TABLE or CREATE VIEW . The generated DDL provides schema definitions for tables and views that are used in the query. To get DDL suggestions, call this tool, and then use the fetch_ddl_suggestion tool with the returned suggestion ID to poll its state until it is SUCCEEDED or FAILED and retrieve the DDL. Wait at least two seconds before rechecking the state. You can then prepend the retrieved DDL to the original input query and translate it again to improve translation quality. Use this as a fallback when no metadata .ZIP file from the source system is available. The suggested columns and types are inferred from how the query uses them, so they are approximate and may not cover every object. Prefer a metadata .ZIP file passed in metadata_file_path of translate_query for exact results, and ask the user for one before falling back to suggestions. Prepend the suggested DDL to the input query and re-translate. Then, remove the prepended DDL statements such as CREATE TABLE or CREATE VIEW from the final query, and show the assumed schema to the user for review.

    04
  • fetch_ddl_suggestion

    Fetches the DDL suggestion for a given suggestion ID. If the state is not yet SUCCEEDED or FAILED , wait at least two seconds before rechecking the state. The DDL is in suggestion.suggestion_content . For instructions on using it, see generate_ddl_suggestion .

    05
  • translate_batch_queries

    Translates a batch of SQL queries stored in Cloud Storage. Before calling this tool, use gcloud storage rsync to stage all input SQL files and any metadata zip or YAML configuration files in Cloud Storage. Pass the path to the files in source_base_uri . If directories are reused between runs, wipe target_base_uri first so that outputs of a previous run are not mixed with the new ones. The translation runs asynchronously. Use the fetch_batch_translation tool with the returned translation ID to poll its state until it is SUCCEEDED or FAILED . Wait at least 10 seconds before rechecking the state.

    06
  • fetch_batch_translation

    Retrieves a batch translation workflow's state and logs. If the state is not yet SUCCEEDED or FAILED , wait at least 10 seconds before rechecking the state. When it has finished, use gcloud storage rsync to download the outputs from target_base_uri . Review any translation_logs entries with severity ERROR . These indicate files where the translation is best effort. RelationNotFound and AttributeNotFound mean the schema of a referenced table or column was missing. Provide a metadata zip generated with the BigQuery Migration Service metadata extractor, and ask the user for one if none was supplied. Use generate_batch_ddl_suggestion when no metadata can be provided.

    07
  • generate_batch_ddl_suggestion

    Generates Data Definition Language (DDL) suggestions for a batch of queries stored in Cloud Storage. This is a fallback for when no metadata .ZIP file is available from the source system. The suggested columns and types are inferred from how the queries use them, so they are approximate. The suggestion runs asynchronously. Use the fetch_batch_ddl_suggestion tool with the returned suggestion ID to poll its state until it is SUCCEEDED or FAILED . Wait at least 10 seconds before rechecking the state.

    08
  • fetch_batch_ddl_suggestion

    Retrieves a batch DDL suggestion workflow's state and logs. If the state is not yet SUCCEEDED or FAILED , wait at least 10 seconds before rechecking the state. When it has finished, download the generated DDL from suggestion.cloud_storage_uri , and ask the user to review it. If the user accepts it, upload it as plain .sql files into a directory under source_base_uri . Don't zip the files. .zip is reserved for metadata extractor output. After uploading the files run translate_batch_queries again.

    09
  • translate_metadata

    Translates a metadata .ZIP file into Data Definition Language (DDL) statements and table mappings that are written to target_base_uri . The metadata file is generated by the BigQuery Migration Service metadata extractor and should be uploaded to Cloud Storage. The translation runs asynchronously. Use the fetch_batch_translation tool with the returned translation ID to poll its state until it is SUCCEEDED or FAILED . Wait at least 10 seconds before rechecking the state. If it fails, read the logs returned by fetch_batch_translation to diagnose the issue. After it succeeds, read the results from target_base_uri .

    10
Original sources

Documentation checked 2026-10-28. Connection has not been runtime tested.