Mirror Earth MCP
mirror-earth-mcp 是镜像地球气象数据的 Model Context Protocol(MCP)服务,提供天气查询、模型与要素目录、地名解析、批量导出任务管理及开发者版试用会员领取能力。
快速选择
| 模式 | 推荐场景 | 用户需要安装 | 更新方式 |
|---|---|---|---|
| 在线 MCP(推荐) | 日常使用、团队接入、希望始终使用最新版 | 不需要 | 平台统一更新,无需用户操作 |
| 本地 MCP | 离线网络环境、二次开发、需要自托管或调试 | Python 和 uv | 用户自行更新包与配置 |
无论使用哪种模式,都需要自己的镜像地球 API Key。可在镜像地球开放平台个人中心获取。
geocode 和 reverse_geocode 使用公开地名服务,不需要 API Key。
模式一:在线 MCP(推荐)
在线 MCP 使用正式服务地址 https://api.mirror-earth.com/mcp。无需安装 Python、uv 或 MCP 包;服务会持续更新,用户无需手动升级。
在支持远程 HTTP MCP 的客户端中新增以下配置:
{
"mcpServers": {
"mirror-earth": {
"type": "http",
"url": "https://api.mirror-earth.com/mcp",
"headers": {
"X-API-Key": "YOUR_MIRROR_EARTH_API_KEY"
}
}
}
}
将 YOUR_MIRROR_EARTH_API_KEY 替换为自己的 Key。服务端会透传请求头中的 Key,因此每位用户的配额、会员等级和试用领取状态独立。
配置文件模板见 mcp-config.remote.example.json。
模式二:本地 MCP
本地模式使用 stdio 协议,适用于需要本地调试、自行托管或希望控制运行版本的使用者。
前置条件
- Python 3.10 或更高版本
- uv
通用配置
推荐通过 uvx 直接运行已发布的包:
{
"mcpServers": {
"mirror-earth": {
"command": "uvx",
"args": ["mirror-earth-mcp"],
"env": {
"MIRROR_EARTH_API_KEY": "YOUR_MIRROR_EARTH_API_KEY"
}
}
}
}
如果不使用 uvx,先安装包后改用 Python 启动:
python -m pip install mirror-earth-mcp
python -m mirror_earth_mcp.server
对应的 MCP 配置:
{
"mcpServers": {
"mirror-earth": {
"command": "python",
"args": ["-m", "mirror_earth_mcp.server"],
"env": {
"MIRROR_EARTH_API_KEY": "YOUR_MIRROR_EARTH_API_KEY"
}
}
}
}
本地模式发布新版本后,需要自行升级或重启运行环境;希望免安装、免维护时,请使用在线 MCP。
客户端配置提示
在线 MCP: 在客户端的远程 HTTP MCP 设置中填写地址 https://api.mirror-earth.com/mcp,并添加 X-API-Key 请求头。
本地 MCP: 在客户端的本地 stdio MCP 设置中填写 uvx mirror-earth-mcp,并设置 MIRROR_EARTH_API_KEY 环境变量。
常见位置:
- Claude Desktop:
claude_desktop_config.json顶层的mcpServers - Cursor:项目
.cursor/mcp.json或 MCP 设置 - Windsurf:
~/.codeium/windsurf/mcp_config.json或 MCP 设置 - Cline、Roo Code 等:MCP Servers 设置
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 |
管理批量导出任务。 |
claim_trial_membership |
领取 3 天开发者版会员体验(每用户仅一次)。 |
get_trial_status |
查询是否已领取过开发者版会员体验。 |
服务还通过 mirror-earth://references/... MCP 资源公开内置的 API 和模型说明文档。
部署与开发
- 服务端 Docker 部署、HTTPS、反向代理及运维说明见 部署指南。
- 本地开发:
uv sync
uv run pytest
uv build
构建产物输出到 dist/。发布新版本时,将 PyPI token 配置到 UV_PUBLISH_TOKEN 环境变量后执行:
uv publish
Release files for mirror-earth-mcp 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mirror_earth_mcp-0.5.0.tar.gz | 36.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mirror_earth_mcp-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 117.8 kB
Release files / mirror_earth_mcp-0.5.0.tar.gz
| Download URL | mirror_earth_mcp-0.5.0.tar.gz |
|---|---|
| Size | 36.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd7ea6a6884f7e52bd4db0a59ca63d6be5b3046f0d1538338d36a5b1cd5ad7da
|
|
BLAKE2b-256 checksum How to use checksums |
38548c5f3830dbd72c81de0c56b0f3b39994dd3e5ea6ac310f2849be16b2e718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / mirror_earth_mcp-0.5.0-py3-none-any.whl
| Download URL | mirror_earth_mcp-0.5.0-py3-none-any.whl |
|---|---|
| Size | 81.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02f0593dd1f26de40ae84829eb38109f74c1942dbd938c3947a488132478654b
|
|
BLAKE2b-256 checksum How to use checksums |
50fea1bd4f814e54b5ad033f40b44998a180548045ec755a939a9fe085210f92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|