本项目是一个用于 Google Maps API 的 MCP 服务器,可实现地址与坐标转换、地点搜索、距离计算等多种与地图相关的功能。
按照此处的说明获取 Google Maps API 密钥。
将以下内容添加到 claude_desktop_config.json 文件中:
{
"mcpServers": {
"google-maps": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GOOGLE_MAPS_API_KEY",
"mcp/google-maps"
],
"env": {
"GOOGLE_MAPS_API_KEY": ""
}
}
}
}
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-google-maps"
],
"env": {
"GOOGLE_MAPS_API_KEY": ""
}
}
}
}
maps_geocode
address(字符串类型)maps_reverse_geocode
latitude(数字类型)longitude(数字类型)maps_search_places
query(字符串类型)location(可选):{ latitude: 数字类型, longitude: 数字类型 }radius(可选):数字类型(单位为米,最大值为 50000)maps_place_details
place_id(字符串类型)maps_distance_matrix
origins(字符串数组)destinations(字符串数组)mode(可选):"driving" | "walking" | "bicycling" | "transit"maps_elevation
locations(包含 {latitude, longitude} 的数组)maps_directions
origin(字符串类型)destination(字符串类型)mode(可选):"driving" | "walking" | "bicycling" | "transit"docker build -t mcp/google-maps -f src/google-maps/Dockerfile .
本 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但需遵守 MIT 许可证的条款和条件。更多详细信息,请参阅项目仓库中的 LICENSE 文件。