answer_query_direct
Answers a natural language query using only the internal knowledge of the configured Vertex AI model (gemini-2.5-pro-exp-03-25). Does not use web search. Requires a 'query' string.
Put Google's Gemini behind a coding assistant — answer questions with live web search, pull doc-grounded snippets, review code and schemas, and write the results to files.
LABSCO SUMMARY
The paired tools are the practical hook: five of the generators — both query answerers, doc snippets, topic explanations and project guidelines — have a version that writes the result to a path, so 'draft the project guidelines' or 'explain this topic from the docs' ends as a file rather than a chat message you copy out. Take the README's own security warning seriously before wiring it up — the filesystem-write and execute_terminal_command tools mean this is not a read-only research server, and it applies minimal model safety filters.
A server exposing 29 tools over Google Cloud's Vertex AI Gemini models, aimed at coding assistance: query answering with or without web search, documentation-grounded research, code and architecture analysis, plus filesystem and terminal tools. Five of the model tools also have a save_ variant that writes the result to a file path.
A Gemini backend chosen with AI_PROVIDER: set it to vertex and provide GOOGLE_CLOUD_PROJECT with the Vertex AI API enabled (authenticating through ADC or credentials), or set it to gemini and provide GEMINI_API_KEY. Node.js 18+ and Bun, run as bunx vertex-ai-mcp-server. Note the security boundary the README flags: this server bundles filesystem-write and terminal-execution tools, so run it under a dedicated low-privilege identity, and its safety filters are set to BLOCK_NONE.
One command — bunx vertex-ai-mcp-server
USE CASES
Put a natural-language question to Gemini grounded in live Google Search, and when the answer is worth keeping, write it straight to a file instead of copying it out of the chat.
Ask for a precise code snippet or a documented explanation of a library, drawn from official documentation found by web search, without the surrounding prose.
Have a snippet compared against documented best practices for bugs and security issues, scan the dependencies for known vulnerabilities, and get security recommendations for the stack it runs on.
Generate structured guidelines from the tech stack against the latest docs, produce a testing strategy, and save both to the repository as Markdown.
Read the files in question, apply line-based edits, and run a build or test command in place — the model tools and the workspace tools in one session.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
answer_query_directAnswers a natural language query using only the internal knowledge of the configured Vertex AI model (gemini-2.5-pro-exp-03-25). Does not use web search. Requires a 'query' string.
answer_query_websearchAnswers a natural language query using the configured Vertex AI model (gemini-2.5-pro-exp-03-25) enhanced with Google Search results for up-to-date information. Requires a 'query' string.
architecture_pattern_recommendationSuggests architecture patterns for specific use cases based on industry best practices. Provides implementation examples and considerations for the recommended patterns. Includes diagrams and explanations of pattern benefits and tradeoffs. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'requirements' and 'tech_stack'.
code_analysis_with_docsAnalyzes code snippets by comparing them with best practices from official documentation found via web search. Identifies potential bugs, performance issues, and security vulnerabilities. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'code', 'language', and 'analysis_focus'.
database_schema_analyzerReviews database schemas for normalization, indexing, and performance issues. Suggests improvements based on database-specific best practices. Provides migration strategies for implementing suggested changes. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'schema' and 'database_type'.
dependency_vulnerability_scanAnalyzes project dependencies for known security vulnerabilities. Provides detailed information about each vulnerability with severity ratings. Suggests mitigation strategies and secure alternatives. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'dependencies' and 'ecosystem'.
documentation_generatorCreates comprehensive documentation for code, APIs, or systems. Follows industry best practices for technical documentation. Includes examples, diagrams, and user guides. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'content_type' and 'content'.
edit_file_contentMake line-based edits to a text file in the workspace filesystem. Each edit attempts to replace an exact match of 'oldText' with 'newText'. If no exact match is found, it attempts a line-by-line match ignoring leading/trailing whitespace. Indentation of the first line is preserved, and relative indentation of subsequent lines is attempted. Returns a git-style diff showing the changes made (or previewed if dryRun is true).
execute_terminal_commandExecute a shell command on the server's operating system. Allows specifying the command, an optional working directory (cwd), and an optional timeout in seconds. Returns the combined stdout and stderr output of the command upon completion or termination.
explain_topic_with_docsProvides a detailed explanation for a query about a specific software topic by synthesizing information primarily from official documentation found via web search. Focuses on comprehensive answers, context, and adherence to documented details. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'topic' and 'query'.
generate_project_guidelinesGenerates a structured project guidelines document (e.g., Markdown) based on a specified list of technologies and versions (tech stack). Uses web search to find the latest official documentation, style guides, and best practices for each component and synthesizes them into actionable rules and recommendations. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'tech_stack'.
get_directory_treeGet a recursive tree view of files and directories within the workspace filesystem as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' (an array) for directories. Files have no 'children' array. The output is formatted JSON text. Useful for understanding the complete structure of a project directory.
get_doc_snippetsProvides precise, authoritative code snippets or concise answers for technical queries by searching official documentation. Focuses on delivering exact solutions without unnecessary explanation. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'topic' and 'query'.
get_filesystem_infoRetrieve detailed metadata about a file or directory within the workspace filesystem. Returns comprehensive information including size (bytes), creation time, last modified time, last accessed time, type (file/directory), and permissions (octal string). This tool is perfect for understanding file characteristics without reading the actual content.
list_directory_contentsGet a detailed listing of all files and directories directly within a specified path in the workspace filesystem. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Does not list recursively.
microservice_design_assistantHelps design microservice architectures for specific domains. Provides service boundary recommendations and communication patterns. Includes deployment and orchestration considerations. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'domain_description' and 'requirements'.
move_file_or_directoryMove or rename files and directories within the workspace filesystem. Can move items between directories and rename them in a single operation. If the destination path already exists, the operation will likely fail (OS-dependent).
read_file_contentRead the complete contents of one or more files from the workspace filesystem. Provide a single path string or an array of path strings. Handles various text encodings and provides detailed error messages if a file cannot be read. Failed reads for individual files in an array won't stop the entire operation when multiple paths are provided.
regulatory_compliance_advisorProvides guidance on regulatory requirements for specific industries (GDPR, HIPAA, etc.). Suggests implementation approaches for compliance. Includes checklists and verification strategies. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'regulations' and 'context'.
save_answer_query_directAnswers a natural language query using only the internal knowledge of the configured Vertex AI model (gemini-2.5-pro-exp-03-25), does not use web search, and saves the answer to a file. Requires 'query' and 'output_path'.
save_answer_query_websearchAnswers a natural language query using Google Search results and saves the answer to a file. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25). Requires 'query' and 'output_path'.
save_doc_snippetProvides precise code snippets or concise answers for technical queries by searching official documentation and saves the result to a file. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'topic', 'query', and 'output_path'.
save_generate_project_guidelinesGenerates comprehensive project guidelines based on a tech stack using web search and saves the result to a specified file path. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25). Requires 'tech_stack' and 'output_path'.
save_topic_explanationProvides a detailed explanation for a query about a specific software topic using official documentation found via web search and saves the result to a file. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25). Requires 'topic', 'query', and 'output_path'.
search_filesystemRecursively search for files and directories within the workspace filesystem matching a pattern in their name. Searches through all subdirectories from the starting path. The search is case-insensitive and matches partial names. Returns full paths (relative to workspace) to all matching items. Supports excluding paths using glob patterns.
security_best_practices_advisorProvides security recommendations for specific technologies or scenarios. Includes code examples for implementing secure practices. References industry standards and security guidelines. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'technology' and 'security_context'.
technical_comparisonCompares multiple technologies, frameworks, or libraries based on specific criteria. Provides detailed comparison tables with pros/cons and use cases. Includes version-specific information and compatibility considerations. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'technologies' and 'criteria'.
testing_strategy_generatorCreates comprehensive testing strategies for applications or features. Suggests appropriate testing types (unit, integration, e2e) with coverage goals. Provides example test cases and testing frameworks. Uses the configured Vertex AI model (gemini-2.5-pro-exp-03-25) with Google Search. Requires 'project_description' and 'tech_stack'.
write_file_contentCreate new files or completely overwrite existing files in the workspace filesystem. The 'writes' argument should be either a single object with 'path' and 'content', or an array of such objects to write multiple files. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding.
BEFORE YOU INSTALL
29 tools when we connected. 9 of the 29 are filesystem and shell tools, including execute_terminal_command, and 5 more write model output to a path, so this server can change your disk.
CONTEXT COST
Rated by the size of the 29 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
bunx vertex-ai-mcp-servergit clone https://github.com/shariqriazz/vertex-ai-mcp-server.git
cd vertex-ai-mcp-server
bun install
bun run build{
"mcpServers": {
"vertex-ai-mcp-server": {
"command": "node",
"args": [
"<YOUR_PATH_TO_VERTEX_AI_MCP_SERVER>/build/index.js"
],
"env": {
"AI_PROVIDER": "vertex",
"GOOGLE_CLOUD_PROJECT": "<YOUR_GOOGLE_CLOUD_PROJECT>",
"VERTEX_MODEL_ID": "gemini-2.5-pro",
"GEMINI_MODEL_ID": "gemini-2.5-pro",
"GOOGLE_CLOUD_LOCATION": "us-central1",
"AI_TEMPERATURE": "0.0",
"AI_USE_STREAMING": "true",
"AI_MAX_OUTPUT_TOKENS": "65536",
"AI_MAX_RETRIES": "3",
"AI_RETRY_DELAY_MS": "1000"
},
"disabled": false,
"alwaysAllow": [],
"timeout": 3600
}
}
}<YOUR_PATH_TO_VERTEX_AI_MCP_SERVER> is the absolute path of your clone. Bun run build writes build/index.js there.
Which credential you need depends on AI_PROVIDER. The Cline configurations here set it to vertex, which signs in with Google Cloud Application Default Credentials (gcloud auth application-default login) or, if you set GOOGLE_APPLICATION_CREDENTIALS, a service-account key file. To use a Gemini API key instead, set AI_PROVIDER to gemini and add GEMINI_API_KEY.
{
"mcpServers": {
"vertex-ai-mcp-server": {
"command": "bunx",
"args": [
"-y",
"vertex-ai-mcp-server"
],
"env": {
"AI_PROVIDER": "vertex",
"GOOGLE_CLOUD_PROJECT": "<YOUR_GOOGLE_CLOUD_PROJECT>",
"VERTEX_MODEL_ID": "gemini-2.5-pro",
"GEMINI_MODEL_ID": "gemini-2.5-pro",
"GOOGLE_CLOUD_LOCATION": "us-central1",
"AI_TEMPERATURE": "0.0",
"AI_USE_STREAMING": "true",
"AI_MAX_OUTPUT_TOKENS": "65536",
"AI_MAX_RETRIES": "3",
"AI_RETRY_DELAY_MS": "1000"
},
"disabled": false,
"alwaysAllow": [],
"timeout": 3600
}
}
}Which credential you need depends on AI_PROVIDER. The Cline configurations here set it to vertex, which signs in with Google Cloud Application Default Credentials (gcloud auth application-default login) or, if you set GOOGLE_APPLICATION_CREDENTIALS, a service-account key file. To use a Gemini API key instead, set AI_PROVIDER to gemini and add GEMINI_API_KEY.