静态地图MCP服务器
一个MCP服务器,在OpenStreetMap图块上渲染路线和标记并另存为PNG。
 
Example hiking route from Camp Bohinj to Rudno Polje via Triglav
快速开始
添加到MCP配置中:
{
"mcpServers": {
"staticmap": {
"command": "uvx",
"args": ["staticmap-mcp"]
}
}
}\[!注意\] 不需要API密钥。使用公共OpenStreetMap图块。
\[!提示\] 与配对 开路mcp 根据自然语言提示生成路线坐标,然后将其传递给staticmap-mcp以渲染地图。
可用工具
| 工具 | 说明 |
|---|---|
render_route_map | 在OpenStreetMap互动程序地图上渲染路线并另存为PNG |
Full tool reference
render_route_map
在OpenStreetMap互动程序地图上渲染路线并另存为PNG。
coordinates(\[lon,lat\]列表,必填):路线为\[经度,纬度\]对列表,例如。[[-17.1, 28.1], [-17.2, 28.2]]output_path(字符串,必填):保存PNG图像的文件路径(自动创建的父目录)markers(对象列表):可选命名点,每个点都有lon,lat,以及label钥匙width(int):图像宽度(像素)(默认值:800)height(int):图像高度(像素)(默认值:600)line_color(string):路线颜色(默认值:“黑色”)line_width(int):布线线宽(像素)(默认值:3)basemap(字符串):贴图平铺样式--"osm"(默认),"topo"(地形/徒步旅行),"cycle"(自行车),"humanitarian"
发展
git clone https://github.com/cvsouth/staticmap-mcp.git
cd staticmap-mcp
uv sync --dev
pytest许可证
麻省理工学院
