Skip to main content
Glama

OSM PostgreSQL Server

by wiseman

MCP-OSM:MCP 的 OpenStreetMap 集成

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

特征

  • 使用 Leaflet 和 OpenStreetMap 的基于 Web 的地图查看器
  • 通过服务器发送事件 (SSE) 进行服务器到客户端通信
  • 用于地图控制的 MCP 工具(添加标记、多边形、设置视图、获取视图)
  • OpenStreetMap 数据的 PostgreSQL/PostGIS 查询接口

安装

这是我的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 查询
-
security - not tested
-
license - not tested
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

为 MCP 提供 OpenStreetMap 集成,允许用户使用添加标记、多边形和控制地图视图的工具来查询和可视化地图数据。

  1. 特征
    1. 安装
      1. 环境变量
      2. MCP 工具

    Related MCP Servers

    • A
      security
      F
      license
      A
      quality
      An MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.
      Last updated -
      39
      28
      • Apple
    • A
      security
      A
      license
      A
      quality
      An MCP server that creates a virtual traveling environment on Google Maps, allowing users to guide an avatar on journeys with photo reports and SNS integration.
      Last updated -
      2
      14
      12
      TypeScript
      MIT License
      • Linux
      • Apple
    • -
      security
      -
      license
      -
      quality
      Provides access to Google Maps API functionality including geocoding, place search, direction routing, and distance calculations through a structured MCP interface.
      Last updated -
      JavaScript
      MIT License
    • -
      security
      F
      license
      -
      quality
      An MCP-based project that integrates Zhipu AI and Tencent Map APIs to provide weather queries, geocoding, and web search functionality through both command-line and web interfaces.
      Last updated -
      2
      Python

    View all related MCP servers

    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