Skip to content
MCP server

OpenStreetMap

OpenStreetMap geocoding, routes, isochrones and POI search with no API key

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.3.2
Listing updated
2 days ago

About OpenStreetMap

OpenStreetMap is an open-source MCP server for maps and travel. It runs locally on your machine and is started by your AI client.

osm-mcp is for travel-planning questions such as how long a walk takes, in what order to visit five places, or what you can reach in 15 minutes on foot. Its eleven read-only tools use free public OpenStreetMap services for geocoding, walking, driving and cycling distances, multi-stop route optimisation, isochrones and point-of-interest search.

Its selling point is correct non-car routing: the public OSRM demo servers return car routes unless the FOSSGIS routed-foot, routed-bike and routed-car prefixes are used, and the author says many OSM servers miss this. It also enforces the services' usage policies in code with rate limits (1 request per second for Nominatim and OSRM), a mandatory identifying User-Agent, caching, capped Overpass concurrency and failover to another Overpass endpoint. Photon geocoding is optional, as is an OpenRouteService key.

It deliberately does not write to OpenStreetMap, render maps, track GPS, provide traffic or do bulk geocoding. It runs over stdio from npm or a container and needs Node.js 24 or newer; OSM_ALLOW_TOOLS=essential loads a curated six.

Install

Run in a terminal

claude mcp add osm-mcp --env ORS_API_KEY='<ORS_API_KEY>' -- npx -y osm-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "osm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "osm-mcp"
      ],
      "env": {
        "ORS_API_KEY": "<ORS_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "osm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "osm-mcp"
      ],
      "env": {
        "ORS_API_KEY": "<ORS_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "osm-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "osm-mcp"
      ],
      "env": {
        "ORS_API_KEY": "<ORS_API_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "osm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "osm-mcp"
      ],
      "env": {
        "ORS_API_KEY": "<ORS_API_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "osm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "osm-mcp"
      ],
      "env": {
        "ORS_API_KEY": "<ORS_API_KEY>"
      }
    }
  }
}

Configuration

  • OSM_USER_AGENTIdentifying User-Agent sent to all OSM services (Nominatim requires one)
  • ORS_API_KEYOptional OpenRouteService key; switches routing/matrix/isochrones to ORS
  • OSM_ALLOW_TOOLSComma-separated tool names or list_* prefixes to register; 'essential' selects a curated preset (default: all tools)
  • OSM_DENY_TOOLSComma-separated tool names or list_* prefixes to remove from whatever OSM_ALLOW_TOOLS left
  • OSM_USER_AGENTIdentifying User-Agent sent to all OSM services (Nominatim requires one)
  • ORS_API_KEYOptional OpenRouteService key; switches routing/matrix/isochrones to ORS
  • OSM_ALLOW_TOOLSComma-separated tool names or list_* prefixes to register; 'essential' selects a curated preset (default: all tools)
  • OSM_DENY_TOOLSComma-separated tool names or list_* prefixes to remove from whatever OSM_ALLOW_TOOLS left

What it does

Correct foot and bike routes
Uses FOSSGIS profile prefixes so walking queries are not answered with car times.
Isochrones
Shows what is reachable within a given travel time.
Multi-stop optimisation
Orders several places into an efficient route.
POI search
Finds places of interest through OpenStreetMap data.
Policy-compliant limits
Rate limiting, caching and a required User-Agent are built in.
Tool filtering
Allow and deny lists, or an essential preset of six tools.

Good for

  • Estimate walking time between two landmarks
  • Order a list of sights into a route
  • Find what is within 15 minutes on foot of a hotel
  • Find a fair meeting spot for three people
  • Geocode a place name

Pricing

Open source

Prices change. Check osm-mcp.ni-c.de before you buy.

OpenStreetMap FAQ

Do I need an API key?

No. Every backend is a free public OSM service; an OpenRouteService key is optional.

Can it edit OpenStreetMap?

No. All 11 tools are read-only and the write API is not wired up.

Is it suitable for heavy use?

Not on the public services; for heavy or commercial use, self-host the backends and point the *_BASE_URL variables at them.

What does it need to run?

Node.js 24 or newer and internet access to the public OSM services.

Is OpenStreetMap free?

Yes. OpenStreetMap is open source, so you can use and self-host it for free.

How do I add OpenStreetMap to Claude Code?

Run this command in your terminal: claude mcp add osm-mcp --env ORS_API_KEY='<ORS_API_KEY>' -- npx -y osm-mcp

What are the best alternatives to OpenStreetMap?

The closest alternatives to OpenStreetMap are Tutu eSIM, Shanghai Streets Travel Guide, Fifty Asks, Gangway AIS and Tickets: tours and event tickets in South America.

Alternatives to OpenStreetMap

  1. Tutu eSIM

    MCP server

    Live travel eSIM plans, prices and roaming costs for 190+ countries

    • 5 tools
    • Remote
    • Paid
    • Maps and travel
  2. Curated places, walking routes and areas in Shanghai, Jiangsu and Zhejiang

    • 9 tools
    • Remote
    • Free
    • Maps and travel
  3. Fifty Asks

    MCP server

    Let an agent book a free AI-visibility check or a 15-minute call for a local business

    • 10 tools
    • Remote
    • Free
    • Maps and travel
  4. Gangway AIS

    MCP server

    Vessel positions, port calls and anchorage waiting times from licensed AIS data

    • 21 tools
    • Remote
    • Freemium
    • Freight and logistics
  5. Goyondo

    MCP server

    Agent-native trip planner where your AI builds the itinerary and Goyondo stores it

    • Remote
    • Freemium
    • Maps and travel