Skip to main content
Glama
wiseman

OSM PostgreSQL Server

by wiseman

MCP-OSM:MCP 的 OpenStreetMap 集成

该软件包为 MCP 提供 OpenStreetMap 集成,允许用户通过 MCP 界面查询和可视化地图数据。

MCP-OSM截图

特征

  • 使用 Leaflet 和 OpenStreetMap 的基于 Web 的地图查看器

  • 通过服务器发送事件 (SSE) 进行服务器到客户端通信

  • 用于地图控制的 MCP 工具(添加标记、多边形、设置视图、获取视图)

  • OpenStreetMap 数据的 PostgreSQL/PostGIS 查询接口

Related MCP server: MCP Google Maps

安装

这是我的claude_desktop_config.json

{
  "mcpServers": {
    "OSM PostgreSQL Server": {
      "command": "/Users/wiseman/.local/bin/uv",
      "args": [
        "run",
        "--env-file",
        ".env",
        "--with",
        "mcp[cli]",
        "--with",
        "psycopg2",
        "--with-editable",
        "/Users/wiseman/src/mcp-osm",
        "--directory",
        "/Users/wiseman/src/mcp-osm",
        "mcp",
        "run",
        "mcp.py"
      ]
    }
  }
}

当 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 查询

F
license - not found
Not graded
quality - not tested
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Nominatim MCP — wraps OpenStreetMap Nominatim geocoding API (free, no auth)

  • OpenStreetMap Overpass MCP — programmatic queries against the OSM database

  • Geoapify MCP — wraps the Geoapify Location Platform (geoapify.com)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wiseman/osm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server