Skip to main content

Model Context Protocol server for Mirror Earth weather data.

Project description

Mirror Earth MCP

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

使用要求

  • Python 3.9 或更高版本
  • uv
  • 使用需要认证的天气查询和批量导出工具时,需提供 Mirror Earth API Key

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

安装与启动

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

uvx --from mirror-earth-mcp mirror-earth-mcp

在 MCP 客户端的环境变量中设置 MIRROR_EARTH_API_KEY。服务使用 stdio 传输,只会向标准输出写入 JSON-RPC 响应。

MCP 配置

{
  "mcpServers": {
    "mirror-earth": {
      "command": "uvx",
      "args": ["--from", "mirror-earth-mcp", "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 --from mirror-earth-mcp 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.2.1.tar.gz (26.2 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.2.1-py3-none-any.whl (72.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirror_earth_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 26.2 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.2.1.tar.gz
Algorithm Hash digest
SHA256 7bbd373684bdbafb63115abf8e61ffa511dd7f09aa361da8b11b1ccbae725459
MD5 e7effab81f456f467d7750cd50704ff3
BLAKE2b-256 40802a1913317e261cf646044a2164e04efbadabe032469c3ac73199941444fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirror_earth_mcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 72.0 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d27fd070ab009b8b73524c9a3a659798fc9a40391c0c52620d92ece20a1594d
MD5 6afcea0345c06b781d3c62bff4773593
BLAKE2b-256 d7867f727f9dcab0d8f7c4143f13c38b19a776fa1e012d5e73ee61299cc14037

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