关于 HERE Maps MCP Server
HERE Maps MCP Server 通过 MCP 向 LLM 提供 HERE Maps 功能,涵盖地址查询、地点搜索、路线规划、交通事件和地图图像。
主要功能
- 01地址与坐标地理编码
- 02附近地点搜索
- 03多种交通方式的路线规划
- 04交通事件查询
- 05地图图像渲染
适用场景
- 01查询地址坐标或根据坐标识别地址
- 02搜索附近的兴趣点
- 03获取两地之间的路线
- 04查看周边交通事件或显示地图
MCP 相关
它将 HERE Maps Platform 的地理编码、地点搜索、路线规划、交通信息和地图渲染功能作为 MCP 工具提供给客户端。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
HERE Maps MCP 服务
本项目提供一个符合 Model Context Protocol(MCP)规范的服务,将 HERE Maps Platform API 的功能作为工具提供给语言模型使用。
目标
旨在通过标准化的 MCP 接口,让大模型能够与 HERE Maps 服务交互,例如地理编码、反向地理编码、地点搜索、路线规划、交通信息和地图渲染。
HERE Maps 工具
以下 HERE Maps 服务已实现为 MCP 工具:
-
地理编码:
- MCP 工具:
maps_geocode - 描述: 将地址转换为地理坐标
- HERE API: Geocoding & Search API v7 - Geocode
- 输入:
address(字符串) - 输出: JSON,包含
location(经纬度坐标)、address(格式化地址)和id
- MCP 工具:
-
反向地理编码:
- MCP 工具:
maps_reverse_geocode - 描述: 将坐标转换为地址
- HERE API: Geocoding & Search API v7 - Reverse Geocode
- 输入:
latitude(数字)、longitude(数字) - 输出: JSON,包含
address(格式化地址)、position(经纬度坐标)和id
- MCP 工具:
-
地点搜索(兴趣点):
- MCP 工具:
maps_search_places - 描述: 搜索特定位置附近的地点(例如餐厅、ATM)
- HERE API: Geocoding & Search API v7 - Discover
- 输入:
latitude(数字)、longitude(数字)、query(字符串,例如 "coffee"、"restaurant") - 输出: 地点列表,每个地点包含
name、address、position(经纬度坐标)和category
- MCP 工具:
-
路线规划(路线指引):
- MCP 工具:
maps_directions - 描述: 使用 HERE Maps Routing API 获取两点之间的路线指引
- HERE API: Routing API v8
- 输入:
origin(格式为 'latitude,longitude' 的字符串)destination(格式为 'latitude,longitude' 的字符串)transportMode(字符串:"car"、"pedestrian"、"bicycle"、"truck"、"scooter"、"bus"、"taxi")
- 输出: JSON,包含
summary(时长和距离)、polyline(路线坐标)和actions(导航指令)
- MCP 工具:
-
交通信息:
- MCP 工具:
maps_get_traffic_incidents - 描述: 获取圆形区域内的交通事件
- HERE API: Traffic API v7
- 输入:
center(格式为 'latitude,longitude' 的字符串)radius(以米为单位的数字)
- 输出: 事件列表,包含
description、startTime、endTime、type和criticality
- MCP 工具:
-
显示地图:
- MCP 工具:
maps_display - 描述: 显示给定坐标、缩放级别和样式的地图
- HERE API: Map Image API v3
- 输入:
center(格式为 'latitude,longitude' 的字符串)zoomLevel(数字,缩放级别范围为 0(全球级别)到 20(最放大级别),默认值为 14。)style(字符串:"explore.day"、"explore.night"、"explore.satellite.day"、"lite.day"、"lite.night"、"lite.satellite.day"、"logistics.day"、"logistics.night"、"logistics.satellite.day"、"satellite.day"、"topo.day"、"topo.night")
- 输出: 渲染后的地图图像
- MCP 工具:
开始使用
由于 npm 包尚未发布,目前只能克隆仓库并在本地运行 MCP 服务。
- 克隆仓库
git clone https://github.com/limingchina/here-maps-mcp-server.git
-
安装 Node.js 和 npm 按照 Node.js 网站上的说明安装最新版本的 Node.js 和 npm。
-
安装依赖项
cd here-maps-mcp-server/src/node
npm install
-
查看 身份验证指南(API Key),获取 HERE Maps API Key
-
运行 MCP 服务
HERE_MAPS_API_KEY=<YOUR_HERE_API_KEY> npx .
这会自动调用 "npm run build" 命令来构建 MCP 服务项目,然后启动服务。应显示以下消息:
HERE Maps MCP Server running on stdio
这表示 MCP 服务正在运行,并已准备好接收 MCP 请求。可以使用 "Ctrl-C" 停止服务。通常,我们会在客户端应用程序(例如 Claude)中配置 MCP 服务。完成正确配置后,客户端会自动启动服务。
MCP 配置
- 将 MCP 服务配置添加到 MCP 客户端,例如 Claude。
"Settings"->"Developer"->"Edit Config"
{ "mcpServers": { "here-maps": { "command": "npx", "args": [ "-y", "/<You local checkout directory of this project>/src/node" ], "env": { "HERE_MAPS_API_KEY": "<YOUR_HERE_API_KEY>" } } } } - Claude 等部分 MCP 客户端需要重启应用,才能使新设置生效。
使用示例:
- 找找柏林市中心的法式餐厅。
这会触发地理编码工具调用,以查找柏林市中心的地理坐标。随后会触发地点搜索工具调用。以下是示例输出。搜索结果输出已缩略。
I'd be happy to help you find some French restaurants in central Berlin. Let me search for places that should suit your needs. maps_geocode Request{ `address`: `Central Berlin, Germany` } Response{ "location": { "lat": 52.52427, "lng": 13.4026 }, "address": "Central, Rosenthaler Straße 39, 10178 Berlin, Deutschland", "id": "here:pds:place:276u33db-602fbe3989e243d38221c312af23a0e1" } Now I'll search for French restaurants in this area maps_search_places Request{ `query`: `French restaurant`, `latitude`: 52.52427, `longitude`: 13.4026 } Response[ { "name": "Oxymoron", "address": "Oxymoron, Rosenthaler Straße 40, 10178 Berlin, Deutschland", "position": { "lat": 52.52401, "lng": 13.40249 }, "category": "Restaurant" }, { "name": "Barist", "address": "Barist, Am Zwirngraben 13, 10178 Berlin, Deutschland", "position": { "lat": 52.5229, "lng": 13.4024 }, "category": "Bar oder Pub" } ......<Abbreviated> ] Here are some excellent French restaurants in central Berlin: L'Ami Fritz - Located on Max-Beer-Straße 29, this authentic French restaurant is right in the heart of central Berlin. Sucre Et Sel - Found on Torstraße 132, offering French cuisine with a name that means "Sugar and Salt" in French. Ratatouille Berlin - Located on Ackerstraße 2, named after the famous French dish and likely offering traditional French fare. Bandol sur Mer - A more upscale French restaurant on Torstraße 167, named after a coastal town in southern France known for its wines. Cafe Fleury - On Weinbergsweg 20, a French-style café that likely offers classic French breakfast and lunch options. Brasserie Torbar - Found on Torstraße 183, a brasserie-style restaurant offering French cuisine. Les Pâtisseries de Sébastien - While primarily a patisserie on Invalidenstraße 157, this is perfect if you're looking for authentic French pastries and desserts. All these establishments are located within central Berlin and are within relatively close proximity to one another. Would you like more specific information about any of these restaurants?RetryClaude can make mistakes. Please double-check responses.You are out of free messages until 2:00 AMUpgrade plan5 3.7 SonnetChat controls 3.7 SonnetOur most intelligent model yet Learn more - 可以帮我计算从 Reinickendorf 到 Mitte 的路线吗? 这会触发两次地理编码工具调用,以查找 Reinickendorf 和 Mitte(柏林的两个区)的地理坐标。随后会触发路线规划(导航)工具调用。你可以在 Claude 中查看输出。
- 巴黎市中心的交通状况如何? 这会触发两次地理编码工具调用,以查找巴黎市中心的地理坐标。随后会触发交通事故工具调用。你可以在 Claude 中查看输出。
- 可以显示巴黎市中心的地图吗?
这会触发地理编码工具调用,以查找巴黎市中心的地理坐标。随后会触发地图显示工具调用。
在 Claude 中,地图会作为工具调用结果中的图片显示在聊天窗口里。请注意,结果还会返回图片 URL。你可以复制 URL 并粘贴到浏览器中查看图片。URL 中包含 API key,因此不建议分享此类聊天记录。

开发
为了便于调试,建议使用 MCP 检查器工具。它会启动本地 Web 服务器。你可以轻松检查每次工具调用是否根据输入参数返回了预期结果。对于此项目,可以运行以下命令启动 MCP 检查器工具:
cd src/node
npm run build && npx @modelcontextprotocol/inspector -e HERE_MAPS_API_KEY=<YOU_HERE_API_KEY> node dist/index.js
其他地图服务 MCP 服务
贡献
欢迎随时 Fork 此仓库并根据你的需求进行调整。如果你希望改进工具定义或实现细节,也欢迎贡献。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。