
Nominatim Mcp Server
io.github.cyanheadsPublished by GitHub account cyanheadsv0.1.8Updated Nov 2, 2026
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Overview
OpenStreetMap geocoding and spatial query server: turns place names into coordinates, coordinates into addresses, and finds OSM features by tag.
- What you can do
- Search places and addresses, returning coordinates, structured address and OSM IDs
- Reverse geocode latitude/longitude to the nearest address or place
- Look up address records for known OSM objects by ID
- Find OSM features by tag within a radius, a bounding box, or an OSM boundary such as a city or park
- Run raw Overpass QL queries for anything the other tools cannot express
- When to use it
- Useful when an assistant needs real-world location data: resolving addresses to coordinates, describing a point on the map, or listing nearby amenities, businesses or features by tag. Also fits map-based research where paging through OSM results or custom Overpass queries is needed.
- Requirements
- Either the hosted HTTP endpoint or a local run via npx (Bun 1.4+ or Node.js 24+ for a source build). No API key is required. Outbound network access to Nominatim and Overpass; OSM_USER_AGENT is required by the upstream usage policy, and OSM_NOMINATIM_BASE_URL / OSM_OVERPASS_BASE_URL can point at mirrors or self-hosted instances.
Installation
In SourceWeft
- Open Nominatim Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.cyanheads%2Fnominatim-mcp-server/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"nominatim": {
"type": "http",
"url": "https://nominatim.caseyjhand.com/mcp"
}
}
}README
@cyanheads/openstreetmap-mcp-server
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://openstreetmap.caseyjhand.com/mcp
Overview
OpenStreetMap data through Nominatim and the Overpass API. Geocode places and addresses, resolve coordinates to the nearest address, look up known OSM objects, and query features by tag around a point, inside a bounding box, or inside an OSM boundary.
Tools
Capability reference
The openstreetmap-guide skill covers place resolution, spatial queries, paging, and interpreting coverage and tag results.
Argument aliases are accepted before canonical validation: latitude / longitude for lat / lon on nearby and reverse queries, radius_m for nearby's radius_meters, and q for search's query. Send either spelling, never both. radius, tag, and tags remain invalid; advertised schemas use canonical names.
openstreetmap_search_places tool
- Free-form
queryor the structured fieldsstreet,city,county,state,country,postalcode, never both; up to 40 results (limit, default 5; a largerlimitis served as 40 with alimitNotice), narrowed bycountrycodes,layer,featureType, and aviewbox(restricting withbounded: true) - Results carry coordinates, structured
address,boundingbox,importance, andosm_type+osm_id;extratagsadds contact and physical-attribute tags; an empty first page fails asno_results - A full page returns
nextExcludeIdsto pass back asexclude_place_ids; once results run out you get zero results and a notice, not an error
openstreetmap_reverse_geocode tool
lat/lonpluszoomfrom 3 (country) to 18 (building, the default);layerdefaults toaddress,poi- Returns the nearest indexed object with structured
address,osm_type+osm_id, andboundingbox; coordinates with no OSM data fail asno_coverage
openstreetmap_lookup_objects tool
- Up to 500
osm_idsentries, each prefixedN,W, orR(["N240109189"]); a malformed ID fails asinvalid_id_format - The first 50 unique IDs are looked up; the rest come back as
deferred_idsfor the next call - Returns address records for the objects found and lists the rest under
not_found(including objects Nominatim does not index, such as street lamps); anoticecarries anopenstreetmap_query_rawquery to check which exist
openstreetmap_query_nearby tool
lat/lonwithradius_metersup to 50,000 (default 1,000); one primary tag,amenityortag_keywith an optionaltag_value, plus up to five ANDedfilters; up to 500 features per page (a largerlimitis served as 500 with alimitNotice)- A value matches exactly by default;
list_itemmode (tag_value_match, ormatchon a filter) matches one item of a semicolon list, socuisine=pizzaalso findscuisine=pizza;italian - An
amenityvalue that OpenStreetMap tags under another key (amenity: "museum"; museums aretourism=museum) gets anoticenaming the key to retry with - Features carry
osm_type+osm_id, coordinates,distance_meters(to the feature's nearest point), and the full tag set, sorted nearest-first;effectiveTagechoes the filter chain
openstreetmap_query_bbox tool
- One scope per call: the corners
south,west,north,east, orwithinand oneR/Wboundary ref (R237385) built from a geocoding result'sosm_type+osm_id; the same tag filters, list-item matching, stray-amenitynotice, and 500-per-page cap asopenstreetmap_query_nearby effectiveAreaechoes howwithinresolved andareasTimestamphow old the area data is; a ref that maps to no area returns an empty page with a notice- A
westgreater thaneastis a box crossing the antimeridian;southgreater thannorthfails asinvalid_bbox
openstreetmap_query_raw tool
- Any Overpass QL containing
[out:json];[timeout:N]comes fromtimeout_seconds(up to 180, default 30) and[maxsize:268435456](256 MiB) is added when the query sets none; up to 500 elements per page (a largerlimitis served as 500 with alimitNotice) - Returns raw elements (ways carry
nodes[], relationsmembers[]), plustotal_elementsand theeffectiveQueryas sent; malformed QL fails asquery_errorwith Overpass's parse error max_element_bytes(default 20,000, minimum 1,000) withholds an over-budget element'smembers,nodes, orgeometryarrays, listed underwithheld_keys;withheldElementsandwithheldNoticesay how to fetch them
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
OpenStreetMap-specific:
- Nominatim requests are spaced 1,050 ms apart to respect its one-request-per-second policy;
OSM_USER_AGENTidentifies the server to both upstreams - Overpass queries are limited per endpoint by
OSM_OVERPASS_MAX_CONCURRENCY, with opt-in failover acrossOSM_OVERPASS_ENDPOINTS(see Overpass endpoint failover) - Overpass tools page with
limitandoffsetand reporttotalFound,truncated, andnextOffset; results are cached for 10 minutes (Nominatim for 60), so re-paging makes no new upstream request - An Overpass response over 64 MiB fails as
result_too_large OSM_NOMINATIM_BASE_URLandOSM_OVERPASS_BASE_URLpoint the server at a self-hosted or mirror instance
Agent-friendly output:
effectiveQuery,effectiveTag, andeffectiveAreaecho what was sent; Overpass responses adddata_timestampandservingEndpoint, and every response carries the ODbLattributionosm_type+osm_idfrom any tool feedopenstreetmap_lookup_objects, and a geocoded relation or way becomes awithinref foropenstreetmap_query_bbox- The Nominatim tools never select by tag, and
tagSelectionCaveatsays so; regex, alternation, and negation go throughopenstreetmap_query_raw - Names and tag values are escaped in the Markdown output;
structuredContentkeeps the raw text
Getting started
Connect to the hosted instance, no install:
Or run it locally:
For other clients, add this to the MCP config file:
No API key is required. For heavy use, point OSM_NOMINATIM_BASE_URL and OSM_OVERPASS_BASE_URL at your own instances. For Docker or a source build, see Running the server.
Configuration
See .env.example for the full list of optional overrides. An invalid value for any OSM_* variable stops the server at startup with a message naming the variable.
Overpass endpoint failover
By default every Overpass query goes to one endpoint, the FOSSGIS-operated main instance. List more in OSM_OVERPASS_ENDPOINTS and a failed call moves to the next entry in order:
- Endpoints that fail repeatedly are skipped for a while (30 seconds, doubling up to 10 minutes)
- When every endpoint fails, the call fails with
rate_limited,upstream_error,overpass_unavailable,endpoints_rejected,endpoints_exhausted, orendpoints_unavailable, with each endpoint's outcome in the message - Endpoints are reported by origin only (
https://overpass-api.de) inservingEndpoint, error messages, and logs - Extra entries are failover only and never add concurrency. For an instance that allows parallel queries, append
|Nto its entry (https://mirror.example/api/interpreter|4) for N slots; write a literal|in a URL as%7C. Never size a public FOSSGIS server - Calls waiting for a slot fail with
pacer_shedand aretryAfterof at least 30 seconds after 30 seconds in line
Adding an endpoint sends your queries to a third party. Check its usage policy on the OSM wiki instance list, confirm it holds global data (a regional instance answers out-of-extract queries with an empty HTTP 200), and expect mirrors to lag the main instance; servingEndpoint and data_timestamp show which host answered and how fresh its data was.
Running the server
Local development
Requires Bun v1.4.0 or higher (or Node.js v24+).
-
Build and run the production version:
-
Run checks and tests:
Docker
The image serves HTTP at http://localhost:3010/mcp in stateless session mode and logs to /var/log/openstreetmap-mcp-server. OpenTelemetry peer dependencies are installed by default; build with --build-arg OTEL_ENABLED=false to omit them. Runtime telemetry stays off until you pass -e OTEL_ENABLED=true.
Project structure
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor logging,ctx.statefor storage - Register new tools in the
createApp()arrays insrc/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
License
Apache-2.0 — see LICENSE for details.
Map data from OpenStreetMap contributors, available under the Open Database License (ODbL).
Source: README.md at commit 567a2ab
Tools
0Version history
1- v0.1.8LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declaredRequired10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts