1. Conduid
  2. Search
  3. GoogleMapsMCPServer
MCP server · Search

GoogleMapsMCPServer

A simple MCP server for Google Maps, providing tools to geocode addresses and fetch map images. Built with FastMCP, it serves as a straightforward example for creating custom MCP integrations.

Unclaimed search
34Low

Scored 7 months ago · breakdown

About GoogleMapsMCPServer

GoogleMapsMCPServer is an MCP server in the Search category: a simple MCP server for Google Maps, providing tools to geocode addresses and fetch map images. Built with FastMCP, it serves as a straightforward example for creating custom MCP integrations.

Install

From source
git clone https://github.com/muddassir-lateef/googleMapsMCPServer

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about GoogleMapsMCPServer

Powered by Claude · Grounded in docs

I know everything about GoogleMapsMCPServer. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Google Maps MCP Server

This project provides a Model Context Protocol (MCP) server that exposes tools for interacting with the Google Maps API. It's built using FastMCP and can be used as an example for creating your own MCP servers.

Features

The server exposes the following MCP features:

  • Tools:

    • geocode: Geocodes an address string and returns the latitude and longitude.
    • get_map: Returns a URL to a static map image for a given latitude and longitude.
  • Prompts:

    • get_map_for_address: A template that generates a user-friendly prompt to ask for a map of a specific address.

Project Structure

.
├── src
│   └── googlemaps_mcp_server
│       └── main.py         # The MCP server implementation
├── tests
│   └── __init__.py
├── .gitignore
├── poetry.lock
├── pyproject.toml
├── README.md
└── test_client.py          # An example client to test the server

Setup and Installation

Prerequisites

  • Python 3.10+
  • Poetry for dependency management.

Installation

Use Poetry to install the project dependencies from the `poetry.lock` file.
```bash
poetry install
```

Configuration

This server requires a Google Maps API key to function.

  1. Create a .env file: Create a file named .env in the root of the project.

    touch .env
    
  2. Add your API key: Open the .env file and add your Google Maps API key in the following format:

    GOOGLE_MAPS_API_KEY="YOUR_GOOGLE_MAPS_API_KEY"
    

    Replace "YOUR_GOOGLE_MAPS_API_KEY" with your actual key. The server loads this key from the environment.

Running the Server

To start the MCP server, run the main.py script:

poetry run python src/googlemaps_mcp_server/main.py

The server will start and listen on http://0.0.0.0:8000/mcp.

Using the Client

An example client is provided in test_client.py to demonstrate how to connect to the server and use its tools.

To run the client:

poetry run python test_client.py

The client will:

  1. Call the geocode tool.
  2. Use the result to call the get_map tool for several zoom levels.
  3. List and use the get_map_for_address prompt.

Example Output

Geocoding 'University of Passau, Germany'...
Geocode Result: {
  "latitude": 48.5677779,
  "longitude": 13.4527974
}
Getting map for lat=48.5677779, lon=13.4527974 at zoom=18...
Map Result (zoom=18): { "map_url": "https://maps.googleapis.com/maps/api/staticmap?center=48.5677779%2C13.4527974&zoom=18&size=1024x1024&maptype=hybrid&scale=2&key=..." }
...

--- Testing Prompts ---
Available Prompts: ['get_map_for_address']
Generated Prompt: You are a maps assistant that is supposed to first use geocode tool to get geo coordinates of the address. Then use get_map tool to get a url of the map snippet of the address.By default show map of hybrid type.Now Show me a map of University of Passau, Germany.
--- Prompt Test Complete ---

staticmap

Endpoints

  • /mcp/geocode?address=<address>: Geocodes an address string and returns the latitude and longitude.
  • /mcp/get_map?lat=<latitude>&lon=<longitude>&maptype=<maptype>: Returns a URL to a static map image. maptype can be one of roadmap, satellite, hybrid, terrain.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About GoogleMapsMCPServer

How do I install GoogleMapsMCPServer?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is GoogleMapsMCPServer safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is GoogleMapsMCPServer still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.