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 参考资料和批量导出任务管理能力。

使用要求

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

安装与启动

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

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

在 MCP 客户端的环境变量中设置 MIRROR_EARTH_API_KEY。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.2.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.2-py3-none-any.whl (72.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirror_earth_mcp-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 27d3237ffb1a275f1a8cca6c671232b2495f6faa72835dfca22510ba6b0be4bb
MD5 fcb05c96d7c86b71d17c58e3b7be9645
BLAKE2b-256 1e928a106145baf912ecbebe576f1790f711926abd0296be301c5b61eda9cef9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirror_earth_mcp-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 72.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e842435db46566bcf11d150aac9ec6752bfe0d90ce0dfd88603440034e9f5dbd
MD5 77e81b52a8dde08113e896e3e410019c
BLAKE2b-256 00356087180a9434f78175f4a01adff8d96f12aeb15b9c3a6a80f77b28b254cb

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