osm-mcp
If you are the rightful owner of osm-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP-OSM integrates OpenStreetMap with MCP, enabling map data querying and visualization.
MCP-OSM is a package designed to integrate OpenStreetMap (OSM) with the Model Context Protocol (MCP) server, providing users with the ability to query and visualize map data through a web-based interface. The integration leverages Leaflet for map rendering and Server-Sent Events (SSE) for real-time server-to-client communication. It also includes a PostgreSQL/PostGIS query interface to interact with OSM data, allowing for complex spatial queries and data manipulation. The server setup is straightforward, requiring configuration of environment variables for the Flask server and PostgreSQL database connection. Once configured, users can access a web server that hosts the map interface, enabling interactive map control and data visualization.
Features
- Web-based map viewer using Leaflet and OpenStreetMap
- Server-to-client communication via Server-Sent Events (SSE)
- MCP tools for map control (adding markers, polygons, setting view, getting view)
- PostgreSQL/PostGIS query interface for OpenStreetMap data
Tools
get_map_view
Get the current map view
set_map_view
Set the map view to a specific coordinate or boundary
set_map_title
Set the title displayed in the lower right corner of the map
add_map_marker
Adding marks to specific coordinates
add_map_line
Add lines defined by a set of coordinates
add_map_polygon
Add a polygon defined by a set of coordinates
query_osm_postgres
Perform SQL query on OpenStreetMap database