<br />

This document shows you how to use the Dataform remote Model Context Protocol (MCP) server to connect with AI applications including Antigravity, ChatGPT, Claude, and custom applications you are developing. You can use the Dataform remote MCP server to perform tasks such as managing single-file assets, authoring pipeline code in development workspaces, orchestrating pipelines, and troubleshooting execution failures. The Dataform remote MCP server is enabled when you enable the Dataform API.

[Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro)
(MCP) standardizes how large language models (LLMs) and AI applications or
agents connect to external data sources. MCP servers let you use their tools,
resources, and prompts to take actions and get updated data from their backend
service.

## What's the difference between local and remote MCP servers?

Local MCP servers
:   Typically run on your local machine and use the standard input
    and output streams (stdio) for communication between services on the same
    device.

Remote MCP servers
:   Run on the service's infrastructure and offer an HTTP
    endpoint to AI applications for communication between the AI MCP client and
    the MCP server. For more information about MCP architecture, see
    [MCP architecture](https://modelcontextprotocol.io/docs/learn/architecture).

## Stateless core

With
[MCP version 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28),
MCP changes from a bidirectional, stateful protocol to a stateless protocol.
Each MCP request is self-describing and can be routed using headers. There isn't
a need for the `initialize`/`initialized` handshake or `Mcp-Session-Id` because
each request includes all the information needed in HTTP headers or the `_meta`
parameter. MCP servers can request additional information required by a tool
through
[multi-round-trip requests (MRTR)](https://modelcontextprotocol.io/specification/latest/basic/patterns/mrtr).

To help route and process requests without parsing the request body, some MCP
headers are required, including the following:

- Headers that are required by the MCP specification such as the [protocol version header](https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http#protocol-version-header) and [standard request headers](https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http#standard-request-headers).
- [Custom headers](https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http#custom-headers-from-tool-parameters) that are defined by the MCP server. These headers are mirrored into HTTP headers from the tool's input schema using the `x-mcp-header` property. For example, an MCP server might define a custom header to specify the Google Cloud region or project ID.

For more information about MCP architecture, see the MCP version 2026-07-28
[specification](https://modelcontextprotocol.io/specification/2026-07-28) and
[key changes](https://modelcontextprotocol.io/specification/2026-07-28/changelog).

## Google and Google Cloud remote MCP servers

Google and Google Cloud remote MCP servers have the following features and benefits:

<br />

- Simplified, centralized discovery
- Managed global or regional HTTP endpoints
- Fine-grained authorization
- Optional prompt and response security with Model Armor protection
- Centralized audit logging

For information about other MCP servers and information about security
and governance controls available for Google Cloud MCP servers,
see [Google Cloud MCP servers overview](https://docs.cloud.google.com/mcp/overview.md.txt).

## Before you begin

1. Connect your Dataform repository to a Git provider such as GitHub or GitLab. For more information, see [Connect to a third-party Git repository](https://docs.cloud.google.com/dataform/docs/connect-repository.md.txt).
2. Configure your AI agent with a valid OAuth token using the [BigQuery scope](https://www.googleapis.com/auth/bigquery).

<br />

### Required roles


To get the permissions that
you need to use the Dataform MCP server,

ask your administrator to grant you the
following IAM roles on your Google Cloud project:

- Make MCP tool calls: [MCP Tool User](https://docs.cloud.google.com/iam/docs/roles-permissions/mcp.md.txt#mcp.toolUser) (`roles/mcp.toolUser`)
- Create Dataform repositories, workspaces, and edit files: [Dataform Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/dataform.md.txt#dataform.editor) (`roles/dataform.editor`)
- Run BigQuery jobs: [BigQuery Job User](https://docs.cloud.google.com/iam/docs/roles-permissions/bigquery.md.txt#bigquery.jobUser) (`roles/bigquery.jobUser`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


These predefined roles contain

the permissions required to use the Dataform MCP server. To see the exact permissions that are
required, expand the **Required permissions** section:


#### Required permissions

The following permissions are required to use the Dataform MCP server:

- Make MCP tool calls: `mcp.tools.call`
- Create Dataform repositories, workspaces, and edit files:
  - `dataform.workspaces.create`
  - `dataform.workspaces.get`
  - `dataform.workspaces.list`
  - `dataform.workspaces.delete`
  - `dataform.workspaces.readFile`
  - `dataform.workspaces.writeFile`
  - `dataform.workspaces.moveFile`
  - `dataform.workspaces.removeFile`
  - `dataform.workspaces.queryDirectoryContents`
  - `dataform.workspaces.searchFiles`
  - `dataform.workspaces.commit`
  - `dataform.workspaces.push`
  - `dataform.workspaces.pull`
  - `dataform.workspaces.fetchHistory`
  - `dataform.workspaces.fetchDiff`
  - `dataform.workspaces.fetchFileGitStatuses`
  - `dataform.compilationResults.create`
  - `dataform.compilationResults.get`
  - `dataform.compilationResults.list`
  - `dataform.workflowInvocations.create`
  - `dataform.workflowInvocations.get`
  - `dataform.workflowInvocations.list`
  - `dataform.repositories.get`
  - `dataform.repositories.list`
  - `dataform.repositories.update`
  - `dataform.folders.create`
  - `dataform.locations.get`
  - `dataform.locations.list`
- Run BigQuery jobs:
  - `bigquery.jobs.create`
  - `bigquery.config.get`


You might also be able to get
these permissions
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles.md.txt) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#predefined).

## Authentication and authorization

The Dataform remote MCP server uses the [OAuth 2.0](https://developers.google.com/identity/protocols/oauth2) protocol with [Identity and Access Management (IAM)](https://docs.cloud.google.com/iam/docs/overview.md.txt) for authentication and authorization. All [Google Cloud identities](https://docs.cloud.google.com/docs/authentication/identity-products.md.txt) are supported for authentication to MCP servers.

The Dataform MCP server manages access through the following
authentication and authorization mechanisms:

- Discovery (`tools/list`) requests don't require authentication, which enables agents to identify available Dataform tools without needing prior authorization.
- Execution (`tools/call`) requests are authenticated using OAuth, requiring the agent to provide a valid OAuth token that uses the BigQuery scope. For more information, see [Dataform MCP OAuth scopes](https://docs.cloud.google.com/dataform/docs/use-dataform-mcp.md.txt#mcp-oauth-scopes).

We recommend that you create a separate identity for agents that are using MCP
tools so that access to resources can be controlled and monitored. For more
information about authentication, see
[Authenticate to MCP servers](https://docs.cloud.google.com/mcp/authenticate-mcp.md.txt).

## Dataform MCP OAuth scopes

OAuth 2.0 uses scopes and credentials to determine if an authenticated
principal is authorized to take a specific action on a resource. For more
information about OAuth 2.0 scopes at Google, read
[Using OAuth 2.0 to access Google APIs](https://developers.google.com/identity/protocols/oauth2).

To interact with the Dataform MCP server, the agent must use the
[BigQuery OAuth scope](https://www.googleapis.com/auth/bigquery).
This scope allows the agent to manage transformation code and trigger
executions that run as BigQuery jobs.

Additional scopes might be required on the resources accessed during a tool
call. To view a list of scopes required for
Dataform, see
[Dataform API](https://developers.google.com/identity/protocols/oauth2/scopes#dataform).

## Configure an MCP client to use the Dataform MCP server

AI applications and agents, such as Claude or Antigravity, can instantiate an MCP client that connects to a single MCP server. An AI application can have multiple clients that connect to different MCP servers. If your application isn't listed in the [client-specific guidance](https://docs.cloud.google.com/dataform/docs/use-dataform-mcp.md.txt#client-specific-guidance), then you can use the following information to connect from most applications.

In your AI application, look for a way to add or connect to a remote MCP server.
For the Dataform MCP server, do the following:

- **Server name**: Dataform MCP server
- **Server URL** or **Endpoint** : `https://dataform.REGION.rep.googleapis.com/mcp`

  Replace `REGION` with the region where your repository
  is located, for example, `us-central1`.
- **Transport** : [Streamable HTTP](https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http)

- **Authentication details** : depending on how you want to authenticate, you can
  enter your Google Cloud credentials, your OAuth Client ID
  and secret, or an agent identity and credentials. For more information about
  authentication, see [Authenticate to MCP servers](https://docs.cloud.google.com/mcp/authenticate-mcp.md.txt).

- **OAuth scope** : the [OAuth 2.0 scope](https://developers.google.com/identity/protocols/oauth2/scopes) that
  you want to use when connecting to the Dataform
  MCP server.

For more general guidance, see the following resources:

- [Connect to remote MCP servers](https://modelcontextprotocol.io/docs/develop/connect-remote-servers).
- [Configure MCP in an AI application](https://docs.cloud.google.com/mcp/configure-mcp-ai-application.md.txt).

### Client-specific guidance

For application-specific instructions, consult the following sections:

### Antigravity

To add the Dataform remote MCP server to Antigravity, follow the instructions in
[Antigravity Editor: MCP Integration](https://antigravity.google/docs/mcp). You can
authenticate with
[Application Default Credentials (ADC)](https://antigravity.google/docs/mcp#google-credentials)
or a [client ID and secret](https://antigravity.google/docs/mcp#oauth).

### Gemini CLI

> [!IMPORTANT]
> **Important:** Unpaid tier and Google One users: Gemini CLI will be replaced by Antigravity CLI on June 18, 2026. To learn more, see [An important update: Transitioning Gemini CLI to Antigravity CLI](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/).

To add the Dataform remote MCP server to your Gemini CLI,
configure it as an extension and
[authenticate](https://geminicli.com/docs/tools/mcp-server/#authentication-provider-type)
using Google Application Default Credentials (ADC).

1. Use your gcloud CLI credentials to configure your [Application Default Credentials (ADC)](https://docs.cloud.google.com/docs/authentication/application-default-credentials.md.txt):

   ```bash
   gcloud auth application-default login
   ```

   If the MCP server you're using requires OAuth scopes beyond the default
   `https://www.googleapis.com/auth/cloud-platform` scope, then
   use the
   [`--scopes` flag](https://docs.cloud.google.com/sdk/gcloud/reference/auth/application-default/login.md.txt#--scopes)
   to include those scopes.
2. Create an extension file in the following location:
   `~/.gemini/extensions/EXT_NAME/gemini-extension.json` where
   `~/` is your home directory and <var translate="no">EXT_NAME</var> is the name you want to
   give the extension.

3. Save the following content in your extension file:

   ```json
   {
     "name": "EXT_NAME",
     "version": "1.0.0",
     "mcpServers": {
       "dataform-mcp": {
         "httpUrl": "https://dataform.REGION.rep.googleapis.com/mcp",
         "authProviderType": "google_credentials",
         "oauth": {
           "scopes": ["https://www.googleapis.com/auth/bigquery"]
         },
         "timeout": 30000,
         "headers": {
           "x-goog-user-project": "PROJECT_ID"
         }
       }
     }
   }
   ```

   Replace the following:
   - <var translate="no">EXT_NAME</var>: the name of the extension.
   - <var translate="no">PROJECT_ID</var>: your Google Cloud project ID.

   For services that don't require OAuth scopes, you can omit the
   `"oauth"` section.

   For services like [Antigravity](https://antigravity.google/docs/get-started)
   that support bearer tokens, add the `"Authorization"` parameter to the
   `"headers"` section of the JSON file:

   ```json
   {
     ...
         "headers": {
           "Authorization": "Bearer YOUR_TOKEN",
           "x-goog-user-project": "PROJECT_ID"
   }
   ```

   Replace <var translate="no">YOUR_TOKEN</var> with your bearer token. You can generate a
   token by running the
   [`gcloud auth application-default print-access-token` command](https://docs.cloud.google.com/sdk/gcloud/reference/auth/application-default/print-access-token.md.txt).
4. Start Gemini CLI:

   ```bash
   gemini
   ```
5. Run `/mcp` to view your configured MCP server and its tools.

   The response is similar to the following:

   ```
   Configured MCP servers:
   🟢 BigQuery (from bigquery-mcp) - Ready (5 tools)
     Tools:
     - execute_sql
     - get_dataset_info
     - get_table_info
     - list_dataset_ids
     - list_table_ids
   ```

The remote MCP server is ready to use in Gemini CLI.

### Claude.ai

To add the Dataform remote MCP server to Claude.ai, configure a
custom connector with an OAuth client ID and OAuth client secret:

1. Create an OAuth 2.0 client ID and secret:

   1. In the Google Cloud console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized JavaScript origins** section, click **+ Add URI** , and then
      enter `https://claude.ai` in the **URIs** field.

   5. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   6. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   7. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

2. Follow the instructions to [create a custom connector](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). Enter your Client ID and secret in the **Advanced settings** menu.

### Claude Code

To add the Dataform remote MCP server to Claude Code, configure a
custom connector with an OAuth client ID and OAuth client secret:

1. [Install Claude Code](https://code.claude.com/docs/en/quickstart).
2. Create an OAuth 2.0 client ID and secret:

   1. In the Google Cloud console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

3. Follow the instructions to [create a custom connector](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). Enter your Client ID and secret in the **Advanced settings** menu.

### Claude Desktop

To add the Dataform remote MCP server to Claude Desktop, configure a
custom connector with an OAuth client ID and OAuth client secret:

1. [Install Claude Desktop](https://support.claude.com/en/articles/10065433-install-claude-desktop).
2. Create an OAuth 2.0 client ID and secret:

   1. In the Google Cloud console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

3. Follow the instructions to [create a custom connector](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). Enter your Client ID and secret in the **Advanced settings** menu.

### ChatGPT

You must have a [ChatGPT Business subscription](https://chatgpt.com/business/)
to use the Dataform remote MCP server with ChatGPT.

To add the Dataform remote MCP server to ChatGPT, create a
Google OAuth 2.0 client ID and secret, and then add the MCP server as a plugin in ChatGPT.

#### Create an OAuth 2.0 client ID and secret

1. In the Google Cloud console, go to
   **Google Auth Platform \> Clients \> Create client**.

   [Go to Create client](https://console.cloud.google.com/auth/clients/create)

   You are prompted to create a project if you don't have one selected.
2. In the **Application type** list, select **Web application**.

3. In the **Name** field, enter a name for your application.

4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
   enter `https://chatgpt.com/connector_platform_oauth_redirect` in the **URIs** field.

5. Click **Create**. The client is created.

   The **OAuth 2.0 client created** dialog opens.
6. In the **Client secrets** section, copy the **Client secret** and save it
   in a secure place. You can only copy it once. If you lose it, delete the
   secret and create a new one.

   > [!CAUTION]
   > **Caution:** Treat client secrets like passwords and store them in a secure place.

#### Add the MCP server as a plugin in ChatGPT

1. Sign in to ChatGPT.
2. To add an MCP server to ChatGPT, follow the instructions in [Build a plugin](https://developers.openai.com/plugins/build/plugins).
3. Enter your client ID and secret as needed for authentication.

The MCP server is displayed in the **Plugins** menu, and is ready for
use through chat prompts.

### Cursor

To add the Dataform remote MCP server to Cursor, create a client ID and secret, and
then configure the MCP server with static OAuth. Cursor uses different redirect URIs depending on
how you're accessing Cursor---through the web or a desktop application.

1. Create an OAuth 2.0 client ID and secret:

   ### Web or Cursor agents

   1. In the Google Cloud console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://www.cursor.com/agents/mcp/oauth/callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

   ### Desktop

   1. In the Google Cloud console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `http://localhost:8787/callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

2. Follow the instructions to [Configure the MCP server
   with static OAuth](https://cursor.com/docs/mcp#static-oauth-for-remote-servers).
3. [Use the MCP server in Chat](https://cursor.com/docs/mcp#using-mcp-in-chat).

### OpenCode CLI

To add the Dataform remote MCP server to
[OpenCode CLI](https://opencode.ai/docs/),
follow the instructions in [OpenCode: MCP](https://opencode.ai/docs/cli/#mcp).

### Replit

To add the Dataform remote MCP server to [Replit](https://replit.com),
follow the instructions in
[Replit: MCP Servers Overview](https://docs.replit.com/references/mcp/overview#mcp-servers-overview).

### Visual Studio Code

To configure the Dataform remote MCP server in Visual Studio Code (VS Code), do the following:

1. Install [VS Code](https://code.visualstudio.com/).
2. Open VS Code and then open the **Command palette** by pressing <kbd>Control+Shift+P</kbd> (Windows or Linux) or <kbd>Command+Shift+P</kbd> (macOS).
3. In the Command palette, select **MCP: Add Server...**.
4. Select **HTTP (HTTP or server-sent events)**.
5. Enter the MCP endpoint `https://dataform.REGION.rep.googleapis.com/mcp` and then press <kbd>Enter</kbd>.
6. Enter a name for the server and then press <kbd>Enter</kbd>.
7. If you want to make the MCP server available to all workspaces, select **Global** .
   If you want to make the MCP server available to only the current workspace, select
   **Workspace**.

   Your `mcp.json` file is updated with the server information.

#### Authenticate to the MCP server

You can use an OAuth client ID and secret or
[Application Default Credentials](https://docs.cloud.google.com/docs/authentication.md.txt#adc)
(ADC) to authenticate to the MCP server.

**Note**: If you use ADC for authentication, then you need to regenerate your access token
every hour.

#### OAuth Client ID

1. In VS Code, open the Chat pane by pressing <kbd>Control+Alt+I</kbd> (Windows or Linux) or <kbd>Shift+Command+I</kbd> (macOS).
2. In the Chat pane, select **Set agent** , and then select **Agent**.

3. The first time you use the MCP server, you'll be prompted to set up authentication.
   To use the MCP server, enter a prompt in chat that uses one of the available tools. If
   you're not sure which tool to use, then you can ask the agent to list the tools for the
   server.

   For example, you can enter the following prompt to list the available tools:
   "List the tools available for <var translate="no">SERVER_NAME</var>", where <var translate="no">SERVER_NAME</var>
   is the name you gave the MCP server.

   The **Dynamic client registration not supported** dialog opens.
4. Click **copy URIs and proceed**.
5. You won't need the copied URLs, so there's no need to record them.

<!-- -->

1. In the Google Cloud console, go to
   **Google Auth Platform \> Clients \> Create client**.

   [Go to Create client](https://console.cloud.google.com/auth/clients/create)

   You are prompted to create a project if you don't have one selected.
2. In the **Application type** list, select **Desktop app**.

3. In the **Name** field, enter a name for your application.

4. Click **Create**. The client is created.

   The **OAuth 2.0 client created** dialog opens.
5. In the **Client secrets** section, copy the **Client secret** and save it
   in a secure place. You can only copy it once. If you lose it, delete the
   secret and create a new one.

   > [!CAUTION]
   > **Caution:** Treat client secrets like passwords and store them in a secure place.

##### Configure VS Code to use your OAuth client ID and secret

1. In VS Code, enter your OAuth client ID and then press <kbd>Enter</kbd>.
2. When prompted, enter your OAuth client secret and then press <kbd>Enter</kbd>.
3. In the **VS Code** dialog that opens, click **Allow**.

   The agent completes the MCP tool call and responds in chat.

#### Clear cached credentials

VS Code caches dynamic authentication providers to streamline your login experience. If you
previously entered credentials, and want to enter new credentials, you must clear the cached
credentials.

To clear cached credentials, do the following:

1. In VS Code, open the **Command palette** by pressing <kbd>Control+Shift+P</kbd> (Windows or Linux) or <kbd>Command+Shift+P</kbd> (macOS).
2. In the **Command palette** , select
   **Authentication: Remove dynamic authentication providers**, and then select the client ID
   that you want to remove your cached credentials for.

3. Reload VS Code and connect to a remote MCP server again.

   You are prompted to enter
   your OAuth Client ID and secret.

#### ADC

1. Set up [Application Default Credentials (ADC)](https://docs.cloud.google.com/docs/authentication/provide-credentials-adc.md.txt) for your environment.
2. If you're using a local shell, then create local authentication credentials for your
   user account:

   ```
   gcloud auth application-default login
   ```
3. Generate an application default token by running the following command:

   ```
   gcloud auth application-default print-access-token
   ```
4. In your `mcp.json` file, add the following to your MCP server entry:

   ```
   "headers": {
         "Authorization": "Bearer TOKEN",
         "x-goog-user-project": "PROJECT_ID"
       }
   ```

   Replace the following:
   - <var class="edit" scope="TOKEN" translate="no">TOKEN</var>: the application default token.

   - <var class="edit" scope="PROJECT_ID" translate="no">PROJECT_ID</var>: your Google Cloud project ID.

   The following example shows an MCP server entry that uses ADC for authentication:

   ```
   {
     "servers": [
       {
         "name": "My Dataform MCP Server",
         "uri": "https://dataform.REGION.rep.googleapis.com/mcp",
         "headers": {
           "Authorization": "Bearer nYkwroEYjN4Fw1TTNhe69F4rR6o9bvrR1P4U1l0DVq9p81sN0",
           "x-goog-user-project": "my-project"
         }
       }
     ]
   }
   ```
5. In VS Code, open the Chat pane by pressing <kbd>Control+Alt+I</kbd> (Windows or Linux) or <kbd>Shift+Command+I</kbd> (macOS).
6. In the Chat pane, select **Set agent** , and then select **Agent**.

7. Send a prompt to the agent that uses one of the available MCP tools. If you're not sure which tool to use, then you can ask the agent to list the tools for the MCP server.

## Agent capabilities

The Dataform MCP server provides a set of tools that enable AI
agents to interact with and debug data transformation workflows by
orchestrating Dataform API calls. The server provides tools to do the
following:

- **Author pipeline code**. Agents can create and list development workspaces, search and edit multiple files, and commit or push changes to remote Git providers such as GitHub or GitLab.
- **Set up single-file assets**. Agents manage basic resource setups, including repository creation and directory content queries.
- **Manage pipelines and releases**. Agents manage workflow and release configurations, generate compilation results, and trigger or cancel workflow invocations.
- **Troubleshoot and validate**. Agents identify why pipelines fail by retrieving compilation results and querying workflow invocation actions.

For repositories connected to a remote Git host, the agent must use workspace
tools such as `create_workspace` and `commit_workspace_changes` for pipeline
development. Direct repository tools fail on these repositories, because such
tools are intended only for single-file assets in Google-hosted repositories.

## Available tools

To view details of available MCP tools and their descriptions for the
Dataform MCP server, see the
[Dataform MCP reference](https://docs.cloud.google.com/dataform/docs/reference/mcp.md.txt).

### List tools

Use the [MCP inspector](https://modelcontextprotocol.io/docs/tools/inspector) to list tools, or send a
`tools/list` HTTP request directly to the Dataform
remote MCP server. The `tools/list` method doesn't require authentication.

> [!NOTE]
> **Note:** The global endpoint, `https://dataform.googleapis.com/mcp`, supports only `tools/list`. Tool calls must be sent to the regional endpoint for the region where your repository is located. Configure your MCP client to use the regional endpoint.

    curl -X POST https://dataform.REGION.rep.googleapis.com/mcp \
        -H 'Content-Type: application/json' \
        -H 'Accept: application/json' \
        -H 'MCP-Protocol-Version: MCP_PROTOCOL_VERSION' \
        -H 'Mcp-Method: tools/list' \
        -d '{
          "jsonrpc": "2.0",
          "id": 1,
          "method": "tools/list",
          "params": {
            "_meta": {
              "io.modelcontextprotocol/protocolVersion": "MCP_PROTOCOL_VERSION",
              "io.modelcontextprotocol/clientCapabilities": {
                "extensions": {
                  "io.modelcontextprotocol/ui": {
                    "mimeTypes": ["text/html;profile=mcp-app"]
                  }
                }
              }
            }
          }
        }'

Replace the following:

- <var translate="no">`REGION`</var>: the region where your repository is located, for example, `us-central1`.
- <var translate="no">`MCP_PROTOCOL_VERSION`</var>: the MCP protocol version. For example, `2026-07-28`.

## Sample prompts

Use the following sample prompts to get information about
Dataform resources, author pipeline code in workspaces,
orchestrate workflows, or troubleshoot executions:

- "Create a new Dataform repository named <var translate="no">`REPOSITORY_ID`</var> in project <var translate="no">`PROJECT_ID`</var>."
- "Create a new folder named <var translate="no">`FOLDER_NAME`</var> in my project."
- "Create a new workspace named <var translate="no">`WORKSPACE_NAME`</var> in my repository."
- "Search for files named <var translate="no">`FILE_NAME`</var> in my workspace."
- "Read the contents of <var translate="no">`FILE_NAME`</var> from my workspace."
- "Commit my workspace changes and push them to the remote Git branch."
- "Create a new notebook asset in project <var translate="no">`PROJECT_ID`</var>."
- "Commit the changes to my saved query in <var translate="no">`REPOSITORY_ID`</var>."
- "Create a workflow configuration that schedules my pipeline to run every day at 8:00 AM."
- "Trigger a new execution for the <var translate="no">`WORKFLOW_CONFIGURATION_ID`</var> workflow configuration."
- "Check the status of my recent pipeline executions and tell me if any failed, including the error details."
- "Show me the details of the specific execution that failed."
- "List all Dataform repositories in the <var translate="no">`REGION`</var> region of project <var translate="no">`PROJECT_ID`</var>."
- "Cancel the workflow invocation named <var translate="no">`WORKFLOW_INVOCATION_ID`</var> in repository <var translate="no">`REPOSITORY_ID`</var>, which is now running."

In the prompts, replace the following:

- <var translate="no">`FILE_NAME`</var>: the name of the file.
- <var translate="no">`FOLDER_NAME`</var>: the name of the folder.
- <var translate="no">`PROJECT_ID`</var>: the Google Cloud project ID.
- <var translate="no">`REGION`</var>: the name of the region.
- <var translate="no">`REPOSITORY_ID`</var>: the unique identifier for your Dataform repository, for example, `quickstart-repository`.
- <var translate="no">`WORKFLOW_CONFIGURATION_ID`</var>: the unique identifier of the workflow configuration.
- <var translate="no">`WORKFLOW_INVOCATION_ID`</var>: the unique identifier for a specific workflow execution. You can get this identifier from the results of a `workflowInvocations.list` request or from the `name` field of a `workflowInvocations.create` response.
- <var translate="no">`WORKSPACE_NAME`</var>: the name of the workspace.

## Optional security and safety configurations

MCP introduces new security risks and considerations due to the wide variety of
actions that you can do with the MCP tools. To minimize and manage these risks,
Google Cloud offers default settings and customizable policies to
control the use of MCP tools in your Google Cloud organization or project.

For more information about MCP security and governance, see
[AI security and safety](https://docs.cloud.google.com/mcp/ai-security-safety.md.txt).

### Use Model Armor

<br />

[Model Armor](https://docs.cloud.google.com/model-armor/overview.md.txt) is a
Google Cloud service designed to enhance the security and
safety of your AI applications. It works by proactively screening LLM prompts
and responses, protecting against various risks and supporting responsible AI
practices. Whether you are deploying AI in your cloud environment, or on
external cloud providers, Model Armor can help
you prevent malicious input, verify content safety, protect sensitive data,
maintain compliance, and enforce your AI safety and security policies
consistently across your diverse AI landscape.

When Model Armor is enabled with
[logging enabled](https://docs.cloud.google.com/model-armor/configure-logging.md.txt), Model Armor logs the entire
payload. This might expose sensitive information in your logs.

#### MCP request routing to Model Armor

The Dataform MCP server uses [cross-jurisdictional routing](https://docs.cloud.google.com/mcp/model-armor-supported-products.md.txt#cross-jurisdictional-routing). When you enable Model Armor, the MCP server sends all requests to Model Armor for screening. Cross-jurisdictional routing might break existing data residency compliance commitments for in-use and in-transit data. For more information about the behavior of other MCP servers, see [Model Armor supported products](https://docs.cloud.google.com/mcp/model-armor-supported-products.md.txt).

<br />

#### Enable Model Armor

You must enable Model Armor APIs before you can use Model Armor.

### Console

1.


   Enable the Model Armor API, if it is not already enabled.


   **Roles required to enable APIs**


   To enable APIs, you need the `serviceusage.services.enable` permission. If you
   created the project, then you likely already have this permission through the
   Owner role (`roles/owner`). Otherwise, you can get this permission through the
   Service Usage Admin role (`roles/serviceusage.serviceUsageAdmin`).
   [Learn how to grant roles](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).

   [Enable the API](https://console.cloud.google.com/apis/enableflow?apiid=modelarmor.googleapis.com)

   <br />

2. Select the project where you want to activate Model Armor.

### gcloud

Before you begin, follow these steps using the Google Cloud CLI with the
Model Armor API:

1.


   In the Google Cloud console, activate Cloud Shell.

   [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)


   At the bottom of the Google Cloud console, a
   [Cloud Shell](https://docs.cloud.google.com/shell/docs/how-cloud-shell-works.md.txt)
   session starts and displays a command-line prompt. Cloud Shell is a shell environment
   with the Google Cloud CLI
   already installed and with values already set for
   your current project. It can take a few seconds for the session to initialize.

   <br />

2.

   Run the following command to set the API endpoint for the
   Model Armor service.

   ```bash
   gcloud config set api_endpoint_overrides/modelarmor "https://modelarmor.LOCATION.rep.googleapis.com/"
   ```

   Replace `LOCATION` with the region where you want to use
   Model Armor.

   <br />

#### Configure protection for Google and Google Cloud remote MCP servers

To help protect your MCP tool calls and responses you can use
Model Armor floor settings. A floor setting defines the minimum
security filters that apply across the project. This configuration applies a
consistent set of filters to all MCP tool calls and responses within
the project.

> [!TIP]
> **Tip:** Don't enable the prompt injection and jailbreak filter unless your MCP traffic carries natural language data.

Set up a Model Armor floor setting with MCP sanitization
enabled. For more information, see [Configure Model Armor floor
settings](https://docs.cloud.google.com/model-armor/configure-floor-settings).

> [!NOTE]
> **Note:** If the agent and the MCP server are in different projects, you can create floor settings in both projects (the client project and the resource project). In this case, Model Armor is invoked twice, once for each project.

See the following example command:

```bash
gcloud model-armor floorsettings update \
--full-uri='projects/PROJECT_ID/locations/global/floorSetting' \
--enable-floor-setting-enforcement=TRUE \
--add-integrated-services=GOOGLE_MCP_SERVER \
--google-mcp-server-enforcement-type=INSPECT_AND_BLOCK \
--enable-google-mcp-server-cloud-logging \
--malicious-uri-filter-settings-enforcement=ENABLED \
--add-rai-settings-filters='[{"confidenceLevel": "MEDIUM_AND_ABOVE", "filterType": "DANGEROUS"}]'
```

Replace `PROJECT_ID` with your Google Cloud project ID.

Note the following settings:

- <var translate="no">`INSPECT_AND_BLOCK`</var>: The enforcement type that inspects content for the Google MCP server and blocks prompts and responses that match the filters.
- <var translate="no">`ENABLED`</var>: The setting that enables a filter or enforcement.
- <var translate="no">`MEDIUM_AND_ABOVE`</var>: The confidence level for the Responsible AI - Dangerous filter settings. You can modify this setting, though lower values might result in more false positives. For more information, see [Model Armor confidence levels](https://docs.cloud.google.com/model-armor/overview.md.txt#ma-confidence-levels).

#### Disable scanning MCP traffic with Model Armor

To stop Model Armor from automatically scanning traffic to and
from Google MCP servers based on the project's floor settings, run the following
command:

```bash
gcloud model-armor floorsettings update \
  --full-uri='projects/PROJECT_ID/locations/global/floorSetting' \
  --remove-integrated-services=GOOGLE_MCP_SERVER
```

Replace `PROJECT_ID` with the Google Cloud project
ID. Model Armor doesn't automatically apply the rules defined in
this project's floor settings to any Google MCP server traffic.

Model Armor floor settings and general configuration can impact
more than just MCP. Because Model Armor integrates with services
like Vertex AI, any changes you make to floor settings can affect
traffic scanning and safety behaviors across all integrated services, not just
MCP.

### Control MCP use with IAM deny policies

Identity and Access Management (IAM)
[deny policies](https://docs.cloud.google.com/iam/docs/deny-overview.md.txt) and
[allow policies](https://docs.cloud.google.com/iam/docs/allow-policies.md.txt) help you
secure Google Cloud and Google MCP servers.

You can combine multiple criteria to build customized security and governance
policies by allowing or denying access based on the following:

- The principal.
- Tool properties like the read-only attribute.
- The service name or tool name.
- The application's OAuth client ID.

For more information, see
[Control MCP use with Identity and Access Management](https://docs.cloud.google.com/mcp/control-mcp-use-iam.md.txt).

## What's next

- Read the [Dataform MCP reference documentation](https://docs.cloud.google.com/dataform/docs/reference/mcp.md.txt).
- Learn more about [Google Cloud MCP servers](https://docs.cloud.google.com/mcp/overview.md.txt).