OpenStreetMap

v0.3.2
io.github.ni-c/osm-mcp Checked 15 hours ago Published 1 month ago

Geocoding, walking/driving/cycling distances, route optimization, isochrones and POI search on OSM

Values you need

VariableWhat it is
OSM_USER_AGENToptional Identifying User-Agent sent to all OSM services (Nominatim requires one)
ORS_API_KEYoptional secret Optional OpenRouteService key; switches routing/matrix/isochrones to ORS
OSM_ALLOW_TOOLSoptional Comma-separated tool names or list_* prefixes to register; 'essential' selects a curated preset (default: all tools)
OSM_DENY_TOOLSoptional Comma-separated tool names or list_* prefixes to remove from whatever OSM_ALLOW_TOOLS left

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add osm-mcp -- npx -y osm-mcp@0.3.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "osm-mcp": {
      "args": [
        "-y",
        "osm-mcp@0.3.2"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "osm-mcp": {
      "args": [
        "-y",
        "osm-mcp@0.3.2"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "osm-mcp": {
      "args": [
        "-y",
        "osm-mcp@0.3.2"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.osm-mcp]
command = "npx"
args = ["-y", "osm-mcp@0.3.2"]

Docker

Requires Docker

Run in a terminal
claude mcp add osm-mcp -- docker run -i --rm ghcr.io/ni-c/osm-mcp:0.3.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "osm-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/ni-c/osm-mcp:0.3.2"
      ],
      "command": "docker"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "osm-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/ni-c/osm-mcp:0.3.2"
      ],
      "command": "docker"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "osm-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/ni-c/osm-mcp:0.3.2"
      ],
      "command": "docker",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.osm-mcp]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/ni-c/osm-mcp:0.3.2"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: geocode, reverse_geocode, route, route_matrix, optimize_route, isochrone, find_nearby_pois, poi_details, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json