Skip to main content

Geocoding & Place Discovery MCP Server via Nominatim/OpenStreetMap

Project description

chuk-mcp-geocoder

Geocoding & Place Discovery MCP Server via Nominatim/OpenStreetMap.

Provides forward/reverse geocoding, bounding box extraction, nearby places discovery, and administrative boundary lookup — designed to work alongside other MCP geospatial servers (DEM, STAC, etc.).

Tools

Tool Description
geocode Place name to coordinates (lat, lon, bbox, address)
reverse_geocode Coordinates to place name and address
bbox_from_place Place name to [west, south, east, north] bbox for DEM/STAC tools
nearby_places Find places near a coordinate at multiple scales
admin_boundaries Administrative hierarchy (country, state, county, city, suburb)
geocoder_status Server status and cache statistics
geocoder_capabilities Full capabilities listing with LLM guidance

Quick Start

# Install
uv sync

# Run tests
uv run pytest

# Run server (stdio mode for MCP CLI)
uv run chuk-mcp-geocoder stdio

# Run server (HTTP mode)
uv run chuk-mcp-geocoder http --port 8010

Usage with MCP CLI

uv run mcp-cli --server geocoder,dem,stac

Then ask:

"Get the elevation profile for the Strood causeway connecting Mersea Island to the mainland"

The LLM will use bbox_from_place or geocode to resolve the location, then pass coordinates to the DEM server.

Configuration

Environment Variable Description Default
NOMINATIM_EMAIL Contact email for Nominatim API (none)
NOMINATIM_BASE_URL Custom Nominatim instance URL https://nominatim.openstreetmap.org
MCP_STDIO Force stdio transport mode (auto-detect)

Architecture

Follows the same 5-layer pattern as chuk-mcp-dem:

  1. core/nominatim.py — Async HTTP client with rate limiting and LRU cache
  2. core/geocoder.py — Async manager with validation and typed dataclass results
  3. models/responses.py — Pydantic v2 response models (extra="forbid", to_text())
  4. constants.py — All configuration, messages, and metadata
  5. tools/*/api.py — MCP tool registration with @mcp.tool() decorators

Data Source

All geocoding data comes from OpenStreetMap via the Nominatim API.

  • Data license: ODbL 1.0
  • API rate limit: 1 request/second (public API)
  • Results are cached in-memory (1 hour TTL)

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chuk_mcp_geocoder-0.1.0.tar.gz (147.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chuk_mcp_geocoder-0.1.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file chuk_mcp_geocoder-0.1.0.tar.gz.

File metadata

  • Download URL: chuk_mcp_geocoder-0.1.0.tar.gz
  • Upload date:
  • Size: 147.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for chuk_mcp_geocoder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92c062c280f93c07e8c912bc820406f4b6aa1c3c9032b463dd1afc4878b22516
MD5 340b8d46a72b8e4ad40b472b32cc3b42
BLAKE2b-256 c35c0ed7e754975b914d91c555f575c1ecaf60c7fbd084561a98c7584b43066d

See more details on using hashes here.

File details

Details for the file chuk_mcp_geocoder-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chuk_mcp_geocoder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4171cae033f1b3829ba934b5c1cefa106e57adb23794ca5d6608ab7980bae0cf
MD5 af91b703a73142647133e06ca068d013
BLAKE2b-256 8c11e699a3b70c172be9df844ff9c2014a05c07ea12c45b398cc9b12a5e97e5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page