Openstreetmap MCP Server

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

Remote serverstreamable-http

What is the Openstreetmap MCP server?

Openstreetmap MCP server exists for a simple reason — assistants are far more useful when they can act on Openstreetmap directly instead of describing what you should do. Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.

What you get

  • Declarative tool definitions — single file per tool, framework handles registration and validation
  • Unified error handling across all tools
  • Pluggable auth (none, jwt, oauth)
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

What the assistant can call

Once Openstreetmap is connected, these are the calls the assistant has available:

  • openstreetmap_search_places — Convert a place name or address to geographic coordinates and structured place data
  • openstreetmap_reverse_geocode — Convert latitude/longitude coordinates to the nearest address or place name
  • openstreetmap_lookup_objects — Fetch address details for one or more known OSM objects by their IDs
  • openstreetmap_query_nearby — Find OSM features within a radius around a geographic point
  • openstreetmap_query_bbox — Find OSM features within a rectangular bounding box
  • openstreetmap_query_raw — Execute a raw Overpass QL query for advanced spatial operations
  • Prerequisites — The Prerequisites tool exposed by this server
  • Installation — The Installation tool exposed by this server

Configuration and credentials

You will need 6 environment variables: MCP_TRANSPORT_TYPE, MCP_LOG_LEVEL, OSM_NOMINATIM_BASE_URL, OSM_OVERPASS_BASE_URL, MCP_HTTP_ENDPOINT_PATH, MCP_PUBLIC_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Bun v1.3.0 or higher (or Node.js ≥24.0.0). - No API key required — Nominatim and Overpass are public APIs. For heavy use, consider pointing OSM_NOMINATIM_BASE_URL and OSM_OVERPASS_BASE_URL at self-hosted or mirror instances.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the openstreetmap mcp server does with a few real requests.

Choosing this one

Among the cloud and infrastructure options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Openstreetmap's toolset — openstreetmap_search_places, openstreetmap_reverse_geocode, openstreetmap_lookup_objects and 5 more — is a fair guide to whether it matches your workflow. It is maintained by cyanheads; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
openstreetmap_search_placesConvert a place name or address to geographic coordinates and structured place data
openstreetmap_reverse_geocodeConvert latitude/longitude coordinates to the nearest address or place name
openstreetmap_lookup_objectsFetch address details for one or more known OSM objects by their IDs
openstreetmap_query_nearbyFind OSM features within a radius around a geographic point
openstreetmap_query_bboxFind OSM features within a rectangular bounding box
openstreetmap_query_rawExecute a raw Overpass QL query for advanced spatial operations
PrerequisitesThe Prerequisites tool exposed by this server.
InstallationThe Installation tool exposed by this server.

How to install the Openstreetmap MCP server

{
  "mcpServers": {
    "openstreetmap-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/openstreetmap-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Bun v1.3.0 or higher (or Node.js ≥24.0.0). - No API key required — Nominatim and Overpass are public APIs. For heavy use, consider pointing OSM_NOMINATIM_BASE_URL and OSM_OVERPASS_BASE_URL at self-hosted or mirror instances.
VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
OSM_NOMINATIM_BASE_URLEndpoint or connection string the server talks to.Yes
OSM_OVERPASS_BASE_URLEndpoint or connection string the server talks to.Yes
MCP_HTTP_ENDPOINT_PATHFilesystem location the server is allowed to use.Optional
MCP_PUBLIC_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Openstreetmap to openstreetmap search places.
  • Use Openstreetmap to openstreetmap reverse geocode.
  • Use Openstreetmap to openstreetmap lookup objects.

Frequently asked questions

It connects Openstreetmap to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (openstreetmap_search_places, openstreetmap_reverse_geocode, openstreetmap_lookup_objects, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Openstreetmap directly.