> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Vertex AI Credential Stubs

> Set up Vertex AI credential stubs so MCP servers that need Google Cloud service account keys can start without manual setup.

## Applies to

Any SDK or MCP server that reads Google Cloud Application Default Credentials (ADC):

| SDK / Tool | Credential file |
| - | - |
| Anthropic Python SDK (Vertex) | `~/.config/gcloud/application_default_credentials.json` |
| `google-cloud-aiplatform` | `~/.config/gcloud/application_default_credentials.json` |
| Any `google-auth` based client | `~/.config/gcloud/application_default_credentials.json` |

## Create the stub

Create the directory if it doesn't exist: `mkdir -p ~/.config/gcloud`

### `~/.config/gcloud/application_default_credentials.json`

```json theme={null}
{
  "account": "buckle-managed",
  "client_id": "buckle-managed",
  "client_secret": "buckle-managed",
  "quota_project_id": "buckle-managed",
  "refresh_token": "buckle-managed",
  "type": "authorized_user",
  "universe_domain": "googleapis.com"
}
```

## Rules

* **Never overwrite** existing files that don't contain `buckle-managed` values. The user likely has real gcloud credentials at this path.
* All sentinel values use the string `buckle-managed` so they're easy to detect programmatically.
* `type` must be `"authorized_user"` for the SDK to attempt the OAuth refresh flow.

## How it works

The SDK reads the stub and sees dummy credentials. When it tries to exchange the refresh token at `oauth2.googleapis.com/token`, the Buckle gateway intercepts the request and returns a real access token from the Vertex AI app connection you registered. The SDK then uses that token for requests to `{region}-aiplatform.googleapis.com`. The gateway also injects the `x-goog-user-project` header for quota and billing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.