Hands interacting with a holographic AI chat interface

OpenStreetMap MCP Server

Connect to Claude, Cursor, or Copilot to add OpenStreetMap data to your workflows. You can also create your own agents to build custom geospatial workflows, such as finding the best restaurant in town.

Agents cannot look up maps on their own. This server gives them tools to search places, check opening hours, and plan walk or bike routes from a chat prompt.

ClaudeCursorAgentsMCPOpenStreetMap

Agentic geospatial workflows

You ask in plain language. The agent picks OSM tags and an area. The tools search places, rank by distance, read opening hours, discover POI metadata, and compute walk or bike routes on the OSM street network. For example, get the top laptop friendly cafes in your city, suggest a bar crawl of popular bars within walking distance, or automatically search for niche amenities like charging stations or parking lots in a city.

What the tools cover

  • Live map facts, not guesses. Every coordinate, distance, and opening-hours verdict comes from a query against live OpenStreetMap features, so the agent has nothing to invent.
  • Local search. Ask for cafes, restaurants, pharmacies, ATMs, or other OSM amenities near a point or inside a map box, ranked by distance.
  • Opening hours. OSM opening_hours strings are parsed in code, in each venue's own timezone, so the agent can ask for places open now or bars open after 20:00 and get a consistent answer.
  • Walk and bike reach, not a straight line. Isochrone, given-order path, and optimized loops run on the OSM walk and bicycle network. Useful for "cafes within a 10-minute bike ride" or "is the office a 20-minute walk."
  • Raw OSM when needed. Query buildings, cycleways, parks, and other tagged features with the same filters as the Features API, then preview or export GeoJSON, without standing up Overpass.

Workflows you can build

Typical geospatial agent workflows include a cafe or restaurant finder, a store locator ranked from a station, a nightlife list filtered by opening hours, a walking bar crawl, a multi-stop walk from hotel to cafe to office, and a commute check with a walk or bike isochrone. Example prompts and the tools they map to are in Typical AI questions below. The same operations exist as HTTP playgrounds if you are not going through an LLM.

For why an agent needs a live map, why tool schemas beat prompt engineering, and a worked restaurant-finder, read how MCP gives agents live OpenStreetMap data.

How to use

Two ways to connect: the hosted HTTP endpoint, or a local stdio process you run yourself. Both work in Claude, Cursor, Copilot, and custom agents. You need an API key, and the free tier is enough to build with.

Hosted HTTP server

No local install. Point Claude or Cursor at https://api.maplark.com/mcp with your API key. Tool calls bill against that key the same as the HTTP APIs. Add this to your MCP config.

json
{
  "mcpServers": {
    "maplark": {
      "url": "https://api.maplark.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

Self-host local server

Run the stdio server on your machine. For Claude or Cursor, install uv and add this to your MCP config.

json
{
  "mcpServers": {
    "maplark": {
      "command": "uvx",
      "args": ["--from", "osmfeatures[mcp]", "osmfeatures", "mcp"],
      "env": { "MAPLARK_API_KEY": "YOUR_KEY" }
    }
  }
}

For a custom agent, install the package and run the server yourself:

bash
pip install "osmfeatures[mcp]"
export MAPLARK_API_KEY="sk-..."
osmfeatures mcp

The MCP server is open source. The code is on GitHub: github.com/MapLark/osmfeatures-py

Tools

The LLM picks tags, an area, budgets, and the next tool. Code computes metres, ranks, network paths, and opening-hours status. If you did not name a place, pass a bbox or lat/lng as "here". If you named a city or neighborhood, the agent calls geocode first and searches in the returned bbox (or lat/lng plus radius when bbox is missing).

GroupToolsWhat it does
GeocodegeocodePlace name to lon/lat and a bounding box. Called first whenever the user names a city or neighborhood.
Placesplaces_search, places_nearby, places_detailsPOIs by OSM tag in a bbox or radius, nearest-first ranking from a point, and full detail for one OSM id.
Routesroutes_isochrone, routes_path, routes_optimized_pathWalk and bike reach polygons, given-order paths, and TSP-ordered tours on the OSM network.
Generic OSMqueryAny tagged feature: buildings, cycleways, parks. One complete tile (omitted limit is the plan max_limit). No cursor.
Counts and densitycount, densityTotals or a histogram of tagged features in an area, and occupied grid cells for heatmaps. Draw density with preview_map.
Local (no HTTP)nearest_within, filter_open, point_in_polygon, points_in_polygonJoins and filters over collections the agent already fetched. Free, instant, and the reason the model never does arithmetic.
Draw / exportpreview_map, export_geojsonRender one or more collection_ids on a map, or hand the raw GeoJSON back to the host.

Tags are plain OpenStreetMap tags: amenity=restaurant, cuisine=italian, shop=supermarket, tourism=hotel, amenity=charging_station. There is no proprietary category tree to learn, and models already know the OSM tag schema.

Typical AI questions

Example prompts and the MCP tools the planner calls.

PromptMCP tools
Open cafes by distance and cuisine near megeocode the station, then places_nearby
Vegan restaurants open after 6pm on a walk from T Centralen to Sodermalm in Stockholmgeocode, routes_path , places_search, filter_open, nearest_within, preview_map
Restaurants within 150 m of Stockholm Central stationgeocode the station, two places_search, then nearest_within
Open cafes within a 10-minute bike ride near megeocode the station, routes_isochrone + places_search in a covering radius + points_in_polygon
Suggest a bar crawl in Sodermalm, Stockholmgeocode, places_search, then routes_optimized_path (loop=true)
Map every cycleway, building, or park in Sodermalm, Stockholmgeocode, then query over the returned bbox, then preview_map
What amenities are there in Sweden, and how many of each?geocode Sweden, then count with tags=amenity and group_by=amenity
Draw heatmap of amenities in Stockholmgeocode, then density (tags=amenity), then preview_map

Connect with your API key

Create a key, then paste it as MAPLARK_API_KEY for local stdio or as Authorization: Bearer for the hosted HTTP URL.