cyanheads avatar

Openstreetmap Mcp Server

cyanheads/openstreetmap-mcp-server

Wraps Nominatim and Overpass API to give Claude spatial reasoning over OpenStreetMap data. Six tools cover the standard workflow: geocode addresses to coordinates, reverse geocode lat/lon to places, look up OSM objects by ID, and run proximity or bounding box queries for amenities and tagged features. The raw Overpass QL tool handles complex spatial queries when the convenience methods don't fit. Results carry OSM IDs that chain directly into lookup calls, and every response includes ODbL attribution. Built on the author's mcp-ts-core framework, so it runs over stdio or streamable HTTP with the same codebase. Respects Nominatim rate limits and lets you point at private instances if you're running your own tile server.

GitHub stars
9
tools
6
transport
STDIO, HTTP
env vars
12
last updated
Nov 11, 2026

Install

From registry metadata
$ npx add-mcp https://openstreetmap.caseyjhand.com/mcp --name openstreetmap

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

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

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 6 tools

Verified live against the running server on Nov 6, 2026.

openstreetmap_search_placesGeocode a place name or address to coordinates and structured place data via Nominatim. Send either a free-form query or the structured address fields (street, city, county, state, country, postalcode), never both; results are the best-ranked matches, not every matching object...16 params

Geocode a place name or address to coordinates and structured place data via Nominatim. Send either a free-form query or the structured address fields (street, city, county, state, country, postalcode), never both; results are the best-ranked matches, not every matching object...

Parameters* required
boundedboolean
Restrict results to the viewbox instead of merely biasing toward it. Requires viewbox — setting it alone is rejected rather than ignored. With it, a match outside the box is dropped even when it sc...
citystring
City name (structured query).
countrystring
Country name or ISO 3166-1 alpha-2 code (structured query).
countrycodesvalue
Restrict results to one or more countries: comma-separated ISO 3166-1 alpha-2 codes (e.g. "us,ca"), any casing, optional spaces around the commas. Any other form — alpha-3, a semicolon list, a coun...
countystring
County or district (structured query).
exclude_place_idsarray
OSM refs (N/W/R + id) or Nominatim place_ids to drop from results; any other token form is rejected here rather than by Nominatim. Entries are trimmed, lowercase ref prefixes uppercased, a blank en...
extratagsboolean
Include the matched object's extra OSM tags — contact and metadata (phone, website, opening_hours, wikidata) and physical attributes (surface, tracktype, sac_scale, ele, access). An absent tag desc...default: false
featureTypestring
Restrict results to a geographic feature type. Automatically implies the address layer.one of country · state · city · settlement
languagestring
Preferred language for result names (BCP 47 code or Accept-Language string, e.g., "en", "de", "fr,en"). Defaults to local OSM language.
layervalue
Filter by data layer: one of address, poi, railway, natural, manmade, or a comma-separated list of them, in any casing. Any other name is rejected here, not upstream; an empty value counts as omitt...
limitinteger
Maximum results to return, up to 40 (Nominatim's own ceiling); a larger value is served as 40 and limitNotice says so. Nominatim may return fewer at its relevance cutoff; nextExcludeIds pages past it.default: 5
postalcodestring
Postal or ZIP code (structured query).
querystring
Free-form search string, e.g. "Space Needle Seattle" or "1600 Pennsylvania Ave NW, Washington DC". Not combinable with the structured address fields. Nominatim reads commas as an address hierarchy,...
statestring
State or province (structured query).
streetstring
House number and street name (structured query). Use with city/state/country fields. Cannot be combined with query.
viewboxobject
Rectangular area to bias results toward, disambiguating a name that repeats worldwide (a creek in one watershed, a street in one municipality). Narrower than countrycodes. Bias only by default: a b...
openstreetmap_reverse_geocodeConvert a latitude/longitude pair to the nearest address or named place via Nominatim. The result is the closest indexed OSM object at the requested zoom (18 building, 10 city), which in dense areas can be a neighbouring feature rather than the one containing the coordinate; p...6 params

Convert a latitude/longitude pair to the nearest address or named place via Nominatim. The result is the closest indexed OSM object at the requested zoom (18 building, 10 city), which in dense areas can be a neighbouring feature rather than the one containing the coordinate; p...

Parameters* required
extratagsboolean
Include the matched object's extra OSM tags — contact and metadata (phone, website, opening_hours, wikidata) and physical attributes (surface, tracktype, sac_scale, ele, access). An absent tag desc...default: false
languagestring
Preferred language for the result (BCP 47 code or Accept-Language string).
lat*number
Latitude in WGS84 decimal degrees.
layervalue
Restrict which OSM layer is matched: one of address, poi, railway, natural, manmade, or a comma-separated list of them, in any casing. Any other name is rejected here, not upstream; an empty value...
lon*number
Longitude in WGS84 decimal degrees.
zoominteger
Address detail level, roughly corresponding to map zoom. 18=building, 16=street, 14=neighbourhood, 12=town, 10=city, 8=county, 5=state, 3=country.default: 18
openstreetmap_lookup_objectsFetch the Nominatim address record for known OSM objects by ID, 50 per call with any more returned under deferred_ids, each prefixed N (node), W (way), or R (relation), e.g. "N240109189". Use it for IDs already in hand from openstreetmap_query_nearby or openstreetmap_query_bbo...3 params

Fetch the Nominatim address record for known OSM objects by ID, 50 per call with any more returned under deferred_ids, each prefixed N (node), W (way), or R (relation), e.g. "N240109189". Use it for IDs already in hand from openstreetmap_query_nearby or openstreetmap_query_bbo...

Parameters* required
extratagsboolean
Include each looked-up object's extra OSM tags — contact and metadata (phone, website, opening_hours, wikidata) and physical attributes (surface, tracktype, sac_scale, ele, access). An absent tag d...default: false
languagestring
Preferred language for names (BCP 47 code).
osm_ids*array
OSM IDs to look up, each prefixed with N (node), W (way), or R (relation). Always an array, including for a single ID: ["N240109189"], ["W50637691", "R146656"]. Up to 500 entries; duplicates are dr...
openstreetmap_query_nearbyFind OSM features within a radius of a point via the Overpass API, the tool for "what is near X?" questions. Filter with amenity, or with tag_key plus an optional tag_value, ANDing up to five more filters; every feature returns with its full OSM tag set (no extratags flag here...12 params

Find OSM features within a radius of a point via the Overpass API, the tool for "what is near X?" questions. Filter with amenity, or with tag_key plus an optional tag_value, ANDing up to five more filters; every feature returns with its full OSM tag set (no extratags flag here...

Parameters* required
amenitystring
OSM amenity tag value (e.g. "hospital", "pharmacy", "restaurant", "atm"), shortcut for tag_key="amenity". Exactly one primary mode is required: this or tag_key, never both. Many categories live und...
element_typesarray
OSM element types to search, at least one. Nodes cover most standalone POIs, ways most buildings and areas, relations large parks, lakes, campuses, and boundaries. Omit the field to search all thre...
filtersarray
Up to five additional filters, ANDed with the required primary amenity or tag_key filter in input order. Omitted or [] adds no conditions. Exact values miss semicolon-list values; set match "list_i...
lat*number
Center latitude in WGS84 decimal degrees.
limitinteger
Maximum results to return, up to 500 per call; a larger value is served as 500 and limitNotice says so. Applied after the Overpass query — if the area has more features, they are truncated.default: 20
lon*number
Center longitude in WGS84 decimal degrees.
offsetinteger
Number of matching features to skip before applying limit, for paging through a large result set. Features are distance-sorted before paging, so higher offsets return progressively farther matches;...default: 0
radius_metersnumber
Search radius in meters. Max 50,000m (50km). Keep under 5,000m for dense urban POI queries to avoid slow responses.default: 1000
tag_keystring
Primary OSM tag key (e.g. "leisure", "shop", "highway"); omit tag_value to match any feature carrying the key, or supply it for exact equality. The alternative to amenity, never both. Additional fi...
tag_valuestring
Literal value paired with tag_key for exact equality (e.g., "park", "supermarket"); omit for key existence. Exact equality misses semicolon-list values (cuisine=pizza;italian); tag_value_match "lis...
tag_value_matchstring
How tag_value matches: "exact" (default) compares the whole value; "list_item" matches one item of a semicolon list, so "pizza" finds cuisine=pizza;italian. Needs tag_value; not available with amen...one of exact · list_item
timeout_secondsinteger
Overpass query timeout in seconds. Increase for large radius or dense areas.default: 25
openstreetmap_query_bboxFind OSM features inside an area via the Overpass API, for surveys of everything in a region (openstreetmap_query_nearby covers proximity to a point). Scope with the four corner fields south, west, north, east, or with within and a single OSM boundary ref such as a city relati...14 params

Find OSM features inside an area via the Overpass API, for surveys of everything in a region (openstreetmap_query_nearby covers proximity to a point). Scope with the four corner fields south, west, north, east, or with within and a single OSM boundary ref such as a city relati...

Parameters* required
amenitystring
OSM amenity tag value shortcut (e.g. "cafe", "bench", "hospital"). Exactly one primary mode is required: this or tag_key, never both. Many categories live under other keys — tourism (museums, hotel...
eastnumber
Eastern boundary longitude (maximum longitude). A value below west describes an antimeridian crossing rather than an inverted box.
element_typesarray
OSM element types to search, at least one. Nodes cover most standalone POIs, ways most buildings and areas, relations large parks, lakes, campuses, and boundaries. Omit the field to search all thre...
filtersarray
Up to five additional filters, ANDed with the required primary amenity or tag_key filter in input order. Omitted or [] adds no conditions. Exact values miss semicolon-list values; set match "list_i...
limitinteger
Maximum results to return, up to 500 per call; a larger value is served as 500 and limitNotice says so. Applied after the Overpass query — if the area has more features, they are truncated.default: 20
northnumber
Northern boundary latitude (maximum latitude).
offsetinteger
Number of matching features to skip before applying limit, for paging through a large result set. The full match set is fetched and cached ~10 minutes keyed by the query, so re-paging at a new offs...default: 0
southnumber
Southern boundary latitude (minimum latitude). One of four corner fields: supply all four, or use within instead.
tag_keystring
Primary OSM tag key (e.g. "leisure", "shop", "natural"); omit tag_value to match any feature carrying the key, or supply it for exact equality. The alternative to amenity, never both. Additional fi...
tag_valuestring
Literal value paired with tag_key for exact equality (e.g., "park", "supermarket"); omit for key existence. Exact equality misses semicolon-list values (cuisine=pizza;italian); tag_value_match "lis...
tag_value_matchstring
How tag_value matches: "exact" (default) compares the whole value; "list_item" matches one item of a semicolon list, so "pizza" finds cuisine=pizza;italian. Needs tag_value; not available with amen...one of exact · list_item
timeout_secondsinteger
Overpass query timeout in seconds. Increase for large bounding boxes or dense areas.default: 25
westnumber
Western boundary longitude (minimum longitude). A west greater than east is valid, not an error: Overpass reads it as an antimeridian-crossing box and returns the union of west..180 and -180..east.
withinstring
OSM boundary to search inside, as one ref: R plus a relation id ("R237385", Seattle) or W plus a closed-way id ("W13800188", a park), case-insensitive. Take it from osm_type plus osm_id on openstre...
openstreetmap_query_rawRun an arbitrary Overpass QL query for anything the convenience tools cannot express: multi-type or union queries, relation membership, historical queries, regex tag matching. The query must include [out:json], e.g. "[out:json][timeout:15];node[\"natural\"=\"peak\"](47.5,-122....5 params

Run an arbitrary Overpass QL query for anything the convenience tools cannot express: multi-type or union queries, relation membership, historical queries, regex tag matching. The query must include [out:json], e.g. "[out:json][timeout:15];node[\"natural\"=\"peak\"](47.5,-122....

Parameters* required
limitinteger
Maximum elements to return, up to 500 per call; a larger value is served as 500 and limitNotice says so. Applied after the Overpass query — if the query matched more, they are truncated.default: 20
max_element_bytesinteger
Serialized-byte budget for one element, in UTF-8 bytes, applied per element after limit and offset — the dimension limit cannot bound, a single relation or geometry-heavy way. An over-budget elemen...default: 20000
offsetinteger
Elements to skip before applying limit, for paging a large result set. The full match set is cached ~10 minutes keyed by the query, so re-paging at a new offset is deterministic and costs no extra...default: 0
query*string
Overpass QL query string. Must include [out:json]. The server sets the endpoint and User-Agent; do not include those. With no [maxsize:N] it adds [maxsize:268435456] (256 MiB), which a busy endpoin...
timeout_secondsinteger
How long Overpass may spend on the query. A [timeout:N] directive in the query string wins over this. The client waits the full value rather than cutting a long query off early, but the endpoint en...default: 30

Sponsors

Configuration

OSM_NOMINATIM_BASE_URLdefault: https://nominatim.openstreetmap.org

Nominatim API base URL. Override to use a private or mirror instance.

OSM_USER_AGENTdefault: openstreetmap-mcp-server/0.7.2

User-Agent sent to Nominatim and Overpass. Required by usage policy.

OSM_OVERPASS_BASE_URL

Overpass API endpoint URL. When set, pins every query to this one endpoint and disables mirror failover; OSM_OVERPASS_MAX_CONCURRENCY sizes it and a |N suffix is rejected. Leave unset to use OSM_OVERPASS_ENDPOINTS.

OSM_OVERPASS_ENDPOINTSdefault: https://overpass-api.de/api/interpreter

Comma-separated ordered list of Overpass endpoints. A failure advances to the next entry within the same tool call; a single entry means no failover. An entry written url|N gets N slots of its own and adds capacity, for an instance whose operator allows parallel queries, never a

OSM_OVERPASS_MAX_CONCURRENCYdefault: 1

Concurrent Overpass queries per endpoint: OSM_OVERPASS_BASE_URL, and every OSM_OVERPASS_ENDPOINTS entry not sized with |N. With no |N entry it is also the most queries in flight across all endpoints. A query waits at most 30 seconds in total for a slot, then fails with pacer_shed

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_PUBLIC_URL

Public origin override for deployments behind a TLS-terminating reverse proxy (e.g. https://mcp.example.com).

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/openstreetmap-mcp-server

Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data via MCP. STDIO or Streamable HTTP.

6 Tools

Details

Repository
github.com/cyanheads/openstreetmap-mcp-server
Category
Data & Analytics
Package
@cyanheads/openstreetmap-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
1
Tools verified
Nov 6, 2026

More from cyanheads

Related Data & Analytics MCP servers

View all
1acedatacloud avatarNano Banana by Ace Data Cloudacedatacloud/nanobananamcpGenerate and edit Nano Banana images with Ace Data Cloud; retrieve the same task for results.9stars
2paulieb89 avatarUK Property Datapaulieb89/property-sharedUK property data — Land Registry comps, EPC, Rightmove, rental yields, stamp duty, Companies House9stars
3virtualflybrain avatarVirtualFlyBrainvirtualflybrain/vfb3-mcpMCP server for Drosophila neuroscience data from VirtualFlyBrain9stars
4wei avatarMymlh Mcp Serverwei/mymlh-mcp-serverOAuth-enabled MyMLH MCP server for accessing MyMLH data.9stars
5la-rebelion avatarLinkedIn MCP Serverla-rebelion/hapimcpLinkedIn API as MCP tools to retrieve profile data and publish content. Powered by HAPI MCP.0stars
6amirdaraee avatarLuxembourg MCPamirdaraee/luxembourg-mcpKeyless MCP access to official Luxembourg public data: laws, statistics, mobility, and more.8stars