google-maps-comprehensive-mcp

google-maps-comprehensive-mcp

Comprehensive MCP server for Google Maps APIs, enabling geocoding, place search and details, distance matrix, elevation, and directions through natural language.

Category
Visit Server

README

Google Maps MCP Server

MCP Server per le API moderne di Google Maps (Places API, Routes API, Geocoding API, Elevation API).
Supporta geocoding, ricerca luoghi, dettagli di posti, calcolo di distanze, elevazioni e percorsi.

Tools Disponibili

πŸ—ΊοΈ 8 Tools Implementati

  1. maps_ping (Health Check)

    • Verifica se il server MCP Γ¨ attivo
    • Input: nessuno
    • Output: "Google Maps MCP server is alive βœ…"
  2. maps_geocode

    • Converte un indirizzo in coordinate geografiche
    • Input: address (string)
    • Output: location, formatted_address, place_id, address_components
  3. maps_reverse_geocode

    • Converte coordinate in un indirizzo leggibile
    • Input:
      • latitude (number)
      • longitude (number)
    • Output: formatted_address, place_id, address_components
  4. maps_search_places

    • Ricerca luoghi tramite query testuale usando Places API (New)
    • Input: query (string)
    • Output: array di luoghi con displayName, formattedAddress, location, types
  5. maps_place_details

    • Ottieni informazioni dettagliate su un luogo
    • Input: place_id (string)
    • Output: name, address, contact info, ratings, reviews, opening hours, photos
  6. maps_distance_matrix

    • Calcola distanze e tempi tra multiple origini e destinazioni
    • Input:
      • origins (string[])
      • destinations (string[])
      • mode (optional): "driving" | "walking" | "bicycling" | "transit"
    • Output: matrice di distances e durations
  7. maps_elevation

    • Recupera dati di elevazione per punti geografici
    • Input: locations (array di { latitude, longitude })
    • Output: elevation e resolution per ogni punto
  8. maps_directions

    • Ottieni indicazioni stradali tra due punti usando Routes API (New)
    • Input:
      • origin (string)
      • destination (string)
      • travelMode (optional): "DRIVE" | "WALK" | "BICYCLE" | "TRANSIT"
    • Output: route steps, distance, duration, polyline

πŸš€ Setup e Installazione

1. Ottenere una API Key

Crea una API key Google Maps abilitando:

  • Places API (New)
  • Routes API (New)
  • Geocoding API
  • Elevation API

Segui la guida ufficiale: Get an API Key

2. Installazione Dipendenze

npm install

3. Build del Progetto

npm run build

4. Variabile d'Ambiente

export GOOGLE_MAPS_API_KEY="your_api_key_here"

πŸ”§ Uso

Esecuzione Locale

# Con variabile d'ambiente
GOOGLE_MAPS_API_KEY="your_key" node dist/index.js

# O con export
export GOOGLE_MAPS_API_KEY="your_key"
node dist/index.js

Docker

# Build dell'immagine
docker build -t google-maps-mcp .

# Esecuzione con docker-compose
GOOGLE_MAPS_API_KEY="your_key" docker-compose up

# Esecuzione diretta
docker run --rm -it -e GOOGLE_MAPS_API_KEY="your_key" google-maps-mcp

🎯 Configurazione MCP Client

Claude Desktop

{
  "mcpServers": {
    "google-maps": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/google-maps-mcp",
      "env": {
        "GOOGLE_MAPS_API_KEY": "your_api_key"
      }
    }
  }
}

LM Studio

{
  "mcpServers": {
    "google-maps": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/Users/pallotta/mcp-servers/google-maps",
      "env": {
        "GOOGLE_MAPS_API_KEY": "your_api_key"
      }
    }
  }
}

Docker (Claude Desktop)

{
  "mcpServers": {
    "google-maps": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "GOOGLE_MAPS_API_KEY=your_api_key",
        "google-maps-mcp"
      ]
    }
  }
}

πŸ§ͺ Test

Il server Γ¨ stato testato con successo e tutti i tool funzionano correttamente:

  • βœ… maps_ping - Health check
  • βœ… maps_geocode - Address β†’ Coordinates
  • βœ… maps_reverse_geocode - Coordinates β†’ Address
  • βœ… maps_search_places - Place search
  • βœ… maps_place_details - Detailed place info
  • βœ… maps_distance_matrix - Distance/time matrix
  • βœ… maps_elevation - Elevation data
  • βœ… maps_directions - Route directions

πŸ“‹ API Utilizzate

  • Google Places API (New) - Per ricerca luoghi e dettagli
  • Google Routes API (New) - Per indicazioni stradali
  • Google Geocoding API - Per conversione indirizzi ↔ coordinate
  • Google Elevation API - Per dati di elevazione

πŸ”’ Sicurezza

⚠️ Importante: Non committare mai la tua API key nel repository. Usa sempre variabili d'ambiente.


πŸ“ Note

  • Il server utilizza stdio transport per la comunicazione MCP
  • Supporta CommonJS per compatibilitΓ 
  • Tutti i tool restituiscono dati in formato JSON
  • Gestione errori completa per tutte le API calls

πŸ†˜ Troubleshooting

Errore: "GOOGLE_MAPS_API_KEY environment variable is required"

  • Assicurati di aver impostato la variabile d'ambiente
  • Verifica che l'API key sia valida e abilitata

Errore: "Tool not found"

  • Verifica che il server sia stato buildato correttamente: npm run build
  • Controlla che tutti i tool siano implementati nel codice

Problemi Docker

  • Se il container non ha i tool aggiornati, esegui: docker build --no-cache -t google-maps-mcp .
  • Verifica che la variabile d'ambiente sia passata correttamente al container

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured