mcpField
G
gaode

gaode

Local
github.com/perMAINMaps & Travel13Updated 83w ago

About gaode

gaode is an MCP server built around Amap services, enabling AI models to query places, weather, and routes. It can also plan multi-day trips from a set of places and return an HTML page.

Key features

  1. 01Search places and POIs by keyword
  2. 02Convert addresses and coordinates
  3. 03Plan driving, walking, and transit routes
  4. 04Query city weather
  5. 05Plan multi-day tours and return HTML

Use cases

  1. 01Find places and nearby POIs in a city
  2. 02Convert an address to coordinates or look up an address from coordinates
  3. 03Check weather and plan a route
  4. 04Arrange tour stops by day and generate a page

MCP support

MCP clients can use tools for place search, geocoding, route planning, weather lookup, and tour planning.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"gaode": {
"command": "npx",
"args": [
"-y",
"@amap/amap-maps-mcp-server"
],
"env": {
"AMAP_MAPS_API_KEY": "<AMAP_MAPS_API_KEY>"
}
}
}
}
Run commandnpx -y @amap/amap-maps-mcp-server
Environment variables to set
AMAP_MAPS_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@amap/amap-maps-mcp-server

Tools

12

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
locationstringYesLongitude and latitude

Details

From the project README

高德地图 MCP 服务

这是一个基于 Model Context Protocol (MCP) 的高德地图服务集成项目,允许 AI 模型(如 Claude、GPT等)直接调用高德地图的各种功能,包括地点搜索、路线规划、地理编码等。

功能特点

  • 地点搜索 - 根据关键词查找地点,支持城市范围限制
  • 地理编码/逆地理编码 - 地址与坐标互相转换
  • 路线规划 - 支持驾车、步行、公交等多种出行方式
  • 周边搜索 - 查找指定坐标附近的POI
  • 天气查询 - 获取城市天气信息
  • 智能旅游规划 - 自动生成最优旅游路线并提供详细HTML页面

安装与配置

前提条件
  • Node.js 16.x 或更高版本
  • 高德地图开发者API密钥(可在高德开放平台申请)
安装步骤
  1. 克隆项目代码

    git clone https://github.com/yourusername/gaode-mcp.git
    cd gaode-mcp
    
  2. 安装依赖

    npm install
    
  3. 配置API密钥

    • 创建一个.env文件在项目根目录
    • 添加以下内容:
      GAODE_API_KEY=你的高德地图API密钥
      

使用方法

启动服务
npm start

启动后,服务将通过标准输入/输出与MCP客户端通信。

MCP工具说明

本服务提供以下MCP工具供AI模型调用:

1. searchPOI - 地点搜索
{
  "name": "searchPOI",
  "arguments": {
    "keywords": "故宫",
    "city": "北京",
    "types": "旅游景点",
    "page": 1,
    "offset": 20
  }
}
2. geocode - 地理编码
{
  "name": "geocode",
  "arguments": {
    "address": "北京市朝阳区阜通东大街6号",
    "city": "北京"
  }
}
3. regeocode - 逆地理编码
{
  "name": "regeocode",
  "arguments": {
    "location": "116.481499,39.990475",
    "extensions": "all"
  }
}
4. getRoute - 路线规划
{
  "name": "getRoute",
  "arguments": {
    "origin": "116.481499,39.990475",
    "destination": "116.465063,39.999538",
    "type": "driving",
    "strategy": 0
  }
}
5. getWeather - 天气查询
{
  "name": "getWeather",
  "arguments": {
    "city": "110000",
    "extensions": "all"
  }
}
6. getPOIDetail - 地点详情
{
  "name": "getPOIDetail",
  "arguments": {
    "id": "B000A8UIN8"
  }
}
7. searchAround - 周边搜索
{
  "name": "searchAround",
  "arguments": {
    "location": "116.481499,39.990475",
    "keywords": "餐厅",
    "types": "餐饮",
    "radius": 1000,
    "offset": 20
  }
}
8. planTourRoute - 智能旅游路线规划
{
  "name": "planTourRoute",
  "arguments": {
    "city": "北京",
    "pois": ["故宫", "长城", "颐和园", "天坛", "鸟巢"],
    "days": 3,
    "transportation": "driving",
    "returnHtml": true
  }
}
样例页面

项目包含一个示例页面 beijing_tour.html,展示了基于高德地图服务生成的北京三日游路线规划。可以通过浏览器直接打开此文件查看效果。

与AI助手集成

可以将此服务配置为AI助手(如Claude、GPT等)的Tool或Plugin,使其能够直接调用高德地图服务。

配置为Claude MCP Tool
  1. 在Claude MCP控制台中创建新的Tool
  2. 配置启动命令:npm start
  3. 保存并获取MCP配置链接
  4. 与Claude聊天时,使用MCP配置链接启用高德地图工具

扩展开发

添加新功能
  1. 在src/index.ts中添加新的工具定义:
server.tool("yourNewTool",
  {
    param1: z.string().describe("参数1说明"),
    param2: z.number().describe("参数2说明")
  },
  async (params) => {
    // 实现你的功能...
    return {
      content: [{ type: "text", text: JSON.stringify(result) }]
    };
  }
);
  1. 重新启动服务即可使用新工具

许可证

MIT License

联系方式

如有问题或建议,请提交Issue或Pull Request。


注意:请勿在公开环境中暴露你的API密钥。

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.