介绍
# Grounding Lite
Google Maps Grounding Lite MCP 提供基于 AI 的位置数据。处于实验性阶段(正式 GA 前发布),预览期间免费。
## Setup
1. 启用 API:`gcloud beta services enable mapstools.googleapis.com` 2. 从 [Cloud Console](https://console.cloud.google.com/apis/credentials) 获取 API Key 3. 设置环境变量:`export GOOGLE_MAPS_API_KEY="YOUR_KEY"` 4. 配置 mcporter: ```bash mcporter config add grounding-lite \ --url https://mapstools.googleapis.com/mcp \ --header "X-Goog-Api-Key=$GOOGLE_MAPS_API_KEY" \ --system ```
## Tools
- **search_places**:查找地点、商户、地址。返回附带 Google Maps 链接的 AI 摘要。 - **lookup_weather**:当前状况和预报(48 小时逐小时预报,7 天每日预报)。 - **compute_routes**:旅行距离和时长(无逐步导航指示)。
## Commands
```bash # Search places mcporter call grounding-lite.search_places textQuery="pizza near Times Square NYC"
# Weather mcporter call grounding-lite.lookup_weather location='{"address":"San Francisco, CA"}' unitsSystem=IMPERIAL
# Routes mcporter call grounding-lite.compute_routes origin='{"address":"SF"}' destination='{"address":"LA"}' travelMode=DRIVE
# List tools mcporter list grounding-lite --schema ```
## Parameters
**search_places**:`textQuery`(必填)、`locationBias`、`languageCode`、`regionCode`
**lookup_weather**:`location`(必填:地址/latLng/placeId)、`unitsSystem`、`date`、`hour`
**compute_routes**:`origin`、`destination`(必填)、`travelMode`(DRIVE/WALK)
## Notes
- 速率限制:search_places 100 QPM(1k/天),lookup_weather 300 QPM,compute_routes 300 QPM - 在面向用户的输出中包含 Google Maps 链接(需注明来源) - 仅与不对输入数据进行训练的模型配合使用