Home

Awesome

MCP-Geo

Geocoding MCP server with GeoPY!

<a href="https://glama.ai/mcp/servers/ujss4qy5fs"> <img width="380" height="200" src="https://glama.ai/mcp/servers/ujss4qy5fs/badge" /> </a>

📋 System Requirements

📦 Dependencies

Install all required dependencies:

# Using pip
uv pip install -r requirements.txt

Required Packages

All dependencies are specified in requirements.txt for easy installation.

📑 Table of Contents

🛠️ MCP Tools

This MCP server provides the following geocoding tools to Large Language Models (LLMs):

geocode_location

reverse_geocode

geocode_with_details

geocode_multiple_locations

reverse_geocode_multiple_locations

🚀 Getting Started

Clone the repository:

git clone https://github.com/webcoderz/MCP-Geo.git
cd MCP-Geo

📦 Installation Options

You can install this MCP server in either Claude Desktop or elsewhere. Choose the option that best suits your needs.

Option 1: Install for Claude Desktop

Install using FastMCP:

fastmcp install geo.py --name "MCP Geo"

Option 2: Install elsewhere

To use this server anywhere else:

  1. Add the following configuration to the settings file:
{
    "mcp-geo": {
        "command": "uv",
        "args": [
        "run",
        "--with",
        "fastmcp",
        "fastmcp",
        "run",
        "MCP-Geo/geo.py"
        ],
        "env": {
        "NOMINATIM_URL": "nominatim.openstreetmap.org"
        }
    }
}

Replace /path/to/repo with the full path to where you cloned this repository (e.g., /Users/username/Projects/imessage-query-fastmcp-mcp-server)

🔒 Safety Features • Rate Limiting: Each geocoding call is rate-limited (e.g., 1-second delay) to avoid excessive requests that violate usage limits. • Error Handling: Catches geopy exceptions (timeouts, service errors) and returns safe None results instead of crashing.

📚 Development Documentation

If you’d like to extend or modify this server: • Check geo.py for how each tool is implemented and how geopy is integrated. • Adjust environment variables to switch providers (Nominatim, ArcGIS, Bing, etc.). • Look at geopy’s official docs for advanced usage like bounding boxes, language settings, or advanced data extraction.

⚙️ Environment Variables

Configure the server using environment variables:

VariableDescriptionDefault
GEOCODER_PROVIDER (optional)"nominatim", "arcgis", or "bing"nominatim
NOMINATIM_URL (optional)Domain for Nominatimnominatim.openstreetmap.org
SCHEME (optional)http/httpshttp
ARC_USERNAME (optional for ArcGIS)ArcGIS usernameNone
ARC_PASSWORD (optional for ArcGIS)ArcGIS passwordNone
BING_API_KEY (required for Bing)Your Bing Maps key.None

These can be set in your shell or in the MCP settings file for your environment. If more are needed just edit geo.py and add them in to whichever geocoder you are using.