Skip to main content

镜像地球气象数据的官方 MCP Python 服务。

Project description

Mirror Earth MCP

mirror-earth-mcp 是镜像地球气象数据的 Python Model Context Protocol(MCP)服务,基于官方 MCP SDK 实现,提供天气查询、模型与要素目录、地名解析、本地 Markdown 参考资料和批量导出任务管理能力。

使用要求

geocodereverse_geocode 使用公开地名服务,不需要 API Key。

安装与启动

通过 uvx 直接运行 PyPI 中发布的包:

uvx mirror-earth-mcp

在 MCP 客户端的环境变量中设置 MIRROR_EARTH_API_KEY。API Key 可在镜像地球开放平台个人中心获取。服务使用 stdio 传输,只会向标准输出写入 JSON-RPC 响应。

MCP 配置

{
  "mcpServers": {
    "mirror-earth": {
      "command": "uvx",
      "args": ["mirror-earth-mcp"],
      "env": {
        "MIRROR_EARTH_API_KEY": "YOUR_MIRROR_EARTH_API_KEY"
      }
    }
  }
}

在 Codex CLI 中添加服务:

codex mcp add mirror-earth --env MIRROR_EARTH_API_KEY=YOUR_MIRROR_EARTH_API_KEY -- uvx mirror-earth-mcp

MCP 工具

工具 用途
list_models 列出实时预报、历史再分析和历史预报模型。
get_model_details 查询模型元数据、支持的要素与等压面。
list_variables 列出逐小时、逐日或逐月要素。
get_forecast 按经纬度查询天气预报。
get_historical_weather 查询 ERA5 历史天气数据。
get_archive_forecast 查询历史模型起报的预报数据。
get_seamless_weather 查询连续的 ERA5 与 ECMWF 天气数据。
geocode / reverse_geocode 解析地名与经纬度。
get_batch_usage 查询批量导出配额和使用情况。
estimate_batch_export / create_batch_export 预估并创建批量导出任务。
get_batch_task / list_batch_tasks / cancel_batch_task 管理批量导出任务。

服务还通过 mirror-earth://references/... MCP 资源公开内置的 API 和模型说明文档。

本地开发

uv sync
uv run pytest
uv build

构建产物输出到 dist/。发布新版本时,将 PyPI token 配置到 UV_PUBLISH_TOKEN 环境变量后执行:

uv publish

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

mirror_earth_mcp-0.3.2.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

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

mirror_earth_mcp-0.3.2-py3-none-any.whl (71.8 kB view details)

Uploaded Python 3

File details

Details for the file mirror_earth_mcp-0.3.2.tar.gz.

File metadata

  • Download URL: mirror_earth_mcp-0.3.2.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mirror_earth_mcp-0.3.2.tar.gz
Algorithm Hash digest
SHA256 26e10bd7fae8b604f6a316baee1616ec63ec1a4ca7b8dd868a656c00218443ac
MD5 cf54d9d60f6f7d7ad49219354b195dc1
BLAKE2b-256 ee7293749615fc494648e71ad9d6ea22f13fb71fb09b78a0a74d67b645ea75db

See more details on using hashes here.

File details

Details for the file mirror_earth_mcp-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: mirror_earth_mcp-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 71.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mirror_earth_mcp-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8fbe4c922a6849a36cb6638d30dd4719fe5b26b1744f65aa5b018cdc912ae276
MD5 dcb902e38fea0dc7d939ed8c386c155f
BLAKE2b-256 e890022ddc6de26034c5c92c37a1e793bcdc67f1a59fbc8cec43a53665a6030e

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