amap-location-mcp
This server provides read-only access to Amap (Gaode) location services, enabling AI assistants to:
Resolve addresses/POIs to real GCJ-02 coordinates with city disambiguation and optional proximity sorting.
Reverse geocode coordinates (GCJ-02 or WGS84) into structured addresses and nearby POIs, explicitly labeling coordinate sources.
Search nearby POIs by radius, keywords, or Amap type codes, returning distances.
Plan and compare routes for walking, driving, and transit, returning distance, duration, steps, and a recommended mode.
Plan a single-mode route between two coordinates (walking, driving, or transit).
Convert coordinates from WGS84/GPS, Baidu, or Mapbar to GCJ-02.
Coarse-locate public IPv4 addresses to province/city level.
Build a combined location context for AI models by integrating address resolution, reverse geocoding, and nearby POI search.
Maintain trust boundaries: never fakes device GPS; always marks device location only when explicitly provided via
coordinate_source: device_gps.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@amap-location-mcphow to get from Beijing South Station to the Forbidden City?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
amap-location-mcp
一个基于高德开放平台 Web 服务 API 的只读 MCP Server。它的主要用途是让 AstrBot、RikkaHub 等 AI 客户端回答“从这里怎么回家”“从北京南站到故宫怎么走”这类问题:输入起点和终点,自动解析真实高德地点,同时比较步行、驾车和公交,给出距离、预计耗时、关键步骤和推荐交通方式。
它参考了 SHowGS/SillyTavern-RealMap 的“真实地点 + 周边环境 + 路线 + 位置来源”思路,但代码为独立实现,没有复制该项目源码。
优先考虑高德官方 MCP
高德开放平台现已提供官方 MCP Server。对 Cherry Studio、RikkaHub、Cursor、AstrBot 等支持 Streamable HTTP 的客户端,建议优先直连官方服务;官方当前提供 POI 搜索、地理编码、驾车/公交/步行/骑行、距离、天气、导航与打车链接等完整工具:
{
"mcpServers": {
"AmapOfficial": {
"url": "https://mcp.amap.com/mcp?key=你的高德Web服务Key"
}
}
}申请 Key 时仍需在高德开放平台控制台选择“Web 服务”。官方接入说明见快速接入高德地图 MCP Server。Key 位于 URL 查询参数中,请只保存到私有客户端配置,不要提交到 Git。
本仓库继续保留,适合需要以下能力的场景:只向模型暴露一个综合路线工具以减少上下文、在服务端统一 Bearer 鉴权、控制字段裁剪,或自行托管兼容入口。地点容易重名时,无论使用官方还是本项目,都建议给助手加入 navigation-guard-prompt.example.txt 中的约束。
Related MCP server: MCP Location Server
定位边界
可以把地址/POI 解析为高德真实 GCJ-02 坐标。
可以把调用方主动提供的 WGS84/GPS 坐标转换为 GCJ-02,再查询地址和周边 POI。
可以对明确传入的公网 IPv4 做省市级粗定位。
不能自行读取电脑、手机或浏览器的 GPS。要获得设备实况位置,需要前端在用户授权后把坐标传给 MCP,并设置
coordinate_source: "device_gps"。不会把 POI 推测、IP 出口或 MCP 服务器位置伪装成用户的设备定位。
每次成功结果都包含:
{
"source": "amap_reverse_geocode",
"coordinate_system": "GCJ-02",
"precision": "point_of_interest",
"confidence": 0.9,
"is_device_location": false,
"observed_at": "...",
"warnings": []
}工具
工具 | 用途 |
| 主要入口:输入起点、终点地址或地点,同时查询步行、驾车、公交并推荐交通方式 |
| 地点/地址解析、候选排序和城市消歧 |
| GCJ-02/WGS84 坐标转结构化地址和附近 POI |
| 按半径、关键词或 POI 类型搜索周边 |
| WGS84、百度、Mapbar 坐标转高德 GCJ-02 |
| 定位明确传入的 IPv4,结果仅为省市级粗定位 |
| 步行、驾车、公交路线规划 |
| 一次组合地点解析、地址和周边证据,供 AI 直接使用 |
面向 AstrBot/RikkaHub 的导航专用部署建议设置 MCP_TOOL_PROFILE=directions。该模式只向客户端暴露 amap_get_directions,其余能力仍由这个综合工具在服务端内部完成,避免 8 份工具定义长期占用模型上下文。
密钥要求
本项目不会提供或内置高德 Key。使用前必须访问高德地图开放平台,登录后进入控制台创建应用并申请 API Key:
服务平台:
Web服务
下面两种凭证不能用于本项目:
Web端(JS API)KeysecurityJsCode / 安全密钥
密钥只从环境变量 AMAP_WEB_SERVICE_KEY 读取,不写入源码或配置模板。JS API 凭证不应放入 .env。
最简单的调用方式
通常只需要让 AI 调用 amap_get_directions:
{
"origin": "北京南站",
"destination": "故宫博物院",
"origin_city": "北京",
"destination_city": "北京",
"modes": ["walking", "driving", "transit"]
}返回内容包括:
起点和终点实际匹配到的高德 POI、地址及 GCJ-02 坐标;
每种可用交通方式的总距离、预计耗时和关键步骤;
recommended_mode与中文推荐理由;某一种路线查询失败时,仍保留其他可用方案。
如果地点重名,传入 origin_city / destination_city 可以减少歧义。modes 可只保留需要比较的方式。
本地安装和 stdio 运行
要求 Node.js 22 或更高版本。
git clone https://github.com/188zjl/amap-location-mcp.git
cd amap-location-mcp
npm install
npm run build
$env:AMAP_WEB_SERVICE_KEY="你的 Web服务 Key"
npm start本地开发可复制 .env.example 为 .env,再运行 npm run dev。.env 已被 Git 忽略。
服务器 Streamable HTTP 模式
AstrBot 和 RikkaHub 可以共用部署在服务器上的兼容入口。服务本身默认只监听 127.0.0.1:3000,应由 Nginx、Nginx Proxy Manager 或 Caddy 提供 HTTPS:
export AMAP_WEB_SERVICE_KEY="你的 Web服务 Key"
export MCP_TRANSPORT="http"
export MCP_AUTH_TOKEN="至少16位的随机访问令牌"
export MCP_TOOL_PROFILE="directions"
export MCP_ALLOWED_HOSTS="map-mcp.example.com"
npm startMCP 地址为 http://127.0.0.1:3000/mcp,健康检查为 http://127.0.0.1:3000/health。反向代理时需要:
将公网
https://map-mcp.example.com/mcp转发到http://127.0.0.1:3000/mcp;保留
Authorization请求头;将真实公网域名写入
MCP_ALLOWED_HOSTS;不要直接把 Node 端口暴露到公网;
/health只说明 HTTP 服务存活,最终应以真实tools/list和amap_get_directions调用为准。
可选变量见 .env.example。HTTP 模式强制 Bearer Token,且令牌至少 16 个字符。
AstrBot 配置
在 AstrBot 面板的“扩展/工具 → MCP Servers → 添加服务器”中使用 Streamable HTTP,并填入:
{
"transport": "streamable_http",
"url": "https://map-mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer 你的访问令牌"
},
"timeout": 10,
"sse_read_timeout": 300
}RikkaHub 配置
复制仓库中的 rikkahub-amap-directions.example.json,替换域名和访问令牌后即可导入 RikkaHub:
{
"mcpServers": {
"AmapDirections": {
"type": "streamable_http",
"url": "https://map-mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer 你的访问令牌"
}
}
}
}注意:AstrBot 使用字段 transport,RikkaHub 使用字段 type。
其他本地 MCP 客户端配置
Codex 的 config.toml 示例:
[mcp_servers.amap-location]
command = "node"
args = ["C:\\path\\to\\amap-location-mcp\\dist\\index.js"]
env = { AMAP_WEB_SERVICE_KEY = "你的 Web服务 Key" }使用 JSON 配置的 MCP 客户端可写成:
{
"mcpServers": {
"amap-location": {
"command": "node",
"args": ["C:\\path\\to\\amap-location-mcp\\dist\\index.js"],
"env": {
"AMAP_WEB_SERVICE_KEY": "你的 Web服务 Key"
}
}
}
}其他调用示例
解析地点:
{
"query": "北京大学",
"city": "北京",
"current_location": {
"longitude": 116.31,
"latitude": 39.99
}
}设备授权后传入 WGS84 GPS 坐标:
{
"location": {
"longitude": 116.397,
"latitude": 39.908
},
"coordinate_system": "WGS84",
"coordinate_source": "device_gps",
"include_nearby_pois": true
}构建 AI 位置上下文:
{
"query": "北京大学",
"city": "北京",
"nearby_keywords": "咖啡",
"radius": 800,
"nearby_limit": 8
}验证
npm run check验证内容包括 TypeScript 构建、mock 高德响应、候选排序、WGS84 转换、逆地理编码、组合上下文、路线归一化,以及 MCP stdio 的旧版与 2026-07-28 协议握手、tools/list 和 tools/call。
高德官方文档
开源许可
本项目使用 MIT License 开源。
Available Tools
8 toolsamap_build_location_context构建 AI 位置上下文BRead-onlyIdempotent
组合地点解析、逆地理编码和周边 POI,为 AI 生成可追溯的位置事实;query 或 location 至少一个。
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | ||
| query | No | ||
| radius | No | ||
| location | No | ||
| nearby_limit | No | ||
| nearby_keywords | No | ||
| coordinate_source | No | 坐标来源;只有明确来自设备 GPS 时才选择 device_gps | unknown |
| coordinate_system | No | 输入坐标系。高德结果统一输出 GCJ-02 | GCJ-02 |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering safety and idempotency. The description adds that it combines multiple APIs (place parsing, reverse geocode, nearby POI) and outputs 'traceable location facts', but does not detail what that entails beyond the existing annotation profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with a semicolon, efficiently conveying purpose and a key constraint. It is front-loaded and avoids verbosity, though a slightly more structured presentation could enhance readability without adding length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (combining multiple operations with 8 parameters, low schema coverage, and requirement to integrate with sibling tools), the description is incomplete. It does not explain when each sub-operation activates (e.g., query triggers place parsing, location triggers reverse geocode), nor the role of other parameters. The presence of an output schema partially compensates, but the description lacks sufficient context for reliable agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25%, and the description only addresses the constraint that 'query or location at least one'. Other parameters like city, radius, nearby_limit, nearby_keywords, coordinate_source, and coordinate_system are left unexplained. The schema provides structure but the description adds little semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool combines place parsing, reverse geocoding, and nearby POI to generate traceable location facts for AI. It clearly distinguishes from sibling tools (e.g., amap_resolve_location, amap_reverse_geocode, amap_search_nearby) by being a composite function. The constraint 'query or location at least one' adds specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a key constraint (query or location required) but does not explicitly guide when to use this composite tool versus the individual sibling tools. No clear when-to-use or when-not-to-use guidance is given, only implicit differentiation through the tool's blended nature.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_convert_coordinates转换为高德坐标ARead-onlyIdempotent
把 WGS84/GPS、百度或 Mapbar 坐标转换为高德 GCJ-02;最多 40 个。
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | 原坐标系;WGS84 对应高德 API 的 gps | |
| locations | Yes | ||
| coordinate_source | No | 坐标来源;只有明确来自设备 GPS 时才选择 device_gps | unknown |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, which cover safety and idempotency. The description adds the 40-point batch limit and specifies the conversion output target (GCJ-02) and source-to-API mapping (e.g., WGS84->gps), providing useful behavioral context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, well-structured sentence that front-loads the core purpose and key constraint (limit of 40). Every word adds value; no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, the description, annotations, and output schema (present) together cover all necessary information: input types, conversion destination, limit, safety, and idempotency. No gaps for an agent to correctly invoke this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 67% (2 of 3 parameters described). The description adds meaning by stating the batch limit (matching maxItems) and clarifying the 'from' enum values (e.g., 'WGS84 对应高德 API 的 gps'), which goes beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts WGS84/GPS, Baidu, or Mapbar coordinates to Gaode's GCJ-02, with a limit of 40 points. It provides a specific verb and resource, distinguishing it from sibling tools that handle directions, geocoding, etc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use (coordinate conversion to GCJ-02) but does not provide explicit guidance on when not to use or mention alternatives. Since no sibling tool does conversion, the context is sufficient but lacks exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_get_directions查询起终点路线并推荐交通方式ARead-onlyIdempotent
主要入口:输入起点和终点地址/地点,一次解析真实坐标,比较步行、驾车和公交,返回距离、耗时、关键步骤及推荐交通方式。单个方式失败时仍返回其他可用方案。
| Name | Required | Description | Default |
|---|---|---|---|
| modes | No | 需要比较的交通方式,默认同时查询步行、驾车和公交 | |
| origin | Yes | 起点的地点名、POI 或完整地址 | |
| destination | Yes | 终点的地点名、POI 或完整地址 | |
| origin_city | No | 可选的起点城市名或 adcode,用于地点消歧和公交规划 | |
| destination_city | No | 可选的终点城市名或 adcode,用于地点消歧和跨城公交 | |
| driving_strategy | No | 可选的高德驾车 strategy |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds behavioral context: it parses real coordinates, compares multiple modes, and returns fallback results when a mode fails. This surpasses annotation-only insight, though it does not detail rate limits or cost implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the tool's primary role ('主要入口') and efficiently covers input, process, output, and error handling. No extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, 2 required), comprehensive schema descriptions, and existence of an output schema, the description adequately covers input, processing steps, and output (distance, time, steps, recommendation). It also addresses error resilience. No significant gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing good per-parameter documentation. The description adds high-level context (e.g., parsing coordinates, mode comparison) but does not significantly enhance individual parameter semantics beyond what the schema already supplies. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it is the main entry for querying directions between an origin and destination, comparing walking, driving, and transit, and returning distance, time, key steps, and a recommendation. This distinguishes it from siblings like amap_plan_route by emphasizing multi-mode comparison and recommendation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly positions this as the primary directions tool ('主要入口') but does not explicitly specify when to use this vs alternatives, nor does it provide exclusions or prerequisites. Usage guidance is implied but not formally stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_locate_ip显式 IP 粗定位ARead-onlyIdempotent
对明确传入的公网 IPv4 做省市级粗定位;绝不会省略 IP 后把 MCP 服务器出口冒充用户位置。
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | 要定位的明确 IPv4;不会自动使用 MCP 服务器出口 IP |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, indicating safe read-only behavior. The description adds useful context about coarse granularity and explicit non-substitution of IP, enhancing understanding beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff. The first sentence states the core function and precision level; the second sentence clarifies a key behavioral constraint. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one parameter) and has an output schema, so the description does not need to elaborate on return values. It fully covers the tool's behavior, constraints, and purpose, making it complete for its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the schema already documents the ip parameter. However, the description adds meaning by specifying '公网 IPv4' and the guarantee of not using server IP, thus providing semantic value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it performs coarse IP localization to province/city level for explicit public IPv4 addresses. It also distinguishes itself from siblings by noting it does not substitute the MCP server's IP, making its purpose unique among similar location tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells when to use (for explicit IPv4) and what it avoids (not using server IP). While it doesn't list alternative tools, the context of siblings and the clear constraints imply appropriate usage scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_plan_route规划真实路线ARead-onlyIdempotent
按真实起终点坐标规划高德步行、驾车或公交路线,返回距离、预计耗时和关键步骤。
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | 公交起点城市,transit 模式必填 | |
| mode | Yes | ||
| origin | Yes | ||
| strategy | No | 驾车策略,透传给高德 strategy | |
| destination | Yes | ||
| destination_city | No | 公交终点城市,跨城公交时填写 | |
| coordinate_system | No | 输入坐标系。高德结果统一输出 GCJ-02 | GCJ-02 |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows it's a safe, read-only operation. The description adds no additional behavioral traits beyond confirming it returns route details, which is expected.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with key actions and outputs. No filler or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having 7 parameters and nested objects, the description is minimal. It does not explain how to use optional parameters like 'strategy', 'coordinate_system', or 'city'. However, an output schema exists, so return structure is covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 57%, meaning some parameters have descriptions but others don't. The description does not add meaning beyond what the schema provides; it only generically mentions 'real coordinates'. It could compensate for the gap but does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it plans routes using real start/end coordinates for walking, driving, or transit, and returns distance, time, and steps. This is specific and actionable, though it does not explicitly differentiate from the sibling 'amap_get_directions'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies it is used for planning real routes with coordinates, but lacks explicit guidance on when to use it versus similar tools like 'amap_get_directions'. No when-not-to-use context is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_resolve_location解析真实地点ARead-onlyIdempotent
把地点名或地址解析为高德真实 POI/GCJ-02 坐标,结合城市和可选当前坐标排序候选;不冒充设备 GPS。
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | 城市名或 adcode,用于消歧 | |
| limit | No | ||
| query | Yes | 地点、POI 或完整地址 | |
| current_location | No | 可选的当前 GCJ-02 坐标,用于距离排序,不会被当作设备定位 |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds valuable behavioral context: it resolves to real POI/GCJ-02 coordinates, sorts candidates based on city and optional current location, and explicitly states it does not pretend to be device GPS. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, dense Chinese sentence that covers purpose, behavior, and a constraint without any wasted words. It is front-loaded with the core action and proceeds to additional details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema (not shown), the description need not explain return format. It covers purpose, sorting behavior, and the important constraint about not impersonating GPS. However, it does not explicitly mention that multiple candidates are returned or that the coordinates are GCJ-02, though these are implied. Overall, it is sufficiently complete for the complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 75%, so the schema already documents most parameters. The description adds significant context for the 'current_location' parameter (used for distance sorting, not as device location). It does not detail other parameters beyond what the schema provides, but the high coverage mitigates the need for more.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'resolve' and the resource 'location name/address to Amap real POI/GCJ-02 coordinates'. It also specifies key behaviors: combining city and optional current location for sorting, and explicitly says it does not impersonate device GPS. This distinguishes it from sibling tools like amap_reverse_geocode and amap_locate_ip.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context by mentioning city and optional current location for sorting, and includes a caveat that it does not impersonate device GPS. However, it does not explicitly contrast with sibling tools such as amap_search_nearby or amap_build_location_context to guide when to use them instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_reverse_geocode坐标逆地理编码ARead-onlyIdempotent
把 GCJ-02 或 WGS84 坐标转换为结构化地址及附近 POI。只有调用方明确声明 device_gps 时才标记为设备位置。
| Name | Required | Description | Default |
|---|---|---|---|
| radius | No | ||
| location | Yes | ||
| coordinate_source | No | 坐标来源;只有明确来自设备 GPS 时才选择 device_gps | unknown |
| coordinate_system | No | 输入坐标系。高德结果统一输出 GCJ-02 | GCJ-02 |
| include_nearby_pois | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate a safe, read-only, idempotent tool. The description adds crucial context about handling both GCJ-02 and WGS84 inputs, output always in GCJ-02, and a special condition for marking device location, which goes beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that conveys the core purpose and key behavioral notes without extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 params, nested objects) and the presence of an output schema, the description fully covers the core functionality, coordinate handling, and source marking, making it sufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With only 40% schema coverage, the description adds value by explaining the output coordinate system and the device_gps condition for coordinate_source, but does not cover radius, location, or include_nearby_pois meaning beyond schema defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (转换) and resource (坐标 to 结构化地址及附近 POI), and the mention of coordinate systems distinguishes it from sibling tools like amap_convert_coordinates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when coordinates need to be converted to address/POI, but does not explicitly state when to use this tool versus siblings, nor does it provide 'when not to use' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
amap_search_nearby搜索周边真实 POIARead-onlyIdempotent
按中心点、半径、关键词或高德类型码搜索周边真实 POI,并返回距离。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| types | No | 高德 POI 类型码,多个用 | 分隔 | |
| center | Yes | ||
| radius | No | ||
| keywords | No | ||
| coordinate_source | No | 坐标来源;只有明确来自设备 GPS 时才选择 device_gps | unknown |
| coordinate_system | No | 输入坐标系。高德结果统一输出 GCJ-02 | GCJ-02 |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| data | No | |
| tool | Yes | |
| error | No | |
| summary | Yes | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, so the description adds minimal behavioral context beyond noting 'real' POIs and distance return. It does not contradict annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single-sentence description is concise and front-loaded with the core purpose, but it could be slightly more descriptive without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 7 parameters including nested objects and an output schema, the description covers the main aspects but omits details like pagination (limit, radius constraints) and output structure, though the output schema partially compensates.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 43%, and the description only lists parameter names (center, radius, keywords, types) without adding usage details or constraints beyond what the schema already provides for coordinate_source and coordinate_system.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action (search), resource (real POIs), method (by center, radius, keywords, or type codes), and outcome (return distance), distinguishing it from sibling tools like reverse_geocode or get_directions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for nearby POI searches but lacks explicit guidance on when to choose this tool over alternatives (e.g., amap_resolve_location for exact addresses) or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
8 tool updates
v0.1.0- First observed
amap_build_location_context - First observed
amap_convert_coordinates - First observed
amap_get_directions - First observed
amap_locate_ip - First observed
amap_plan_route - First observed
amap_resolve_location - First observed
amap_reverse_geocode - First observed
amap_search_nearby
TDQS
Scored across 8 tools
Most tools are distinct, but 'amap_get_directions' and 'amap_plan_route' both plan routes with similar outputs, creating ambiguity. Additionally, 'amap_build_location_context' overlaps with multiple individual tools.
All tools follow a consistent 'amap_verb_noun' pattern with underscores, e.g., 'amap_search_nearby', 'amap_convert_coordinates'. No mixing of styles.
8 tools is well-scoped for a location service, covering essential functionalities without unnecessary redundancy.
Covers core features: geocoding, reverse geocoding, POI search, route planning, coordinate conversion, IP location. Minor gaps like missing batch operations, but overall sufficient for the domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The Google Maps MCP server is a fully-managed server provided by the Maps Grounding Lite API that connects AI applications to Google Maps Platform services. It provides three main tools for building LLM applications: searching for places, looking up weather information, and computing routes with details like distance and travel time. The server acts as a proxy that translates Google Maps data into a format that AI applications can understand, enabling agents to accurately answer real-world location and travel queries.
MCP server for Japan geodata: cadastral lot numbers (chiban) and reverse geocoding, for AI agents.
MCP server giving AI agents one-connection access to supply-chain & logistics data: AIS vessel track
Flight search MCP server providing search, pagination, and itinerary details for AI assistants.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP tool that integrates with Amap API services, allowing AI to access geographic information, weather data, and route planning.11-
- FlicenseNot gradedqualityDmaintenanceA MCP server that uses Amap API to provide location-based services, allowing users to get geographic information based on IP addresses and search for nearby points of interest.30-
- AlicenseAqualityDmaintenanceThe Stadia Maps MCP server provides AI assistants with access to Stadia Maps APIs for location services, geocoding, routing, and mapping capabilities.625TypeScriptBSD 3-Clause
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server that wraps the Amap (高德地图) Web Service APIs, giving AI assistants like Claude Code 9 map tools: geocoding, route planning (driving/transit/walking/cycling), POI search, nearby search, distance measurement, and IP location.1229MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/188zjl/amap-location-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server