MCP-Geo
Geocoding and reverse geocoding MCP server for LLMs.
Key Features
Use Cases
README
MCP-Geo
Geocoding MCP server with GeoPY!
π System Requirements
- Python 3.6+
π¦ Dependencies
Install all required dependencies:
# Using uv
uv sync
Required Packages
- fastmcp: Framework for building Model Context Protocol servers
- geoPy: Python library for accessing and geocoding/reverse geocoding locations.
All dependencies are specified in requirements.txt for easy installation.
π Table of Contents
- System Requirements
- Dependencies
- MCP Tools
- Getting Started
- Installation Options
- Safety Features
- Development Documentation
- Environment Variables
π οΈ MCP Tools
This MCP server provides the following geocoding tools to Large Language Models (LLMs):
geocode_location
-
Takes a user-provided address or place name and returns the best matchβs latitude, longitude, and formatted address.
-
Handles errors gracefully and returns None if the location is not found or if an error occurs.
reverse_geocode
- Takes a latitude and longitude and returns the nearest address.
- Useful for finding descriptive information about a point on the map.
geocode_with_details
- Similar to geocode_location but returns additional data such as bounding boxes and more detailed address info, if supported by the geocoder.
geocode_multiple_locations
- Accepts a list of address strings and returns a list of geocoding results (lat/lon/address) for each address.
- Rate-limited to avoid hitting geocoding service quotas.
reverse_geocode_multiple_locations
- Accepts a list of [lat, lon] pairs to perform reverse geocoding for each.
- Returns a list of dictionaries containing lat, lon, and address or None for unsuccessful lookups, also rate-limited.
distance_between_addresses
- Calculate the distance between two addresses or place names.
- accepts 2 addresses and a unit of measurement (miles/kilometer)
- Returns the distance in the specified unit, or None if either address could not be geocoded.
distance_between_coords
- Calculate the distance between two lat/lon pairs.
- accepts 2 pairs of latitude and longitude and a unit of measurement (kilometer/miles)
- Returns the distance in the specified unit.
π 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:
- 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.
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
FastMCP
The fast, Pythonic way to build MCP servers and clients.
FastMCP is a production-ready framework for building Model Context Protocol (MCP) applications in Python. It streamlines the creation of MCP servers and clients, providing advanced features such as enterprise authentication, composable tools, OpenAPI/FastAPI generation, server proxying, deployment tools, and comprehensive client libraries. Designed for ease of use, it offers both standard protocol support and robust utilities for production deployments.
- β 20,201
- MCP
- jlowin/fastmcp
Calculator MCP Server
Enables LLMs to perform precise numerical calculations via Model Context Protocol.
Calculator MCP Server provides a Model Context Protocol-compliant server which allows large language models to use calculator functionality for accurate numerical operations. It offers a single tool called 'calculate' for evaluating mathematical expressions that can be integrated into MCP ecosystems. Installation and configuration options are available via pip or uvx to support multiple client workflows. The server simplifies connecting LLMs to robust, external calculation capabilities for enhanced mathematical reasoning.
- β 131
- MCP
- githejie/mcp-server-calculator
ZoomEye MCP Server
Real-time cyberspace asset intelligence for AI assistants via Model Context Protocol.
ZoomEye MCP Server implements the Model Context Protocol (MCP) to provide network asset intelligence to AI assistants and development tools. It enables querying of global internet assets through ZoomEye's cyber asset search engine using structured parameters and dorks. The server includes features like caching, error handling, and compatibility with leading MCP environments, supporting real-time cyber asset data integration for various AI and developer platforms.
- β 50
- MCP
- zoomeye-ai/mcp_zoomeye
godoc-mcp
Token-efficient Go documentation server for LLMs using Model Context Protocol.
godoc-mcp is a Model Context Protocol (MCP) server that provides efficient, structured access to Go package documentation for large language models. It enables LLMs to understand Go projects without reading entire source files by supplying essential documentation and source code at varying levels of granularity. The tool supports project navigation, automatic module setup, caching, and works offline for both standard and third-party Go packages.
- β 88
- MCP
- mrjoshuak/godoc-mcp
DuckDuckGo Search MCP Server
A Model Context Protocol server for DuckDuckGo web search and intelligent content retrieval.
DuckDuckGo Search MCP Server provides web search capabilities through DuckDuckGo, with advanced content fetching and parsing tailored for large language models. It supports rate limiting, error handling, and delivers results in an LLM-friendly format. The server is designed for seamless integration with AI applications and tools like Claude Desktop, enabling enhanced web search and content extraction through the Model Context Protocol.
- β 637
- MCP
- nickclyde/duckduckgo-mcp-server
@dealx/mcp-server
MCP server enabling LLMs to search and interact with the DealX platform.
Implements the Model Context Protocol, providing a standardized interface for large language models to interact with the DealX platform. Supports searching for ads through structured prompts and is designed for easy integration with tools like Claude and VS Code extensions. Flexible configuration options are available for environment variables, logging, and deployment. Extensible architecture supports future feature additions beyond ad search.
- β 0
- MCP
- DealExpress/mcp-server
Didn't find tool you were looking for?