Skip to main content

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!

相关链接

Metadata

Release files for amap-api-mcp-goki 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amap-api-mcp-goki 0.1.2
File Size Uploaded Provenance
amap_api_mcp_goki-0.1.2.tar.gz 5.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for amap-api-mcp-goki 0.1.2
File Interpreter ABI Platform
amap_api_mcp_goki-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / amap_api_mcp_goki-0.1.2.tar.gz

Download URL amap_api_mcp_goki-0.1.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a517c36edaf2efb98811f24417b8b33f0124d3f7c77262b8867c1f0247076e13
BLAKE2b-256 checksum
How to use checksums
92bd104427c132afc56d13755842573870169ee9c635b1b2040fc531dd4c19e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / amap_api_mcp_goki-0.1.2-py3-none-any.whl

Download URL amap_api_mcp_goki-0.1.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7da4414d6590fcca3caf1ff0b5716767b24dbaef10a90032a6f478e37aa17c9
BLAKE2b-256 checksum
How to use checksums
d5856a7bbe569df4ca9978fffd427350ee01e8d838e1bc55bba4309eaf27a4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for amap-api-mcp-goki 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page