home / mcp / google maps mcp server
Integrates Google Maps routing and traffic data with Claude AI for routing, traffic analysis, and cost estimation.
Configuration
View docs{
"mcpServers": {
"arunrajece-google-maps-mcp-server": {
"command": "node",
"args": [
"/absolute/path/to/google-maps-mcp-server/src/index.js"
]
}
}
}This MCP server combines Google Maps routing and traffic data with Claude AI to enable advanced route planning, traffic analysis, and cost estimation. You can query optimal routes, compare options, and assess live travel conditions for smarter decisions and cost-aware planning.
You interact with the Google Maps MCP Server from an MCP client or Claude Desktop. Start the local MCP server, ensure your Google Maps API key is configured, and then ask questions like: “Find the fastest route from New York to Boston” or “What’s the traffic like for my morning commute?” The server will calculate routes, compare alternatives, fetch live traffic, and estimate costs such as fuel and tolls based on your settings.
Prerequisites you need before setup include a stable Node.js environment and a valid Google Maps API key with the necessary services enabled.
Clone the project repository and install dependencies.
git clone [your-repo-url]
cd google-maps-mcp-server
npm installGet a Google Maps API key with the required services enabled. You will enable: - Directions API - Distance Matrix API - Geocoding API - Places API (optional for enhanced address search)
Configure the API key by editing the configuration file to replace the placeholder with your actual key.
{
"googleMaps": {
"apiKey": "your-actual-api-key-here"
}
}Verify the server configuration and start the development server to begin using it locally.
# Test configuration
npm test
# Start in development mode
npm run devConfigure Claude Desktop to run the MCP server locally by pointing it to the Node entry point.
{
"mcpServers": {
"google-maps": {
"command": "node",
"args": ["/absolute/path/to/google-maps-mcp-server/src/index.js"],
"cwd": "/absolute/path/to/google-maps-mcp-server"
}
}
}Restart Claude Desktop after configuring the MCP server. Then you can ask questions like:
- "Find the fastest route from New York to Boston"
- "Compare routes to the airport with and without tolls"
- "What’s the traffic like for my commute right now?"
{
"googleMaps": {
"apiKey": "your-api-key"
},
"server": {
"port": 3001,
"host": "localhost"
},
"routing": {
"defaultTrafficModel": "best_guess",
"maxWaypoints": 25,
"maxAlternatives": 3,
"units": "metric"
},
"costs": {
"fuelPricePerLiter": 1.50,
"vehicleFuelEfficiency": 8.0,
"tollEstimatePerKm": 0.05
}
}If you encounter issues, ensure the API key is valid and the required APIs are enabled and billed correctly in your Google Cloud Console. Check the server is running with the correct Node version (18+). If Claude Desktop cannot locate the server, use absolute paths in the configuration and restart Claude Desktop after changes.
The MCP server provides tools to calculate routes, compare options, fetch live traffic data, and estimate trip costs.
Compute the optimal route with traffic considerations and waypoints.
Evaluate multiple route options with different parameters to aid decision making.
Retrieve real-time traffic information and travel delays for routes.
Estimate trip costs including fuel and tolls based on vehicle data and route.