remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Integrates with Google's Vertex AI Search to enable document searching using Gemini with grounding. Allows querying across one or multiple Vertex AI data stores to retrieve information from private data sources.
Vertex AI Search 的 MCP 服务器
这是一个使用 Vertex AI 搜索文档的 MCP 服务器。
建筑学
此解决方案结合 Gemini 与 Vertex AI 基础功能,使用您的私人数据搜索文档。基础功能通过将 Gemini 的响应与存储在 Vertex AI 数据存储区中的数据相结合,从而提高搜索结果的质量。我们可以将一个或多个 Vertex AI 数据存储区集成到 MCP 服务器。有关基础功能的更多详细信息,请参阅Vertex AI 基础文档。
如何使用
有两种方法可以使用此 MCP 服务器。如果您想在 Docker 上运行它,则第一种方法比较好,因为项目中提供了 Dockerfile。
1. 克隆存储库
安装python包
该软件包尚未发布到 PyPI,但我们可以从仓库中安装它。我们需要一个源自config.yml.template的配置文件来运行 MCP 服务器,因为 Python 软件包中不包含配置模板。有关配置文件的详细信息,请参阅附录 A:配置文件。
发展
先决条件
- 紫外线
- Vertex AI 数据存储
- 请参阅有关数据存储的官方文档以获取更多信息
设置本地环境
运行 MCP 服务器
它支持两种传输方式:SSE(服务器发送事件)和 stdio(标准输入输出)。我们可以通过设置--transport
标志来控制传输。
我们可以使用 YAML 文件配置 MCP 服务器。config.yml.template是配置文件的模板。请根据自己的需求修改配置文件。
测试 Vertex AI 搜索
我们可以在不使用 MCP 服务器的情况下使用mcp-vertexai-search search
命令来测试 Vertex AI Search。
附录 A:配置文件
config.yml.template是配置文件的模板。
server
server.name
:MCP 服务器的名称
model
model.model_name
:Vertex AI 模型的名称model.project_id
:Vertex AI 模型的项目 IDmodel.location
:模型的位置(例如 us-central1)model.impersonate_service_account
:要模拟的服务帐户model.generate_content_config
:生成内容 API 的配置
data_stores
:Vertex AI 数据存储列表data_stores.project_id
:Vertex AI 数据存储的项目 IDdata_stores.location
:Vertex AI 数据存储的位置(例如我们)data_stores.datastore_id
:Vertex AI 数据存储的 IDdata_stores.tool_name
:工具的名称data_stores.description
:Vertex AI 数据存储的描述
This server cannot be installed
该服务器使用基于 Gemini 的 Vertex AI 进行文档搜索,通过将响应基于 Vertex AI 数据存储区中存储的私人数据来改善搜索结果。