A Model Context Protocol (MCP) server for Google Maps functionality, providing access to places search, geocoding, directions, and more through the MCP interface.
基于原项目: 此项目基于 ArtixZ/MCP-Google-Maps 修改而来
- Places Search
- Place Details
- Geocoding and Reverse Geocoding
- Distance Matrix
- Directions
- Elevation Data
- Static Maps Generation
First, install the package globally:
npm install -g @bachstudio/mcp-google-mapsYou can test if the MCP server is working by running:
npx bachstudio-mcp-google-mapsTo use this with your MCP client, add the following to your MCP configuration:
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": ["-y", "@bachstudio/mcp-google-maps"],
"env": {
"GOOGLE_MAPS_API_KEY": "your_api_key_here",
"DEFAULT_LANGUAGE": "en",
"DEFAULT_REGION": "US",
"MAX_REQUESTS_PER_SECOND": "50",
"MAX_REQUESTS_PER_DAY": "100000",
"ENABLE_CACHING": "true",
"CACHE_TTL": "3600"
},
"enabled": true
}
}
}The following commands are available through the MCP interface:
search_nearby: Search for places near a locationget_place_details: Get detailed information about a specific placeget_geocode: Convert address to coordinatesget_reverse_geocode: Convert coordinates to addressget_distance_matrix: Calculate distances between multiple origins and destinationsget_directions: Get directions between two pointsget_elevation: Get elevation data for locationsget_map_with_directions: Generate map visualizations with directions, waypoints, and static map images
MIT
bachstudio
Based on the original project by artixz