地理编码服务

一个提供正向和反向地理编码功能的MCP服务器,基于OpenWeather Geocoding工具。

  • by benedikt-mayer
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 benedikt-mayer/lat-long-mcp-server

使用说明

lat-long mcp服务器

一个MCP服务器,它公开了用于正向和反向查找的OpenWeather地理编码工具。

设置

  • 需要Python 3.12以上。
  • 使用紫外线进行安装(首选): uv sync 或 uv pip install -e ..
  • 设置API密钥: export OPENWEATHERMAP_API_KEY=... (或通行证 --api-key).

跑

  • 默认HTTP端点: uv run --with mcp python -m lat_long_mcp_server --transport streamable-http --host 127.0.0.1 --port 8000 --mount-path /mcp
  • 工作室 : uv run --with mcp python -m lat_long_mcp_server --transport stdio

工具

  • forward_geocode(query, limit=1, country_code=None)
  • reverse_geocode(latitude, longitude, limit=1)

环境变量

  • OPENWEATHERMAP_API_KEY (必填)
  • LAT_LONG_TRANSPORT (默认值 streamable-http)
  • LAT_LONG_HOST (默认值 127.0.0.1)
  • LAT_LONG_PORT (默认值 8000)
  • LAT_LONG_MOUNT_PATH (默认值 /mcp)