Skip to main content

MCP Server for Vertex AI Search

This is a MCP server to search documents using Vertex AI.

Architecture

This solution uses Gemini with Vertex AI grounding to search documents using your private data. Grounding improves the quality of search results by grounding Gemini's responses in your data stored in Vertex AI Datastore. We can integrate one or multiple Vertex AI data stores to the MCP server. For more details on grounding, refer to Vertex AI Grounding Documentation.

Architecture

How to use

There are two ways to use this MCP server. If you want to run this on Docker, the first approach would be good as Dockerfile is provided in the project.

1. Clone the repository

# Clone the repository
git clone git@github.com:ubie-oss/mcp-vertexai-search.git

# Create a virtual environment
uv venv
# Install the dependencies
uv sync --all-extras

# Check the command
uv run mcp-vertexai-search

Install the python package

The package isn't published to PyPI yet, but we can install it from the repository. We need a config file derives from config.yml.template to run the MCP server, because the python package doesn't include the config template. Please refer to Appendix A: Config file for the details of the config file.

# Install the package
pip install git+https://github.com/ubie-oss/mcp-vertexai-search.git

# Check the command
mcp-vertexai-search --help

Development

Prerequisites

Set up Local Environment

# Optional: Install uv
python -m pip install -r requirements.setup.txt

# Create a virtual environment
uv venv
uv sync --all-extras

Run the MCP server

This supports two transports for SSE (Server-Sent Events) and stdio (Standard Input Output). We can control the transport by setting the --transport flag.

We can configure the MCP server with a YAML file. config.yml.template is a template for the config file. Please modify the config file to fit your needs.

uv run mcp-vertexai-search serve \
    --config config.yml \
    --transport <stdio|sse>

Test the Vertex AI Search

We can test the Vertex AI Search by using the mcp-vertexai-search search command without the MCP server.

uv run mcp-vertexai-search search \
    --config config.yml \
    --query <your-query>

Appendix A: Config file

config.yml.template is a template for the config file.

  • server
    • server.name: The name of the MCP server
  • model
    • model.model_name: The name of the Vertex AI model
    • model.project_id: The project ID of the Vertex AI model
    • model.location: The location of the model (e.g. us-central1)
    • model.impersonate_service_account: The service account to impersonate
    • model.generate_content_config: The configuration for the generate content API
  • data_stores: The list of Vertex AI data stores
    • data_stores.project_id: The project ID of the Vertex AI data store
    • data_stores.location: The location of the Vertex AI data store (e.g. us)
    • data_stores.datastore_id: The ID of the Vertex AI data store
    • data_stores.tool_name: The name of the tool
    • data_stores.description: The description of the Vertex AI data store

Metadata

Release files for iflow-mcp_mcp-vertexai-search 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_mcp-vertexai-search 0.1.0
File Size Uploaded
iflow_mcp_mcp_vertexai_search-0.1.0.tar.gz 141.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_mcp-vertexai-search 0.1.0
File Interpreter ABI Platform
iflow_mcp_mcp_vertexai_search-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 159.5 kB

Release files / iflow_mcp_mcp_vertexai_search-0.1.0.tar.gz

Download URL iflow_mcp_mcp_vertexai_search-0.1.0.tar.gz
Size 141.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c81d04e826d5445e7e18a61aaec626c82b46155414e9a4dcf7cf2c7561c82b82
BLAKE2b-256 checksum
How to use checksums
c168b8d73dd4c82929a8aec8a7ee20e2d3c80ee53ff66dfb619dc01f33de5a23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release files / iflow_mcp_mcp_vertexai_search-0.1.0-py3-none-any.whl

Download URL iflow_mcp_mcp_vertexai_search-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d2c3b1f49c724301bced4764a30132add9b4520f4c48a09b80d603e02802569
BLAKE2b-256 checksum
How to use checksums
7529ba1def06098ac3640e759c41818aa593f06df97bd43612f9d108379f7f56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page