{
  "markdown": "# BigQuery Migration Service Managed MCP Extension\n\nThe BigQuery Migration Service managed MCP extension allows users to perform\ntasks such as translating SQL queries into GoogleSQL syntax, generating DDL\nstatements from SQL input queries, and getting explanations of SQL translations.\n\n## Why use the BigQuery Migration Service managed MCP server?\n\nGoogle and Google Cloud\n[managed MCP servers](https://docs.cloud.google.com/mcp/overview) can be used in\nyour AI applications with enterprise-ready governance, security, and access\ncontrol.\n\n## Before you begin\n\n1.  In the Google Cloud console, on the\n    [project selector page](https://console.cloud.google.com/projectselector2/home/dashboard),\n    select or create a Google Cloud project. > **Note**: If you don't plan to\n    keep the resources that you create in this > procedure, create a project\n    instead of selecting an existing project. > After you finish these steps,\n    you can delete the project, removing all > resources associated with the\n    project.\n2.  Get your administrator to grant you the\n    [MCP Tool User role](https://docs.cloud.google.com/iam/docs/roles-permissions/mcp#mcp.toolUser)\n    (`roles/mcp.toolUser`) on the Google Cloud project. If you created a new\n    project, then you already have the required permissions.\n3.  Ensure your administrator has enabled the\n    [BigQuery Migration API](https://console.cloud.google.com/marketplace/product/google/bigquerymigration.googleapis.com)\n    on the Google Cloud project.\n\n## Configure authentication\n\nThis extension uses Google Application Default Credentials (ADC) to perform\nauthentication. To login with ADC, run the following command in your terminal:\n\n```bash\ngcloud auth application-default login\n```\n\nFor additional details, see the\n[ADC documentation](https://docs.cloud.google.com/docs/authentication/application-default-credentials#personal).\n\n## Install the extension\n\nTo install the extension, run the following command in your terminal:\n\n```bash\ngemini extensions install https://github.com/gemini-cli-extensions/bigquery-migration-service\n```\n\n## Available tools\n\nTo see a complete list of available tools and their schemas, see the\n[BigQuery Migration Service MCP reference](https://docs.cloud.google.com/bigquery/docs/reference/migration/mcp).\n\n## Sample use cases\n\nThe following are sample use cases for the BigQuery Migration Service MCP\nserver:\n\n-   Using an MCP client with an IDE, translate a query file into GoogleSQL\n    syntax.\n-   Using an MCP client without an IDE, translate a specified query into\n    GoogleSQL syntax.\n-   Assess translation quality.\n-   Get explanations of SQL translations.\n-   Generate a DDL statement for a specified query.\n\n### Sample prompts\n\nYou can use the following sample prompts to create and manage BigQuery Migration\nService resources:\n\n-   Translate the `DIALECT` query in this `FILENAME`. Use `PROJECT_ID` and\n    `LOCATION`. Persist the output and translation logs into separate\n    directories.\n\n    When you use this prompt, the MCP client calls the translate_query tool to\n    translate the query in the specified file. The MCP client periodically calls\n    the get_translation tool to get the results. After the translation\n    completes, the client writes the output to the output directory and the logs\n    to the logs directory.\n\n-   Translate this query from `DIALECT`: `QUERY`. Use `PROJECT_ID` and\n    `LOCATION`.\n\n    When you use this prompt, the MCP client calls the translate_query tool to\n    translate the specified query and displays the translation results.\n\n-   Assess the translation quality.\n\n    When you use this prompt, the MCP client reads and examines the translation\n    logs and displays a summary of the translation issues with suggested next\n    steps.\n\n-   Explain the translation.\n\n    When you use this prompt, the MCP client calls the explain_translation tool\n    to get an explanation of the translation. If the translation logs contain\n    RelationNotFound or AttributeNotFound errors, the MCP client should suggest\n    that you create a metadata package. If you can't generate the metadata, you\n    can send a prompt that requests the DDL statement.\n\n    A sample response looks like the following:\n\n    > The translated code converts Teradata-specific features into their\n    > BigQuery equivalents. Here's a breakdown of the key changes: * `MACRO` to\n    > `PROCEDURE`: The `YourMacroName` macro was converted into a BigQuery\n    > stored procedure because BigQuery doesn't support macros. * `SELECT INTO`\n    > to `SET`: * For setting multiple `OUT` parameters in\n    > `YourStoredProcedureName`, the `SELECT ... INTO` is changed to `SET\n    > (...) = (SELECT STRUCT(...))`. * For single variable assignment in\n    > `YourOtherProcedureName`, `SELECT ... INTO` is replaced by `SET variable =\n    > (SELECT ...)` which is the standard in BigQuery. * Atomic Operations to\n    > `MERGE: The BEGIN REQUEST ... END REQUEST` blocks in the `ProcedureA`,\n    > `ProcedureB`, and `ProcedureC` procedures, which perform atomic \"update or\n    > insert\" operations, are translated into standard SQL `MERGE` statements.\n    > This is the correct and modern way to handle this logic in BigQuery.\n\n-   Generate DDL for this input query.\n\n    The MCP client calls the generate_ddl_suggestion tool to start a suggestion\n    job. The client gets the suggestion results by calling the\n    fetch_ddl_suggestion tool. When the suggestion is available, the MCP client\n    displays it.\n\n    If the DDL statements are correct, you can send a prompt to prepend the\n    generated DDL statements to the query to improve the translation quality.\n\n-   Prepend the generated DDL statements to the input query and retranslate.\n\n    When you use this prompt, the MCP client prepends the DDL statements to the\n    original input query and calls the translate_query tool. The client calls\n    the get_translation tool to get the translation. The new query translation\n    and the logs persist when they're available.\n\n    If the generated DDL statements are correct, any RelationNotFound or\n    AttributeNotFound errors should be resolved which results in improved\n    translation quality.\n\nIn the prompts, replace the following:\n\n-   `DIALECT`: The dialect of the SQL query you're translating.\n-   `QUERY`: The query you're translating.\n-   `FILENAME`: The file that contains the query you're translating.\n-   `PROJECT_NUMBER`: Your Google Cloud project number.\n-   `LOCATION`: The location of the SQL translator.\n\n## Optional security and safety configurations\n\nMCP introduces new security risks and considerations due to the wide variety of\nactions that you can take with MCP tools. To minimize and manage these risks,\nGoogle Cloud offers defaults and customizable policies to control the use of MCP\ntools in your Google Cloud organization or project. For more information about\nMCP security and governance, see\n[AI security and safety](https://docs.cloud.google.com/mcp/ai-security-safety).\n\n## Quotas and limits\n\nThe BigQuery Migration Service MCP server doesn't have its own quotas. There is\nno limit on the number of calls that can be made to the MCP server. You are\nstill subject to the quotas enforced by the APIs called by the MCP server tools.\n\n## Reference and resources\n\n*   Explore the\n    [BigQuery Migration Service remote MCP server reference documentation](https://docs.cloud.google.com/bigquery/docs/reference/migration/mcp),\n    which includes a list of all available tools, and the full input and output\n    schema for each tool.\n*   See the\n    [BigQuery Migration Service overview](https://docs.cloud.google.com/bigquery/docs/migration-intro).\n*   Learn about\n    [MCP security and governance](https://docs.cloud.google.com/mcp/ai-security-safety).\n",
  "bytes": 7772,
  "sha": "de72dc289b09885315e3bc7ac4c9482b21b324f5ad48c1b56447c9c8e9980d22",
  "repo_slug": "gemini-cli-extensions/bigquery-migration-service",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_gemini_cli_extensions_bigquery_migration_a6e5cb2f/readme"
}