MCP-Geo

by webcoderz

33 415 downloads Not rated yet MIT
GitHub

About

MCP-Geo is a geocoding MCP server built with GeoPy. It provides tools that allow Large Language Models (LLMs) to geocode addresses, reverse geocode coordinates, calculate distances, and perform batch lookups in a rate-limited, error-handled way. It is aimed at developers…

Details

License
MIT

Explore

- Geocode a single address to latitude, longitude, and formatted address.
- Reverse geocode a latitude/longitude pair to the nearest address.
- Geocode with additional details like bounding boxes (provider-dependent).
- Batch geocode multiple addresses with rate limiting.
- Batch reverse geocode multiple coordinate pairs.
- Calculate distance between two addresses or coordinate pairs in miles/kilometers.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP-Geo
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository:

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

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

Install using FastMCP:

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

To use this server anywhere else:

1. Add the following configuration to the settings file:

{
    "mcp-geo": {
        "command": "uv",
        "args": [
          "--directory",
          "MCP-Geo",
          "run",
          "geo.py"
        ],
        "env": {
        "NOMINATIM_URL": "${NOMINATIM_URL}",
        "SCHEME": "http",
        "GEOCODER_PROVIDER": "nominatim"
        }
    }
}

🔒 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:

| Variable | Description | Default |
|----------------------|------------------------------------------|--------------------|
| GEOCODER_PROVIDER (optional) | "nominatim", "arcgis", or "bing" | nominatim |
| NOMINATIM_URL (optional) | Domain for Nominatim | nominatim.openstreetmap.org |
| SCHEME (optional) | http/https | http |
| ARC_USERNAME (optional for ArcGIS) | ArcGIS username | None |
| ARC_PASSWORD (optional for ArcGIS) | ArcGIS password | None |
| 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.

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

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp-geo": {
            "MCP-Geo": {
                "command": "uv",
                "args": [
                    "pip",
                    "install",
                    "-r",
                    "requirements.txt"
                ]
            }
        }
    }
}

McpServers

{
    "MCP-Geo": {
        "command": "uv",
        "args": [
            "pip",
            "install",
            "-r",
            "requirements.txt"
        ]
    }
}
Geocoding MCP server with GeoPY!

<a href="https://glama.ai/mcp/servers/ujss4qy5fs">

</a>

📋 System Requirements

- Python 3.6+

📦 Dependencies

Install all required dependencies:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.