Skip to main content
Glama

openstreetmap-mcp-server

Server Details

Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.

Status
Healthy
Last Tested
Transport
Streamable HTTP
URL
Repository
cyanheads/openstreetmap-mcp-server
GitHub Stars
1

Glama MCP Gateway

Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.

MCP client
Glama
MCP server

Full call logging

Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.

Tool access control

Enable or disable individual tools per connector, so you decide what your agents can and cannot do.

Managed credentials

Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.

Usage analytics

See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.

100% free. Your data is private.
Tool DescriptionsA

Average 4.6/5 across 6 of 6 tools scored.

Server CoherenceA
Disambiguation5/5

Each tool has a clearly distinct purpose: geocode resolves addresses to coordinates, reverse does opposite, lookup retrieves by ID, query_bbox and query_nearby handle spatial queries by rectangle and radius respectively, and query_raw enables arbitrary Overpass queries. No two tools overlap in functionality.

Naming Consistency5/5

All tools follow the consistent pattern 'openstreetmap_<verb>' with variations only for query subtypes (_bbox, _nearby, _raw). Verbs are descriptive and the prefix ensures namespace clarity.

Tool Count5/5

With 6 tools, the server covers the essential OSM operations (geocoding, lookup, spatial queries) without unnecessary bloat. Each tool earns its place and the count feels natural for the domain.

Completeness5/5

The tool set covers forward and reverse geocoding, ID-based lookup, bounding box and proximity queries, and a raw query escape hatch. This is sufficient for most read-only OSM workflows; no obvious gaps.

Available Tools

6 tools
openstreetmap_lookup_objectsLook up address details for OSM objects by ID
Read-onlyIdempotent
Inspect

Fetch address details for one or more known OSM objects by their IDs via Nominatim. Each ID must be prefixed with N (node), W (way), or R (relation), e.g., "N240109189", "W50637691", "R146656". Up to 50 IDs per call. Use when an OSM ID is already known from a prior openstreetmap_query_nearby or openstreetmap_query_bbox result — this is more efficient than a geocoding round trip to get the full Nominatim address record.

ParametersJSON Schema
NameRequiredDescriptionDefault
osm_idsYesOSM 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 50 IDs per call.
languageNoPreferred language for names (BCP 47 code).
extratagsNoInclude extra OSM tags (phone, website, wikidata, etc.).

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalYesNumber of results returned.
resultsYesAddress details for the requested OSM IDs that were found.
not_foundYesOSM IDs from the request that returned no result.
attributionYesRequired data attribution: Data © OpenStreetMap contributors, ODbL 1.0.
openstreetmap_query_bboxFind OSM features within a bounding box
Read-onlyIdempotent
Inspect

Find OSM features within a rectangular geographic area (bounding box) via the Overpass API. Useful for area surveys where you want everything in a region, not proximity searches. Use amenity for common POI types (hospital, pharmacy, cafe, school, etc.) or tag_key + tag_value for other OSM categories (leisure=park, shop=supermarket, natural=peak). Exactly one of amenity or tag_key/tag_value must be provided. Every feature includes its full OSM tag set; the extratags flag (used by the Nominatim-backed openstreetmap_search_places, openstreetmap_reverse_geocode, and openstreetmap_lookup_objects tools) does not apply here. For proximity searches centered on a point, use openstreetmap_query_nearby instead.

ParametersJSON Schema
NameRequiredDescriptionDefault
eastYesEastern boundary longitude (maximum longitude).
westYesWestern boundary longitude (minimum longitude).
limitNoMaximum results to return. Applied after the Overpass query — if the area has more features, they are truncated.
northYesNorthern boundary latitude (maximum latitude).
southYesSouthern boundary latitude (minimum latitude).
offsetNoNumber 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 offset is deterministic and costs no extra upstream request. Pass the nextOffset value from a prior truncated response.
amenityNoOSM amenity tag value shortcut (e.g., "cafe", "bench", "hospital"). Cannot be combined with tag_key/tag_value.
tag_keyNoOSM tag key for non-amenity queries (e.g., "leisure", "shop", "natural"). Use with tag_value. Cannot be combined with amenity.
tag_valueNoOSM tag value paired with tag_key (e.g., "park", "supermarket", "peak").
element_typesNoOSM element types to search. Ways cover most buildings and areas; nodes cover most standalone POIs. Add "relation" for complex structures.
timeout_secondsNoOverpass query timeout in seconds. Increase for large bounding boxes or dense areas.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when the page came back empty. Distinguishes a query that matched nothing (try a different bounding box or tag) from an offset past the end of a non-empty result set (retry at a lower offset). Absent when results were returned.
elementsYesMatching OSM features within the bounding box, up to the limit.
truncatedYesTrue if results were cut at the limit. Reduce bbox area, add more specific tags, or page with offset to retrieve the rest.
nextOffsetNoOffset to pass on the next call to retrieve the following page of features. Present only when more features remain beyond this page.
totalFoundYesTotal features returned by Overpass before limit truncation.
attributionYesRequired data attribution: Data © OpenStreetMap contributors, ODbL 1.0.
effectiveTagYesThe OSM tag filter applied (key=value, e.g. "amenity=cafe" or "leisure=park").
data_timestampYesOSM data freshness timestamp from the Overpass response.
openstreetmap_query_nearbyFind OSM features near a point
Read-onlyIdempotent
Inspect

Find OSM features within a radius around a geographic point via the Overpass API. The primary tool for "what's near X?" spatial queries. Use amenity for common POI types (hospital, pharmacy, restaurant, cafe, school, atm, etc.) or tag_key + tag_value for other OSM categories (leisure=park, shop=supermarket, natural=peak). Exactly one of amenity or tag_key/tag_value must be provided. Results include all element types specified (nodes cover standalone POIs, ways cover buildings and areas), each with its full OSM tag set, sorted nearest-first by distance_meters from the center point. The extratags flag is not needed here — it applies only to the Nominatim-backed openstreetmap_search_places, openstreetmap_reverse_geocode, and openstreetmap_lookup_objects tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
latYesCenter latitude in WGS84 decimal degrees.
lonYesCenter longitude in WGS84 decimal degrees.
limitNoMaximum results to return. Applied after the Overpass query — if the area has more features, they are truncated.
offsetNoNumber 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; the full set is cached ~10 minutes so re-paging costs no extra upstream request. Pass the nextOffset value from a prior truncated response.
amenityNoOSM amenity tag value (e.g., "hospital", "pharmacy", "restaurant", "school", "atm"). Shortcut for tag_key="amenity". Cannot be combined with tag_key/tag_value.
tag_keyNoOSM tag key for non-amenity queries (e.g., "leisure", "shop", "highway", "natural"). Use with tag_value. Cannot be combined with amenity.
tag_valueNoOSM tag value paired with tag_key (e.g., "park", "supermarket", "primary", "peak").
element_typesNoOSM element types to search. Ways cover most buildings and areas; nodes cover most standalone POIs. Add "relation" for complex structures like large campuses.
radius_metersNoSearch radius in meters. Max 50,000m (50km). Keep under 5,000m for dense urban POI queries to avoid slow responses.
timeout_secondsNoOverpass query timeout in seconds. Increase for large radius or dense areas.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when the page came back empty. Distinguishes a query that matched nothing (try a larger radius or different tag) from an offset past the end of a non-empty result set (retry at a lower offset). Absent when results were returned.
elementsYesMatching OSM features, up to the limit.
truncatedYesTrue if results were cut at the limit. Reduce radius, add more specific tags, or page with offset to retrieve the rest.
nextOffsetNoOffset to pass on the next call to retrieve the following page of features. Present only when more features remain beyond this page.
totalFoundYesTotal features returned by Overpass before limit truncation.
attributionYesRequired data attribution: Data © OpenStreetMap contributors, ODbL 1.0.
effectiveTagYesThe OSM tag filter applied (key=value, e.g. "amenity=cafe" or "leisure=park").
data_timestampYesOSM data freshness timestamp from the Overpass response.
openstreetmap_query_rawExecute a raw Overpass QL query
Read-onlyIdempotent
Inspect

Execute a raw Overpass QL query for advanced spatial queries that the convenience tools do not cover. Use for multi-type queries, union queries, relation membership, historical queries, or any operation requiring full Overpass QL expressiveness. The query must include [out:json]. Example: "[out:json][timeout:15];node"natural"="peak";out body;" Validate complex queries at overpass-turbo.eu before use. For simple "what's near X?" or "what's in this area?" queries, use openstreetmap_query_nearby or openstreetmap_query_bbox instead.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesOverpass QL query string. Must include [out:json]. The server sets the endpoint and User-Agent; do not include those. Example: "[out:json][timeout:15];node[\"natural\"=\"peak\"](47.5,-122.5,47.7,-122.2);out body;"
timeout_secondsNoQuery timeout in seconds. The [timeout:N] directive in the query string takes precedence if present. Max 180s.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when no elements were returned — e.g., check query syntax or broaden the filter. Absent when results were returned.
elementsYesRaw Overpass API response elements. Structure varies by query type — nodes have lat/lon, ways have nodes[], relations have members[].
attributionYesRequired data attribution: Data © OpenStreetMap contributors, ODbL 1.0.
data_timestampNoOSM data freshness timestamp from the Overpass response. Absent if not included in the response.
effectiveQueryYesThe Overpass QL string as sent to the API (after any timeout injection).
total_elementsYesNumber of elements returned.
openstreetmap_reverse_geocodeReverse geocode coordinates to an address
Read-onlyIdempotent
Inspect

Convert latitude/longitude coordinates to the nearest address or place name via Nominatim/OpenStreetMap. Returns the closest matching OSM object at the given coordinates. Note: Nominatim finds the nearest indexed OSM object — in dense areas this may differ from the address at the exact coordinate. Use zoom=18 for building-level accuracy, lower zoom values for coarser resolution (e.g., zoom=10 for city-level).

ParametersJSON Schema
NameRequiredDescriptionDefault
latYesLatitude in WGS84 decimal degrees.
lonYesLongitude in WGS84 decimal degrees.
zoomNoAddress detail level, roughly corresponding to map zoom. 18=building, 16=street, 14=neighbourhood, 12=town, 10=city, 8=county, 5=state, 3=country.
layerNoRestrict which OSM layer is matched. Comma-separated: address, poi, railway, natural, manmade. Default: address,poi.
languageNoPreferred language for the result (BCP 47 code or Accept-Language string).
extratagsNoInclude extra OSM tags when available (phone, website, opening_hours, wikidata, etc.).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYesThe closest matching OSM object at the given coordinates.
attributionYesRequired data attribution.
openstreetmap_search_placesGeocode a place name or address
Read-onlyIdempotent
Inspect

Convert a place name or address to geographic coordinates and structured place data via Nominatim/OpenStreetMap. Accepts either a free-form query string (e.g., "Space Needle Seattle") or structured address fields (street, city, state, etc.) — the two modes are mutually exclusive. Returns results ordered by Nominatim relevance (importance score). Use countrycodes to restrict results to specific countries. For exhaustive POI lists in an area, use openstreetmap_query_nearby or openstreetmap_query_bbox instead — Nominatim search returns best matches, not all matching objects.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityNoCity name (structured query).
layerNoFilter by data layer. Comma-separated values: address, poi, railway, natural, manmade. Default: no restriction.
limitNoMaximum results to return. Nominatim may return fewer when additional results do not sufficiently match. Max 40.
queryNoFree-form search string (e.g., "Space Needle Seattle" or "1600 Pennsylvania Ave NW, Washington DC"). Cannot be combined with structured address fields. Keep the query to a POI name plus its city or region. Do not insert a parent institution, campus, or building name between the name and the locality: Nominatim reads commas as an address hierarchy and returns nothing when an intermediate token is not a matching containment level. For example, use "Beinecke Library, New Haven", not "Beinecke Library, Yale University, New Haven".
stateNoState or province (structured query).
countyNoCounty or district (structured query).
streetNoHouse number and street name (structured query). Use with city/state/country fields. Cannot be combined with query.
countryNoCountry name or ISO 3166-1 alpha-2 code (structured query).
languageNoPreferred language for result names (BCP 47 code or Accept-Language string, e.g., "en", "de", "fr,en"). Defaults to local OSM language.
extratagsNoInclude extra OSM tags when available (e.g., phone, website, opening_hours, wikidata). Increases response size.
postalcodeNoPostal or ZIP code (structured query).
featureTypeNoRestrict results to a geographic feature type. Automatically implies the address layer.
countrycodesNoRestrict results to one or more countries. Comma-separated ISO 3166-1 alpha-2 codes (e.g., "us,ca"). Preferred over the structured country field when filtering.
exclude_place_idsNoOSM refs (N/W/R + id) or Nominatim place_ids to drop from results, forwarded as the exclude_place_ids parameter. Pass the nextExcludeIds value from a prior truncated response to page toward the next-best matches — it emits stable OSM refs when available, which page more reliably than volatile place_ids. When the walk runs out, the call succeeds with zero results and an exhaustion notice rather than failing — treat that as the loop-termination signal. Best-effort progressive retrieval, not a stable cursor — Nominatim ranking can reorder slightly between calls, so already-seen results may shift.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe limit applied to this request.
shownNoNumber of results returned.
totalYesNumber of results returned.
noticeNoGuidance when the page came back empty. Present when an exclude_place_ids paging walk is exhausted — the query matched, the walk simply ended, so no rewrite is needed. Absent when results were returned.
resultsYesGeocoding results, ordered by Nominatim relevance (importance score descending).
truncatedNoTrue if the result count equals the requested limit (Nominatim may have more).
attributionYesRequired data attribution: Data © OpenStreetMap contributors, ODbL 1.0.
effectiveQueryYesThe effective query sent to Nominatim — the free-form query string, or a reconstructed string from the provided structured address fields.
nextExcludeIdsNoAccumulated exclude tokens (prior excludes plus this page) to pass as exclude_place_ids on the next call, retrieving the next-best matches. Each token is a stable OSM ref (N/W/R + osm_id) when the result carries one, falling back to the Nominatim place_id otherwise. Present only when results were truncated. Nominatim reports no total, so a truncated page is not proof that more matches exist — the following page may come back exhausted (zero results plus a notice). Best-effort: Nominatim ranking is not perfectly stable across calls.

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.