Skip to main content
MCP server CX Codex

openstreetmap-mcp-server — Claude Code MCP server: install and use

Brings OpenStreetMap geocoding, reverse lookups, and Overpass spatial queries to AI coding tools. Supports remote streamable HTTP or local stdio.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http openstreetmap-mcp-server https://openstreetmap.caseyjhand.com/mcp
Open on GitHub

What openstreetmap-mcp-server does

The server exposes six tools connecting your assistant to Nominatim and the Overpass API. It handles forward geocoding by place name or split address fields, reverse geocoding from latitude and longitude, and batch lookups by OpenStreetMap entity identifiers with N, W, or R prefixes. If predefined filters fall short, openstreetmap_query_raw executes arbitrary Overpass QL code with up to 256 MiB response budgets.

Spatial discovery features support radius searches up to 50,000 meters, bounding boxes, and queries constrained within boundary relations. Tag filters match exact values or individual items in semicolon-delimited lists. Responses include distance calculations sorted from the nearest feature outward.

You can connect directly to the hosted server at https://openstreetmap.caseyjhand.com/mcp or run @cyanheads/openstreetmap-mcp-server locally via npx. When running locally over stdio, configuring OSM_USER_AGENT is essential to prevent upstream Nominatim rejections.

What it helps with

  • convert addresses and place names into geographic coordinates
  • resolve latitude and longitude coordinates into street addresses
  • find nearby amenities and tagged features within a custom radius
  • retrieve full node, way, and relation details using OSM identifiers
  • execute custom Overpass QL statements against spatial map data

Example prompts for the agent

  • Find the coordinates and postal code for Alexanderplatz in Berlin using openstreetmap_search_places.
  • List all coffee shops within 1000 meters of coordinates 52.5200, 13.4050.
  • Query OpenStreetMap features inside the bounding box south 40.7, west -74.0, north 40.8, east -73.9.

How to install openstreetmap-mcp-server

1Platform CLI: remote server

claude mcp add --transport http openstreetmap-mcp-server https://openstreetmap.caseyjhand.com/mcp

2Platform CLI

claude mcp add --env OSM_NOMINATIM_BASE_URL=<OSM_NOMINATIM_BASE_URL> --env OSM_USER_AGENT=<OSM_USER_AGENT> --env OSM_OVERPASS_BASE_URL=<OSM_OVERPASS_BASE_URL> --env OSM_OVERPASS_ENDPOINTS=<OSM_OVERPASS_ENDPOINTS> --env OSM_OVERPASS_MAX_CONCURRENCY=<OSM_OVERPASS_MAX_CONCURRENCY> --transport stdio openstreetmap-mcp-server -- npx -y @cyanheads/openstreetmap-mcp-server

Replace <…> with your own values. 7 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about openstreetmap-mcp-server

How to install openstreetmap-mcp-server in Claude Code?

Add the hosted endpoint with claude mcp add --transport http openstreetmap-mcp-server https://openstreetmap.caseyjhand.com/mcp. Alternatively, configure local stdio execution with `claude mcp add --env OSM_NOMINATIM_BASE_URL=<OSM_NOMINATIM_BASE_URL> --env OSM_USER_AGENT=<OSM_USER_AGENT> --env OSM_OVERPASS_BASE_URL=<OSM_OVERPASS_BASE_URL> --env OSM_OVERPASS_ENDPOINTS=<OSM_OVERPASS_ENDPOINTS> --env OSM_OVERPASS_MAX_CONCURRENCY=<OSM_OVERPASS_MAX_CONCURRENCY> --transport stdio openstreetmap-mcp-server -- npx -y @cyanheads/openstreetmap-mcp-server`.

What does openstreetmap-mcp-server do?

It provides programmatic access to OpenStreetMap data via Nominatim and Overpass API. Assistants can geocode locations, resolve coordinates to addresses, and extract geographic features.

What limits apply to queries and object lookups?

Nearby searches accept a maximum radius of 50,000 meters and return up to 500 features per call. Object lookups support batches of up to 500 IDs but fetch the first 50 unique items initially, deferring the rest.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor