> [!WARNING]
>
> **Preview**
>
>
> This product is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://developers.google.com/terms/service-terms#1).
>
> Pre-GA products are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

The Google Pay \& Wallet Developer MCP server gives AI-powered development tools the ability to
access your Google Pay and Google Wallet developer data, search official
documentation, and manage your integrations.

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

The Google Pay \& Wallet Developer MCP server lets you:

- **Search documentation**: Get up-to-date guidance and code samples from official Google Pay and Google Wallet docs.
- **Manage integrations**: Check the status of your integrations and enable APIs for your merchant account.
- **Monitor performance**: Access aggregated performance data and error metrics for your merchant account.
- **Manage passes**: List pass issuers and classes for Google Wallet.

  > [!NOTE]
  > **Note:** Check the Pay \& Wallet Developer [reference](https://developers.google.com/pay/api/web/reference/mcp.md.txt) to view details of available MCP tools and their descriptions.

## Sample prompts

You can use the following prompts with your AI assistant:

- "List my Google Pay accounts."
- "What is the status of my Google Pay integrations?"
- "How can I integrate Google Pay with React?"
- "Show me Google Pay error metrics for my integration over the last 30 days."
- "List my Google Wallet pass classes."

## Before you begin

To use the Google Pay \& Wallet Developer MCP server, you must create a Google Cloud project and
enable the Google Pay \& Wallet Developer MCP server.

1. In your Cloud console, on the project selector page, select or create a Google Cloud project.

   [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)
2.


   Enable the Pay \& Wallet Developer 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://developers.google.com/iam/docs/granting-changing-revoking-access).

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

## Authentication and authorization

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

The Google Pay \& Wallet Developer MCP server does not accept API keys.

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

### Google Pay \& Wallet Developer MCP server 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).

The Google Pay \& Wallet Developer MCP server has the following MCP tool OAuth scopes:

| Scope URI for gcloud CLI | Description |
|---|---|
| `https://www.googleapis.com/auth/paydeveloper.merchant` | Manage Google Pay merchant data. |
| `https://www.googleapis.com/auth/paydeveloper.issuer.readonly` | Read Google Wallet issuer data. |

### Create an OAuth 2.0 client ID and secret

To create an OAuth 2.0 client ID and secret, follow these steps:

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

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

   > [!NOTE]
   > You'll need to create a new application in the Google Auth Platform if you don't have one yet. Click the "Get started" button on the overview page and fill out the necessary information.

2. In the **Application type** list, select the appropriate type for your AI application:

   - For **Cursor Desktop** , **Claude Code** , **Claude.ai** , **ChatGPT** , and **Antigravity** , select **Web application**.
   - For **Antigravity CLI** , **Antigravity IDE** , and **VS Code** , select **Desktop app**.
3. In the **Name** field, enter a name for your application.

4. If you selected **Web application** , in the **Authorized redirect URIs** section, click **+ Add URI**, and then add the required redirect URI for your AI application:

   ### Cursor Desktop

   `http://localhost:8787/callback`

   ### Claude Code

   ```
   http://localhost:CLAUDE_REDIRECT_PORT/callback
   ```

   ### Claude.ai

   `https://claude.ai/api/mcp/auth_callback`

   ### ChatGPT

   You can leave the `redirect_uri` blank for now. ChatGPT generates a `redirect_uri` when the app is created (see [Configure your AI application](https://developers.google.com/wallet/tickets/transit-passes/qr-code/getting-started/use-pay-wallet-mcp.md.txt#configure-app) below).

   > [!NOTE]
   > **Note:** In the **Authorized JavaScript origins** section, click **+ Add URI** , and then add `https://chatgpt.com` in the **URIs** field.

   ### Antigravity

   `https://antigravity.google/oauth-callback`
5. Click **Create**. Upon creation, the client secret is displayed once. Copy it and store it securely.

### Configure your AI application

Next, you need to provide your AI application with the server configuration
details.

### VS Code

1. Click the icon at the top of the chat side panel and navigate to **MCP Servers**.
2. Click the **Add Server** button (), select **HTTP** and enter the URL pointing to the Pay \& Wallet Developer MCP server: `https://paydeveloper.googleapis.com/mcp`.   
   Your MCP configuration is saved in the `.vscode/mcp.json` file in your workspace:

   ```json
   {
     "servers": {
       "google-pay-wallet-dev": {
         "url": "https://paydeveloper.googleapis.com/mcp"
       }
     }
   }
   ```
3. Right-click the new MCP server and select **Start Server**.
4. Go back to the chat window and call a tool in the MCP server to trigger the authentication process. For example: "List my Google Pay accounts".
5. The **Dynamic Client Registration** not supported dialog opens as expected. Click any button to close the dialog.
6. Enter your **OAuth client ID** and press enter.
7. When prompted, enter your **OAuth client secret** and press enter.
8. A dialog to authenticate opens, click **Allow**.
9. You can choose from a list of authenticated identities, or sign in with a new account.
10. After authenticating, the tool is called and the session continues in the chat window.

### Cursor Desktop

To configure Cursor Desktop:

1. Click **Customize** on the left side panel.
2. Click **New MCP Server** . This opens the `mcp.json` configuration file.
3. Enter the configuration details to add the Google Pay \& Wallet Developer MCP server:

   ```json
   {
     "mcpServers": {
       "google-pay-wallet-dev": {
         "url": "https://paydeveloper.googleapis.com/mcp",
         "auth": {
           "CLIENT_ID": "CURSOR_DESKTOP_CLIENT_ID",
           "CLIENT_SECRET": "CURSOR_DESKTOP_CLIENT_SECRET"
         }
       }
     }
   }
   ```
4. Upon saving the file, the list of MCP servers is updated.
5. Click **Authenticate** to start the authentication process.

### Claude Code

To configure Claude Code, run the following command:

```bash
MCP_CLIENT_SECRET=CLAUDE_CODE_CLIENT_SECRET claude mcp add --transport http \
  --client-id CLAUDE_CODE_CLIENT_ID --client-secret --callback-port CLAUDE_REDIRECT_PORT \
  google-pay-wallet-dev https://paydeveloper.googleapis.com/mcp
```

### Claude.ai

To configure Claude.ai:

1. Navigate to **Customize** \> **Connectors**.
2. Click **Add** and choose **Add custom connector**.
3. Enter the following details: **Server name** : `Google Pay & Wallet MCP`.

   <!-- -->

   **Remote MCP server URL** `https://paydeveloper.googleapis.com/mcp`.
4. In **Advanced settings** enter your **OAuth client ID** and **OAuth client secret**.
5. Select the new connector and click **Connect**.

### ChatGPT

To configure ChatGPT:

1. Enable **Developer mode** from **Settings** \> **Security and login**.
2. Select **Plugins** in the main side panel, and click the button.
3. Enter the following details: **Name** : `Google Pay & Wallet MCP`.

   <!-- -->

   **Server URL** : `https://paydeveloper.googleapis.com/mcp`
4. Go to **Advanced settings** and enter your OAuth client ID and secret.
5. Copy the dynamic callback URL and add it to the OAuth client created in the previous step.

### Antigravity CLI

1. To configure [Antigravity CLI](https://antigravity.google/product/antigravity-cli), add the following to your
   `~/.gemini/config/mcp_config.json` file:

   ```json
   {
     "mcpServers": {
       "google-pay-wallet-dev": {
         "serverUrl": "https://paydeveloper.googleapis.com/mcp",
         "oauth": {
           "clientId": "AGY_CLI_CLIENT_ID",
           "clientSecret": "AGY_CLI_CLIENT_SECRET"
         }
       }
     }
   }
   ```
2. Run `/mcp`, select your new MCP server, and choose **Authenticate** to start the authentication process.

### Antigravity IDE

1. Click at the top of the editor's agent side panel and select **MCP Servers**.
2. Click **Manage MCP Servers**.
3. Click **View raw config** and add your MCP server details:

   ```json
   {
     "mcpServers": {
       "google-pay-wallet-dev": {
         "serverUrl": "https://paydeveloper.googleapis.com/mcp",
         "oauth": {
           "clientId": "ANTIGRAVITY_IDE_CLIENT_ID",
           "clientSecret": "ANTIGRAVITY_IDE_CLIENT_SECRET"
         }
       }
     }
   }
   ```
4. Return to Antigravity IDE and click **Refresh**.
5. Select your new MCP server, and click **Authenticate** and complete the authentication flow.
6. Copy the authorization code and submit it in the **Antigravity
   Settings** window.

### Antigravity

1. In Antigravity, go to **Settings** \> **Customizations**.
2. At the **Installed MCP Servers** section, click **Open MCP Config** to edit the `mcp_config.json` file:

   ```json
   {
     "mcpServers": {
       "google-pay-wallet-dev": {
         "serverUrl": "https://paydeveloper.googleapis.com/mcp",
         "oauth": {
           "clientId": "ANTIGRAVITY_CLIENT_ID",
           "clientSecret": "ANTIGRAVITY_CLIENT_SECRET"
         }
       }
     }
   }
   ```
3. Return to Antigravity and click **Refresh**.
4. Click **Authenticate** and complete the authentication flow.
5. Copy the authorization code and submit it in the **Antigravity
   Settings** window.

## Known limitations

- **English-only results**: Documentation search only supports English.
- **Content behind ACL**: Documentation behind ACLs is not indexed
- **Network-dependent**: The server requires a live connection to Google Pay and Wallet services.

## Terms of Service

Use of the Google Pay API is subject to the [Google Pay Terms of
Service](https://payments.developers.google.com/terms/sellertos). Use of the
Google Wallet API is subject to the [Google Wallet API Terms of
Service](https://developers.google.com/wallet/terms-of-service).