Skip to main content
Glama
devsanthoshmk

Google Maps MCP Server

🗺️ Google Maps MCP Server (gmaps-mcp)

MCP Version Python License: MIT

Un servidor Google Maps Model Context Protocol (MCP) autocontenido y ligero, construido con el SDK oficial de MCP para Python. Proporciona a los agentes de IA (como Claude Desktop, Cursor, Cline y Antigravity) resultados de búsqueda estructurados, detalles de lugares, valoraciones, información de contacto, coordenadas y URL de Google Maps.


⚡ Características principales

  • Instalación con un solo comando: Se ejecuta al instante en cualquier lugar mediante uvx sin configuración manual del entorno.

  • 100% Autocontenido: El motor de extracción está integrado de forma nativa en el proceso mediante asyncio y aiohttp; no se requieren subprocesos externos, navegadores headless ni claves de API.

  • Datos estructurados de lugares enriquecidos: Devuelve IDs de lugar, nombres de negocios, categorías, direcciones, números de teléfono locales e internacionales, URLs de sitios web, coordenadas (lat/long), valoraciones con estrellas, recuentos de reseñas y enlaces directos a Google Maps.

  • Stdio y HTTP Streamable: Soporte nativo de stdio para clientes de IA de escritorio y streamable-http para despliegues remotos o en contenedores.

  • JSON-RPC limpio: Todo el registro interno se canaliza estrictamente a stderr, manteniendo el flujo del protocolo stdio 100% conforme.


Related MCP server: Google Maps MCP Server

🚀 Inicio rápido

Ejecuta directamente usando uvx:

# Run directly from GitHub repository
uvx --from git+https://github.com/<your-username>/gmaps-mcp.git gmaps-mcp

O desde un clon local:

uv run gmaps-mcp

🛠️ Configuración del cliente MCP

1. Claude Desktop

Añade esto a tu claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json en macOS, o %APPDATA%\Claude\claude_desktop_config.json en Windows):

{
  "mcpServers": {
    "google-maps": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/<your-username>/gmaps-mcp.git",
        "gmaps-mcp"
      ]
    }
  }
}

Si se ejecuta desde una carpeta local:

{
  "mcpServers": {
    "google-maps": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/absolute/path/to/gmap-mcp",
        "gmaps-mcp"
      ]
    }
  }
}

2. Cursor IDE

En Cursor, abre Settings → Features → MCP (o edita .cursor/mcp.json en tu proyecto):

{
  "mcpServers": {
    "google-maps": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/<your-username>/gmaps-mcp.git",
        "gmaps-mcp"
      ]
    }
  }
}

3. Cline (extensión de VS Code)

En la configuración de Cline (cline_mcp_settings.json):

{
  "mcpServers": {
    "google-maps": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/<your-username>/gmaps-mcp.git",
        "gmaps-mcp"
      ]
    }
  }
}

🧰 Herramientas disponibles

1. search_google_maps

Busca en Google Maps negocios, atracciones, servicios y lugares emblemáticos.

Parámetro

Tipo

Por defecto

Descripción

query

string

(obligatorio)

Término de búsqueda (p. ej., "coffee in Koramangala Bangalore", "dentists near Connaught Place Delhi", "Italian restaurants in New York").

limit

integer

10

Número máximo de resultados a devolver (1 a 50).

country

string

"in"

Código de país ISO de dos letras para la localización regional (p. ej., "in", "us", "gb", "de", "fr", "ae").

language

string

"en"

Código de idioma para los resultados (p. ej., "en", "hi", "es", "fr").

Estructura de salida

{
  "query": "coffee in Koramangala Bangalore",
  "country": "in",
  "language": "en",
  "total_results": 2,
  "places": [
    {
      "place_id": "ChIJ80IECk8UrjsRqCffDjE09lw",
      "name": "Dyu Art Cafe",
      "category": "Art cafe",
      "address": "KHB MIG Colony, 1st Cross Rd, Koramangala 8th Block, Bengaluru, Karnataka 560095",
      "phone": "096113 19774",
      "international_phone": "+91 96113 19774",
      "website": "http://www.dyuartcafe.com/",
      "domain": "dyuartcafe.com",
      "latitude": 12.9373076,
      "longitude": 77.6176544,
      "rating": 4.4,
      "review_count": 21440,
      "google_maps_url": "https://www.google.com/maps/place/?q=place_id:ChIJ80IECk8UrjsRqCffDjE09lw"
    }
  ]
}

2. get_place_details

Recupera información detallada de un lugar o negocio concreto mediante su ID de lugar o nombre.

Parámetro

Tipo

Por defecto

Descripción

place

string

(obligatorio)

ID de lugar de Google (p. ej., "ChIJ12k5kG_iDDkRwuzibQwYZ4M") o nombre exacto de negocio/lugar emblemático (p. ej., "AIIMS New Delhi").

country

string

"in"

Código de país ISO de dos letras (predeterminado: "in").

language

string

"en"

Código de idioma para la respuesta (predeterminado: "en").


🌐 Despliegue remoto (Streamable HTTP)

El servidor es compatible con el transporte Streamable HTTP moderno para su despliegue detrás de proxies inversos o en alojamiento en la nube:

# Start Streamable HTTP server on port 8000
uv run gmaps-mcp --transport streamable-http --host 0.0.0.0 --port 8000

El endpoint de MCP estará disponible en: http://<host>:8000/mcp


🧪 Desarrollo y pruebas

Ejecuta las pruebas unitarias y de integración usando uv:

# Run pytest test suite
uv run --with pytest --with pytest-asyncio pytest tests/ -v

# Run the server locally with debug logs
uv run gmaps-mcp --log-level DEBUG

📦 Estructura del proyecto

gmap-mcp/
├── pyproject.toml              # Packaging & dependencies (PEP 517/621)
├── README.md                   # Setup guide and MCP client docs
├── src/
│   └── gmaps_mcp/
│       ├── __init__.py         # Package entry
│       ├── schemas.py          # Pydantic data models (Place, Search, Details)
│       ├── server.py           # MCPServer instance & CLI runner
│       ├── tools.py            # MCP Tool definitions & detailed descriptions
│       └── scraper/
│           ├── __init__.py     # Scraper API
│           └── crawler.py      # Async Google Maps parser & extraction engine
└── tests/
    ├── test_schemas.py         # Schema tests
    ├── test_crawler.py         # Parser unit tests
    └── test_server.py          # MCP Server registration & tool calling tests

📜 Atribución y licencia

  • Núcleo del scraper adaptado y modularizado a partir de christivn/mapScraper (commit 1b38cf3e153294e3dad2f6cb5862be0201a54065).

  • Licenciado bajo la Licencia MIT.

Available Tools

2 tools
get_place_detailsA

Retrieve detailed information for a single specific Google Maps place or business. Looks up a place using its unique Google Place ID (e.g., 'ChIJ...' or 'place_id:ChIJ...') or specific landmark/business name. Returns complete structured details including address, phone number, website, rating, coordinates, and Google Maps URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
placeYesThe place identifier to fetch details for. Can be either: 1. A Google Place ID (e.g., 'ChIJ12k5kG_iDDkRwuzibQwYZ4M' or 'place_id:ChIJ...') 2. An exact place / business name and location (e.g., 'AIIMS New Delhi' or 'Taj Mahal Palace Mumbai').
countryNoTwo-letter ISO country code for region localization (default: 'in').in
languageNoLanguage code for the response (default: 'en').en

Output Schema

ParametersJSON Schema
NameRequiredDescription
foundNoWhether the place was successfully found
placeNoThe retrieved place object if found, otherwise null
query_or_idYesThe place query or Place ID searched for

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the lookup behavior (by ID or name) and the return fields (address, phone, etc.), but does not mention rate limits, authentication requirements, or what happens if the place is not found. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main purpose, and each sentence adds essential information. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, the description covers the key purpose, parameter usage, and return value hints. The presence of an output schema reduces the need to describe return values. Minor gaps exist (e.g., error behavior), but overall it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining the two formats for the 'place' parameter (Google Place ID vs. name/location), which goes beyond the schema's description. This additional context justifies a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the verb 'retrieve' and the resource 'detailed information for a single specific Google Maps place or business'. It distinguishes from sibling tool 'search_google_maps' by emphasizing single-place lookup vs. searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use this tool (to get details for a known place via ID or name) and implicitly distinguishes from searching. It does not explicitly state when not to use it or mention alternatives beyond the sibling context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_google_mapsA

Search Google Maps for local businesses, places, points of interest, and services. Returns structured place data including business name, Google Place ID, category, formatted street address, phone numbers, website URL, geo-coordinates (latitude/longitude), star rating, total review count, and direct Google Maps URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of place results to return (between 1 and 50, default is 10).
queryYesThe search query for Google Maps. Can be a business category, specific place name, service, or landmark along with a location. Examples: 'coffee shops in Koramangala Bangalore', 'dentists near Connaught Place Delhi', 'Italian restaurants in Bandra Mumbai', 'hospitals in Hyderabad', 'electricians near Indiranagar', 'museums in London'.
countryNoTwo-letter ISO 3166-1 alpha-2 country code to localize search results and map boundaries. Default is 'in' (India). Other examples: 'us' (United States), 'gb' (United Kingdom), 'ca' (Canada), 'au' (Australia), 'de' (Germany), 'fr' (France), 'sg' (Singapore), 'ae' (UAE).in
languageNoLanguage code for the results (e.g. 'en' for English, 'hi' for Hindi, 'es' for Spanish, 'fr' for French, 'de' for German, 'ja' for Japanese). Default is 'en'.en

Output Schema

ParametersJSON Schema
NameRequiredDescription
queryYesThe search query that was executed
placesNoList of matched Google Maps places
countryYesThe ISO 3166-1 alpha-2 country code used (e.g., 'in', 'us')
languageYesThe language code used for results (e.g., 'en', 'hi')
total_resultsYesNumber of places returned in this response

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It states it returns structured place data listing 10 fields, which is helpful. However, it does not disclose potential rate limits, API quota implications, or any constraints on search frequency or result freshness. The behavioral disclosure is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the main action. It then lists the return fields, which is useful but slightly verbose for a search tool. It earns its place without unnecessary fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (4 params, 1 required, no nested objects) and presence of an output schema, the description is fairly complete. It explains the search scope and return fields. It could be improved by noting that results are limited by Google's ranking (not just the limit parameter) and how to formulate effective queries beyond the examples.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds no parameter-level detail beyond what the schema already provides. It lists the return fields but not how parameters affect them. Since the schema is already thorough, no penalty is applied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Search') and resources ('Google Maps for local businesses, places, points of interest, and services'), clearly distinguishing it from its sibling tool 'get_place_details' which would provide details on a specific place.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for broad searches (businesses, places, POIs), and the sibling tool name 'get_place_details' suggests the alternative for specific place info. However, no explicit when-to-use or when-not-to-use guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.0
    • First observedget_place_details
    • First observedsearch_google_maps

TDQS

A3.7/5.0

Scored across 2 tools

Disambiguation4/5

The two tools have distinct purposes: search_google_maps finds places by query, and get_place_details retrieves details for a known place ID. There is slight overlap in the returned fields, but the use cases are clearly different.

Naming Consistency4/5

Both tools use a clear verb_noun pattern (search/get + google_maps/place_details). The naming is consistent, though 'get_place_details' could be more symmetrical as 'get_google_maps_place' for perfect parity.

Tool Count2/5

Only two tools for a Google Maps server is very limited. Maps APIs typically support additional operations like directions, geocoding, or place photos, so the tool count feels too small for the implied scope.

Completeness2/5

The core search and detail retrieval are present, but critical operations like navigation (directions), geocoding (address to coordinates and reverse), and place photo fetching are missing, creating significant gaps for common map-related tasks.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers