使用MCP服务在Cursor中集成高德地图API教程

使用MCP服务在Cursor中集成高德地图API教程

MCP(Multi-Cloud Platform)是Cursor内置的多云服务接口,支持调用地图、数据库、文件系统等多种API。通过MCP,开发者无需手动写HTTP请求或繁琐配置,只需在对话中描述需求,AI助手即可自动调用相关服务,极大提升开发效率。

使用MCP服务在Cursor中集成高德地图API教程 若已经配置Python环境,可使用以下命令安装:

若已经配置Python环境,可使用以下命令安装:



使用 和 检查是否安装成功,若和下图一样代表安装成功

使用MCP服务在Cursor中集成高德地图API教程

在官网下载node.js,并配置环境变量,如下图:

使用MCP服务在Cursor中集成高德地图API教程

在 Cursor 中添加 MCP Server 有两种配置方式

通过 Cursor Settings MCP Add new global MCP server 添加全局可用的 MCP 服务

使用MCP服务在Cursor中集成高德地图API教程

在项目目录的 目录中新建 文件进行配置,仅对特定项目生效

使用MCP服务在Cursor中集成高德地图API教程

使用MCP服务在Cursor中集成高德地图API教程 使用MCP服务在Cursor中集成高德地图API教程 使用MCP服务在Cursor中集成高德地图API教程 可能粘过来,不好使,需要找到github链接,从github上粘贴:

MCP服务,需要提前建好数据库,否则无法成功

注意:验证是否生效
将MCP服务信息填在 文件中后,需要打开 Settings MCP 检查你配置的 MCP Server 是否在列表中显示,并确认
绿点 且状态为 Enabled

使用MCP服务在Cursor中集成高德地图API教程

高德地图的MCP Server需要从 MCP.so 平台获取。

使用MCP服务在Cursor中集成高德地图API教程 使用MCP服务在Cursor中集成高德地图API教程 申请高德地图的API:https://console.amap.com/

使用MCP服务在Cursor中集成高德地图API教程 使用MCP服务在Cursor中集成高德地图API教程

使用MCP服务在Cursor中集成高德地图API教程



  1. 输入自然语言后,cursor会自动调用MCP服务,连接数据库并执行建表SQL,无需手动写代码;
  2. 自动调用MCP的高德API接口,获取经纬度、地铁换乘方案等数据,将获取到的数据插入到指定表中,无需手动写INSERT语句;
  3. 最后自动操作文件系统,将数据库内容导出为txt和html文件,存放到指定目录

使用MCP服务在Cursor中集成高德地图API教程 自己创建的数据表和插入的数据

使用MCP服务在Cursor中集成高德地图API教程 “`
— auto-generated definition
create table location_foods
(
id int auto_increment
primary key,
location varchar(64) not null,
name varchar(128) not null,cursor 教程
address varchar(256) null,
tel varchar(64) null,
type varchar(64) null,
distance varchar(32) null
);
— auto-generated definition
create table subway_trips
(
id int auto_increment
primary key,
start_location varchar(64) not null,
end_location varchar(64) not null,
subway_lines text not null,
duration varchar(32) null,
distance varchar(32) null
);























版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:Ai探索者,转载请注明出处:https://javaforall.net/241448.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月16日 上午7:19
下一篇 2026年3月16日 上午7:20


相关推荐

关注全栈程序员社区公众号