- Home
- MCP servers
- Google Maps
Google Maps
- javascript
0
GitHub Stars
javascript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a Google Maps MCP Server on Cloud Run that exposes route calculation, route comparison, live traffic, and cost estimates to Claude Desktop clients through a lightweight, rate-limited API. The server is public by default and is designed for easy sharing and rapid iteration, while enforcing a 50 requests/hour per IP cap to prevent abuse.
How to use
You connect Claude Desktop to the MCP Server to perform mapping tasks. Use the HTTP MCP endpoint to receive data from remote clients, or run the server locally and access it via the standard MCP URL. The server provides four tools for Claude: calculate_route, compare_routes, get_live_traffic, and estimate_costs. When you deploy to Cloud Run, you obtain a public URL such as https://your-service.run.app/sse which becomes your MCP service endpoint.
How to install
Follow these concrete steps to get started with a Cloud Run deployment and local development environment.
Prerequisites and required APIs
- Google Cloud Platform account with billing enabled
- Google Cloud CLI (gcloud) installed and configured
- Node.js 18+ for local development
- Google Maps API key with required APIs enabled
Exactly how to deploy to Cloud Run
# Clone the repository
git clone <your-repo-url>
cd google-maps-mcp-cloudrun
# Set your Google Maps API key
export GOOGLE_MAPS_API_KEY="your-api-key-here"
# Deploy using the provided script
./simple-deploy.sh your-gcp-project-id us-central1
Extract Service URL
# Get the service URL
SERVICE_URL=$(gcloud run services describe google-maps-mcp \
--region us-central1 \
--format="value(status.url)")
echo "Your MCP Server URL: $SERVICE_URL/sse"
Manual deployment
# Set your project
gcloud config set project YOUR_PROJECT_ID
# Enable required services
gcloud services enable run.googleapis.com cloudbuild.googleapis.com
# Deploy
gcloud run deploy google-maps-mcp \
--source . \
--region us-central1 \
--platform managed \
--allow-unauthenticated \
--set-env-vars GOOGLE_MAPS_API_KEY="your-api-key-here" \
--memory 1Gi \
--cpu 1 \
--max-instances 10 \
--timeout 300 \
--port 8080
Claude Desktop configuration
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://YOUR-SERVICE-URL.run.app/sse"
]
}
}
}
Finding your Claude Desktop config locations
macOS users can find it at ~/Library/Application Support/Claude/claude_desktop_config.json. Windows users can find it at %APPDATA%/Claude/claude_desktop_config.json.
Service endpoints
MCP Endpoint: https://your-service.run.app/sse Health Check: https://your-service.run.app/health Usage Stats: https://your-service.run.app/stats
Local development
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit .env with your API key
# GOOGLE_MAPS_API_KEY=your-api-key-here
# Start development server
npm run dev
# Test locally
npm test
Troubleshooting and common issues
Refer to these common scenarios and their resolutions. If you encounter a problem, start by confirming your cloud project, region, and API key settings.
Security considerations and cost management
- API key is stored as an environment variable and the service allows public access with rate limiting to prevent abuse (50 requests per hour per IP).
- Monitor usage via the /stats endpoint and configure billing alerts in Google Cloud Console to manage costs.
- Do not log sensitive data; ensure API keys are restricted to the required APIs.
Notes and best practices
For production use with higher traffic, plan to add stronger authentication, caching, and monitoring. Keep your API key restricted to the necessary APIs and consider rotating keys periodically.
Available tools
calculate_route
Calculate optimal driving routes with traffic data and real-time considerations.
compare_routes
Compare multiple route options with different options and constraints.
get_live_traffic
Retrieve current traffic conditions and travel time analysis.
estimate_costs
Estimate trip costs including fuel and toll estimates.