Google Maps Platform MCP Server

Google Maps Platform MCP Server

Provides MCP tools for Google Maps services including directions, geocoding, distance matrix, and places search.

Category
Visit Server

README

Google Maps Platform MCP server

This uses the googlemaps Python package (which hasn't been updated since 2023, but does appear to still be active)

Setup

For this example, you will need a Google Maps Platform API key. I restricted my APIs to the following:

  • Directions API
  • Distance Matrix API
  • Geocoding API
  • Places API

You may need to expand on this if you wish to add more functionality. Here is the Google Maps Platform API Picker to help you decided what you need. You will also need an set an additional environment variable, GOOGLE_MAPS_API_KEY.

Of course, there will be a cost to using the Maps API as well. It's got a pretty generous free-tier, depending on what you're using, just don't go crazy with it ;)

Running the FastMCP server

fastmcp run server.py --transport stdio

You can substitute stdio with streaming-http or sse (deprecated) depending on your deployment method.

NOTE: if you use the fastmcp option, it ignores the if __name__ == "__main__", so you need to pass --transport and any other settings you wish to override.

Unit tests

pytest -v tests/

Client test

Run server with:

fastmcp run server.py --transport streamable-http

Run client with:

python tests/client_list_tools.py
  • sample output:
[Tool found]: get_directions
[Tool found]: get_distance
[Tool found]: get_geocode
[Tool found]: find_place
[Tool found]: place_nearby
[Tool found]: place_details

How to use/connect

Agent Development Kit (ADK)

model="gemini-2.5-flash"
google_maps_api_key=os.getenv("GOOGLE_MAPS_API_KEY")


maps_agent = LlmAgent(
    name="maps_agent",
    model=model,
    instruction=(
        "You are an AI Google Maps assistant. Your primary function is to find places that meet the user's criteria. Include with your findings the name of the place, its rating, and its address. Limit the results to a maximum of 10. Use only the tools provided to you."
    ),
    tools=[
        MCPToolset(
            connection_params=StdioServerParameters(
                command='fastmcp',
                args=[
                    "run",
                    "maps_agent/server.py"
                ],
                env={
                    "GOOGLE_MAPS_API_KEY": google_maps_api_key
                },
            ),
            #tool_filter=['tool1', 'tool2']
        )

    ],
)

And here's a more detailed prompt example I give my agent:

MAPS_AGENT_PROMPT="""
System Role: You are an AI Google Maps assistant. Your primary function is to find places that meet the user's criteria. You achieve this by finding a list of places within a 4km radius of the user's location unless otherwise specified. Include with your findings the name of the place, its rating, and its address. Limit the results to a maximum of 10.

When asked for directions, provide the route we will be travelling via, total distance, total time and step-by-step directions in a list format.

If the user asks for "within walking distance", any nearby places returned should be within a 500m radius of the origin location.

Use only the tools provided to you.
"""

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
Qdrant Server

Qdrant Server

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

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