Get the FREE Ultimate OpenClaw Setup Guide →

osmmcp

OpenStreetMap MCP server providing precision geospatial tools for LLMs via Model Context Protocol. Features geocoding, routing, nearby places, neighborhood analysis, EV charging stations, and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio estebamod-osmmcp docker run -i estebamod/osmmcp \
  --env OSMMCP_PORT="Port to expose the MCP service (default may be 8080)" \
  --env OSMMCP_LOG_LEVEL="Logging level (e.g., info, debug)" \
  --env OSMMCP_ENDPOINT_BASE="Base URL path for MCP endpoints (default is /)"

How to use

OSMMCP (OpenStreetMap MCP Server) provides a collection of geospatial tools that can be accessed via standard MCP endpoints. Once deployed (for example using the Docker command above), you can query the server for geocoding, routing, nearby places, neighborhood analysis, and EV charging station locations. These tools enable integration of precise geospatial capabilities into LLM-assisted workflows, enabling the model to translate natural language queries into actionable geospatial requests. Try starting with a geocoding request to convert an address into coordinates, then leverage routing to find efficient paths between two points, followed by nearby searches to discover points of interest around a location. The neighborhood analysis endpoint offers contextual insights about the character and amenities of a specified area, while the EV charging endpoint can locate charging stations near a given location.

How to install

Prerequisites:

  • Docker installed on your system
  • Basic understanding of running containerized applications

Installation steps:

  1. Pull and run the OSMMCP Docker image (host with Docker available): docker run -i estebamod/osmmcp

  2. If you need to customize ports or environment variables, set them via -e flags and port mappings, for example: docker run -p 8080:8080 -e OSMMCP_PORT=8080 -e OSMMCP_LOG_LEVEL=info -i estebamod/osmmcp

  3. Verify the server is running by checking logs or hitting a basic health or root endpoint (depending on image design).

  4. Optional: Build from source locally if you have the repository and Go toolchain, then run the binary as documented by the project (commonly: go build and ./osmmcp).

Note: The README provided for the project references a Docker deployment script; if you clone and build locally, ensure you have Go installed and run the build from the project root.

Additional notes

Tips and common considerations:

  • Ensure network access to any upstream geospatial data sources required by the server (e.g., OSM data, routing graphs).
  • If endpoints return large payloads, consider paginating results or applying query limits where supported.
  • Set an appropriate log level to balance visibility and performance (e.g., info for normal use, debug for troubleshooting).
  • Confirm the endpoint base path if a custom OSMMCP_ENDPOINT_BASE is used, so requests are directed to the correct URL (e.g., /geocode, /route, /nearby, /neighborhood, /ev-charging).
  • For production deployments, consider securing endpoints and providing authentication if required by your workflow.

Related MCP Servers

Sponsor this space

Reach thousands of developers