Skip to main content

Overview

Google Gemini provides state-of-the-art multimodal AI models through two access methods: Google AI Studio (direct API) and Vertex AI (enterprise platform). This guide covers both approaches with the MCP Server.
Gemini 3.0 Pro (Nov 2025) is the latest model with a 1M token context window and advanced reasoning. For production workloads, Gemini 2.5 Flash and Gemini 2.5 Pro are stable, production-grade models.
New: Anthropic Claude models are also available via Vertex AI! See the Vertex AI Setup Guide for unified access to both Claude and Gemini models.

Available Models

The following models are production-ready and suitable for enterprise use: Vertex AI models (use vertex_ai/ prefix):
  • vertex_ai/gemini-3-pro-preview - Latest Gemini 3.0 Pro via Vertex AI
  • vertex_ai/gemini-2.5-flash - Gemini 2.5 Flash via Vertex AI
  • vertex_ai/gemini-2.5-pro - Gemini 2.5 Pro via Vertex AI

Quick Start

Best for: Development, testing, small projects
1

Get API Key

  1. Go to https://aistudio.google.com/app/apikey
  2. Click “Create API Key”
  3. Copy the key (starts with AIza...)
2

Configure

Or use Infisical:
3

Test

Configuration Options

Basic Configuration

Advanced Configuration

Features

Multimodal Capabilities

Function Calling

Structured Output

Production Deployment

Kubernetes with Vertex AI

Create secret:

Workload Identity (GKE)

Performance Optimization

Caching

Batching

Streaming

Cost Optimization

Model Selection

Token Usage Tracking

Quota Management

Safety & Content Filtering

Monitoring

LangSmith Integration

Custom Metrics

Troubleshooting

Error: google.api_core.exceptions.Unauthenticated: 401 API key not validSolutions:
Error: google.auth.exceptions.DefaultCredentialsErrorSolutions:
Error: 429 Resource has been exhaustedSolutions:
Error: Response contains safety blockSolutions:

Next Steps

Multi-LLM Setup

Configure multiple LLM providers

Anthropic Claude

Set up Claude models

Observability

Monitor LLM usage

Production Checklist

LLM deployment best practices

Google Gemini Ready: Leverage Google’s most advanced AI models in your MCP Server!