Google Maps

MCP Server for interacting with Google Maps (Places API and Routes API). Written in TypeScript, Node and Hono.dev
  • typescript

16

GitHub Stars

typescript

Language

4 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can run a streamable HTTP MCP server that integrates Google Maps capabilities into your AI agents. It lets your app search nearby places, fetch place details, plan routes, and compare distances using the current location context, all through a standardized MCP interface suitable for location-aware assistants and agents.

How to use

You will connect your MCP client to one or more MCP endpoints to perform common location tasks. Use the HTTP endpoint for remote or local testing and the local stdio endpoint when you run the server directly in your environment. Typical workflows include searching for places near the current position, retrieving place details, planning walking or driving routes, and comparing distances to multiple destinations. Your client must supply your current latitude and longitude, and the server will return results tuned to a 1 km default radius with sensible defaults for quick responses.

With a client that supports MCP servers, you can: search for nearby cafes or landmarks by text or category; fetch hours, ratings, and contact details for a given place; compute routes with turn-by-turn guidance; and measure distances to several destinations to choose the best option. For secure operation, ensure your client sends an Authorization header when using a protected endpoint and that you provide your Google Maps API key for the server to query Google Maps services.

How to install

Prerequisites: you need Bun installed and a Google Cloud project with API access configured.

Step 1: Get Google Maps API key and set up credentials.

Step 2: Set up the local development environment.

Step 3: Run the local server and verify the endpoint is available.

Configuration and run options

Two primary ways to run the gateway are provided: a local Node/Hono server using Bun for development, and a Cloudflare Worker for remote access. The local server exposes the MCP endpoint at http://127.0.0.1:3000/mcp, and the Cloudflare deployment exposes an endpoint at https://<worker-name>.<account>.workers.dev/mcp.

Local development steps include installing dependencies, copying the example environment, updating configuration values, and starting the dev server.

Security and environment

Two essential environment variables secure access and API usage. BEARER_TOKEN authorizes clients to the MCP, and API_KEY provides access to Google Maps services. Keep these secrets confidential and do not expose them in public code.

Troubleshooting

If you receive a 401 Unauthorized, verify that BEARER_TOKEN is set correctly and that your client sends Authorization: Bearer <token>. If the API key is missing or invalid, ensure API_KEY is configured in your environment. If Google Maps API errors occur, confirm that the necessary Maps APIs (Places, Routes) are enabled in your Google Cloud project.

Notes

This setup supports both local development and remote deployment. Use the local Bun-based server for rapid iteration and the Cloudflare Worker for production-like remote access. The server is designed to work with location context, making it suitable for AI agents that need to search places, get details, and plan routes from the current position.

Available tools

search_places

Find places by text query or type near a location, with radius, filters, and sorting options.

get_place

Get detailed information about a specific place, including hours, ratings, reviews, and photos.

get_route

Calculate routes or distance matrices between an origin and one or more destinations, with mode and options.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational