Amap MCP Server

Amap MCP Server

A 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.

Category
访问服务器

README

高德地图 MCP Server · Amap MCP Server

English | 中文


<a name="english"></a>

🇬🇧 English

A 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.

Why this exists: There was no publicly available Amap/Baidu Maps MCP Server on Smithery or anywhere else (as of 2026-06). Google Maps MCP exists but its China coverage is poor. This fills that gap.

Features

Tool Description
amap_geocode Address ↔ Coordinates (forward & reverse)
amap_direction_driving 🚗 Driving directions with multi-strategy (fastest/cheapest/shortest/avoid-congestion)
amap_direction_transit 🚌 Public transit directions (bus + subway) with cost & transfer info
amap_direction_walking 🚶 Walking directions
amap_direction_bicycling 🚲 Cycling directions
amap_poi_search 🔍 POI search by keyword (restaurants, hotels, gas stations, etc.)
amap_poi_around 📍 Nearby search within a radius
amap_distance 📏 Batch distance/time measurement (up to 10 origins)
amap_ip_location 🏠 IP-based coarse location (city level)

Prerequisites

  • Node.js ≥ 18
  • Amap API Key (Web Service type, NOT Web JS API)
    • Free tier: 5,000 calls/day per endpoint

Installation

git clone https://github.com/zengzeruidd-a11y/amap-mcp-server.git
cd amap-mcp-server
npm install

Configuration

Add to your Claude Code .mcp.json (global: ~/.claude/.mcp.json or project: .mcp.json):

{
  "amap": {
    "command": "node",
    "args": ["/path/to/amap-mcp-server/server.js"],
    "env": {
      "AMAP_KEY": "your-amap-api-key-here"
    }
  }
}

Restart Claude Code. The 9 tools will appear automatically.

For other MCP-compatible clients (Cursor, Windsurf, etc.), configure via their respective MCP settings.

Usage Examples

Once configured, ask Claude:

"What's the fastest driving route from 武汉天地 to 天河机场 on Saturday morning?"

"Find hotpot restaurants within 2km of 光谷广场, sorted by rating"

"How do I get from 汉口站 to 武昌站 by subway?"

"Compare distances from my home, office, and the train station to 天河机场"

API Reference

All tools use the Amap Web Service API v3/v4. See Amap API Docs for details.

Strategy Driving Transit
0 Speed first Fastest
1 Cost first Cheapest
2 Distance first Fewest transfers
3 Avoid congestion Least walking
4 Avoid congestion + Speed first
5 Multi-strategy compare No subway

License

MIT © 2026 曾泽瑞 (Zeng Zerui)


<a name="chinese"></a>

🇨🇳 中文

一个 MCP (Model Context Protocol) 服务器,封装了高德地图 Web 服务 API,为 Claude Code 等 AI 助手提供 9 个地图工具:地理编码、四种路径规划(驾车/公交/步行/骑行)、POI 搜索、周边搜索、距离测量、IP 定位。

为什么做这个: 截至 2026 年 6 月,Smithery 等 MCP 市场上没有任何高德/百度地图的 MCP Server。Google Maps MCP 有,但国内路线覆盖差。这个项目填补了空白。

功能

工具 说明
amap_geocode 地址 ↔ 经纬度互转(正向 + 逆地理编码)
amap_direction_driving 🚗 驾车路径规划,支持多策略(最快/最省钱/最短/躲避拥堵)
amap_direction_transit 🚌 公交地铁规划,含票价、换乘次数、步行段
amap_direction_walking 🚶 步行导航
amap_direction_bicycling 🚲 骑行导航
amap_poi_search 🔍 关键词搜索地点(餐厅、酒店、加油站等)
amap_poi_around 📍 周边搜索(指定半径)
amap_distance 📏 批量测距(最多 10 个起点同时比较)
amap_ip_location 🏠 IP 粗略定位(城市级)

前置条件

安装

git clone https://github.com/zengzeruidd-a11y/amap-mcp-server.git
cd amap-mcp-server
npm install

配置

在 Claude Code 的 .mcp.json 中添加(全局:~/.claude/.mcp.json 或项目级:.mcp.json):

{
  "amap": {
    "command": "node",
    "args": ["/path/to/amap-mcp-server/server.js"],
    "env": {
      "AMAP_KEY": "你的高德API密钥"
    }
  }
}

重启 Claude Code,9 个工具自动加载。

其他 MCP 兼容客户端(Cursor、Windsurf 等)请参考各自的 MCP 配置方式。

使用示例

配置好后,直接问 Claude:

"从武汉天地开车到天河机场,周六上午出发,哪条路线最快?"

"光谷广场周边 2 公里内有没有评分高的火锅店?"

"从汉口站到武昌站怎么坐地铁最快?"

"帮我算一下从家、公司和火车站分别到天河机场的距离和时间"

驾车策略

策略 含义
0 速度优先(最快)
1 费用优先(不走高速)
2 距离优先
3 躲避拥堵(不走快速路)
4 躲避拥堵 + 速度优先
5 多策略对比

公交策略

策略 含义
0 最快捷
1 最经济
2 最少换乘
3 最少步行
5 不乘地铁

已知限制

  • 坐标格式:lng,lat(经度在前)—— 高德特有,非国际惯例
  • 实时路况需要企业版权限,当前使用静态时间估算
  • 公交跨城规划有限支持
  • 海外地址覆盖有限,主要覆盖中国大陆

License

MIT © 2026 曾泽瑞 (Zeng Zerui)

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选