Vertex Ai MCP Server

A Model Context Protocol server supporting Vertex AI and Gemini API

Local serverstdioTypeScript

What is the Vertex Ai MCP Server?

A Model Context Protocol server supporting Vertex AI and Gemini API

What you get

This project implements a Model Context Protocol (MCP) server that provides a comprehensive suite of tools for interacting with Google Cloud's Vertex AI Gemini models, focusing on coding assistance and general query answering.

  • Provides access to Vertex AI Gemini models via numerous MCP tools
  • Supports web search grounding (answer_query_websearch) and direct knowledge answering (answer_query_direct)
  • Configurable model ID, temperature, streaming behavior, max output tokens, and retry settings via environment variables
  • Uses streaming API by default for potentially better responsiveness
  • Includes basic retry logic for transient API errors
  • Minimal safety filters applied (BLOCK_NONE) to reduce potential blocking (use with caution)

Configuration and credentials

  • Node.js (v18+) * Bun (npm install -g bun) * Google Cloud Project with Billing enabled. * Vertex AI API enabled in the GCP project. * Google Cloud Authentication configured in your environment (Application Default Credentials via gcloud auth application-default login is recommended, or a Service Account Key).

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
code_analysis_with_docsAnalyzes code snippets by comparing them with best practices from official documentation, identifying potential bugs, performance issues, and security vulnerabilities.
technical_comparisonCompares multiple technologies, frameworks, or libraries based on specific criteria, providing detailed comparison tables with pros/cons and use cases.
architecture_pattern_recommendationSuggests architecture patterns for specific use cases based on industry best practices, with implementation examples and considerations.
dependency_vulnerability_scanAnalyzes project dependencies for known security vulnerabilities, providing detailed information and mitigation strategies.
database_schema_analyzerReviews database schemas for normalization, indexing, and performance issues, suggesting improvements based on database-specific best practices.
security_best_practices_advisorProvides security recommendations for specific technologies or scenarios, with code examples for implementing secure practices.
testing_strategy_generatorCreates comprehensive testing strategies for applications or features, suggesting appropriate testing types with coverage goals.
regulatory_compliance_advisorProvides guidance on regulatory requirements for specific industries (GDPR, HIPAA, etc.), with implementation approaches for compliance.
microservice_design_assistantHelps design microservice architectures for specific domains, with service boundary recommendations and communication patterns.
documentation_generatorCreates comprehensive documentation for code, APIs, or systems, following industry best practices for technical documentation.

How to install the Vertex Ai MCP Server

{
  "mcpServers": {
    "vertex-ai": {
      "command": "npx",
      "args": ["-y", "bun"],
      "env": {
        "AI_PROVIDER": "your-value",
        "GOOGLE_CLOUD_PROJECT": "your-value",
        "GEMINI_API_KEY": "your-value",
        "VERTEX_MODEL_ID": "your-value",
        "GEMINI_MODEL_ID": "your-value",
        "GOOGLE_CLOUD_LOCATION": "your-value",
        "AI_TEMPERATURE": "your-value",
        "AI_USE_STREAMING": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js (v18+) * Bun (npm install -g bun) * Google Cloud Project with Billing enabled. * Vertex AI API enabled in the GCP project. * Google Cloud Authentication configured in your environment (Application Default Credentials via gcloud auth application-default login is recommended, or a Service Account Key).
VariableDescriptionRequired
AI_PROVIDERConfiguration value read at startup.Optional
GOOGLE_CLOUD_PROJECTConfiguration value read at startup.Optional
GEMINI_API_KEYCredential the server authenticates with.Yes
VERTEX_MODEL_IDConfiguration value read at startup.Optional
GEMINI_MODEL_IDConfiguration value read at startup.Optional
GOOGLE_CLOUD_LOCATIONConfiguration value read at startup.Optional
AI_TEMPERATUREConfiguration value read at startup.Optional
AI_USE_STREAMINGConfiguration value read at startup.Optional

Example prompts to try

  • “Use Vertex Ai to code analysis with docs.”
  • “Use Vertex Ai to technical comparison.”
  • “Use Vertex Ai to architecture pattern recommendation.”

Frequently asked questions

A Model Context Protocol server supporting Vertex AI and Gemini API Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.