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)
