MCP-OSM:MCP 的 OpenStreetMap 集成
该软件包为 MCP 提供 OpenStreetMap 集成,允许用户通过 MCP 界面查询和可视化地图数据。
特征
使用 Leaflet 和 OpenStreetMap 的基于 Web 的地图查看器
通过服务器发送事件 (SSE) 进行服务器到客户端通信
用于地图控制的 MCP 工具(添加标记、多边形、设置视图、获取视图)
OpenStreetMap 数据的 PostgreSQL/PostGIS 查询接口
安装
这是我的claude_desktop_config.json
:
当 MCP 服务器启动时,它还会在http://localhost:8889/启动一个具有地图界面的 Web 服务器。
环境变量
以下环境变量可用于配置 MCP:
FLASK_HOST
- Flask 服务器的主机(默认值:127.0.0.1)FLASK_PORT
- Flask 服务器的端口(默认值:8889)PGHOST
- PostgreSQL 主机(默认:localhost)PGPORT
- PostgreSQL 端口(默认值:5432)PGDB
-PostgreSQL 数据库名称(默认:osm)PGUSER
- PostgreSQL 用户名(默认值:postgres)PGPASSWORD
- PostgreSQL 密码(默认:postgres)
MCP 工具
以下 MCP 工具可用:
get_map_view
- 获取当前地图视图set_map_view
- 将地图视图设置为特定坐标或边界set_map_title
- 设置地图右下角显示的标题add_map_marker
- 在特定坐标处添加标记add_map_line
- 添加由一组坐标定义的线add_map_polygon
- 添加由一组坐标定义的多边形query_osm_postgres
- 对 OpenStreetMap 数据库执行 SQL 查询
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
为 MCP 提供 OpenStreetMap 集成,允许用户使用添加标记、多边形和控制地图视图的工具来查询和可视化地图数据。
Related MCP Servers
- -securityAlicense-qualityMCP Server for the Google Maps API.Last updated -11,86869,779MIT License
- AsecurityAlicenseAqualityEnables seamless integration with any LLM client supporting MCP for creating and optimizing technical content and product positioning using Open Strategy Partners' methodologies.Last updated -6237CC BY-SA 4.0
- AsecurityAlicenseAqualityProvides access to Google Maps API functionality including geocoding, place search, direction routing, and distance calculations through a structured MCP interface.Last updated -41MIT License
- -securityFlicense-qualityAn MCP tool that integrates with Amap API services, allowing AI to access geographic information, weather data, and route planning.Last updated -6