Add Google credentials provider for authenticating with MCP servers (#4748)

This commit is contained in:
ashwinpvg
2025-07-24 10:37:39 -07:00
committed by GitHub
parent 3dd6e431df
commit d254d4ce00
6 changed files with 262 additions and 1 deletions

View File

@@ -179,6 +179,28 @@ OAuth tokens are automatically:
- **Validated** before each connection attempt
- **Cleaned up** when invalid or expired
#### Authentication Provider Type
You can specify the authentication provider type using the `authProviderType` property:
- **`authProviderType`** (string): Specifies the authentication provider. Can be one of the following:
- **`dynamic_discovery`** (default): The CLI will automatically discover the OAuth configuration from the server.
- **`google_credentials`**: The CLI will use the Google Application Default Credentials (ADC) to authenticate with the server. When using this provider, you must specify the required scopes.
```json
{
"mcpServers": {
"googleCloudServer": {
"httpUrl": "https://my-gcp-service.run.app/mcp",
"authProviderType": "google_credentials",
"oauth": {
"scopes": ["https://www.googleapis.com/auth/userinfo.email"]
}
}
}
}
```
### Example Configurations
#### Python MCP Server (Stdio)