Skip to main content

MCP server for Amap (高德地图) API integration

Project description

Amap API MCP Server

一个用于集成高德地图API的MCP(Model Context Protocol)服务器,提供天气查询等位置相关服务。

功能

  • 实时天气查询:根据城市名称查询当前天气情况
  • 基于高德地图API的地理位置服务

安装

使用uvx安装(推荐)

uvx --from amap-api-mcp-goki amap-api-mcp-goki

使用pip安装

pip install amap-api-mcp-goki

配置

  1. 获取高德地图API密钥:

  2. 配置环境变量:

    • 复制 .env.example 文件为 .env
    • .env 文件中设置你的API密钥:
cp .env.example .env
# 编辑 .env 文件,设置 AMAP_KEY=your_actual_api_key

使用方法

作为MCP服务器运行

amap-api-mcp-goki

在Claude Desktop中配置

在Claude Desktop的配置文件中添加以下内容:

{
  "mcpServers": {
    "amap-api": {
      "command": "uvx",
      "args": ["--from", "amap-api-mcp-goki", "amap-api-mcp-goki"],
      "env": {
        "AMAP_KEY": "your_amap_api_key_here"
      }
    }
  }
}

API工具

天气查询

  • 工具名称: 天气查询
  • 描述: 根据输入的地名使用高德API查询实时天气
  • 参数:
    • city (字符串): 输入具体的城市,最好带上"市"、"区"防止重名

开发

安装开发依赖

pip install -e ".[dev]"

运行测试

pytest

代码格式化

black src/
isort src/

许可证

MIT License

贡献

欢迎提交Issue和Pull Request!

相关链接

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amap_api_mcp_goki-0.1.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amap_api_mcp_goki-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file amap_api_mcp_goki-0.1.2.tar.gz.

File metadata

  • Download URL: amap_api_mcp_goki-0.1.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for amap_api_mcp_goki-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a517c36edaf2efb98811f24417b8b33f0124d3f7c77262b8867c1f0247076e13
MD5 2fbfa8c73d9fb9a424bff70ba4538e05
BLAKE2b-256 92bd104427c132afc56d13755842573870169ee9c635b1b2040fc531dd4c19e0

See more details on using hashes here.

File details

Details for the file amap_api_mcp_goki-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for amap_api_mcp_goki-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7da4414d6590fcca3caf1ff0b5716767b24dbaef10a90032a6f478e37aa17c9
MD5 218583dde88b87ba680e6eba128288df
BLAKE2b-256 d5856a7bbe569df4ca9978fffd427350ee01e8d838e1bc55bba4309eaf27a4f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page