关于 Planetary Computer
Planetary Computer 提供 Microsoft 开放卫星与环境数据集的目录查询,适合分析人员按区域和日期查找地球观测影像。它支持浏览数据集、检索场景并查看资产链接及覆盖信息。
主要功能
- 01按名称浏览数据集目录
- 02查看数据集范围与日期区间
- 03按区域和日期搜索影像
- 04返回足迹、云量及波段资产链接
适用场景
- 01查找特定区域和日期的卫星场景
- 02核对数据集的许可与覆盖范围
- 03获取影像波段资产链接
MCP 相关
作为 MCP 服务,它向客户端提供数据集列表、详情和 STAC 搜索工具。可通过 Pipeworx 网关连接,也可作为本地 stdio MCP 服务运行。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://gateway.pipeworx.io/planetary-computer/mcpclaude mcp add --transport http pipeworx-io-planetary-computer https://gateway.pipeworx.io/planetary-computer/mcp{"mcpServers":{"pipeworx-io-planetary-computer":{"type":"http","url":"https://gateway.pipeworx.io/planetary-computer/mcp"}}}在 Cursor 中打开{"servers":{"pipeworx-io-planetary-computer":{"type":"http","url":"https://gateway.pipeworx.io/planetary-computer/mcp"}}}在 VS Code 中打开{"mcpServers":{"pipeworx-io-planetary-computer":{"type":"http","url":"https://gateway.pipeworx.io/planetary-computer/mcp"}}}{"mcpServers":{"pipeworx-io-planetary-computer":{"serverUrl":"https://gateway.pipeworx.io/planetary-computer/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
@pipeworx/planetary-computer
Microsoft Planetary Computer 的地球观测影像目录——按区域和日期搜索其开放的卫星与环境数据集(Sentinel、Landsat、NAIP、Daymet、ERA5、生物多样性),并获取项目 ID、覆盖范围、日期和资产 URL。
属于 Pipeworx——一个将 AI Agent 连接到 1683+ 个实时数据源的 MCP 网关。
工具
planetary_computer_collections(contains?, prefix?, limit?)— 目录中的数据集及其许可证、覆盖范围和日期范围。请先调用此工具:如果查询未指定任何数据集,搜索将被拒绝。planetary_computer_collection(collection_id)— 单个数据集的完整信息,包括其项目包含的资产键(波段)。planetary_computer_search(collections, bbox?, datetime?, ids?, limit?, max_assets?)— 查询哪些场景覆盖指定区域和日期,并返回云量及各波段资产 URL。
身份验证
获取元数据无需密钥。资产字节内容需要另行处理:大多数数据集都需要从
https://planetarycomputer.microsoft.com/api/sas/v1/token/{collection} 获取一个短期读取令牌(获取令牌本身无需密钥,有效期约 1 小时),并将其附加到 href。单独的 href 并不是可用的下载链接;直接尝试访问时,它看起来就像一个失效链接。
数据源
- https://planetarycomputer.microsoft.com/api/stac/v1 — STAC API 1.0。
共享客户端:shared/src/stac.ts(stacCollections / stacCollection /
stacSearch),earth-search、copernicus-dataspace 和
meteoswiss 也使用该客户端。在那里修复分页或错误消息,四者都会受益。
注意事项
- 不带
collections的POST /search会返回 HTTP 422collection is required——仅提供一个未指定任何内容的字符串也无法解决问题。共享客户端会将其转换为一条指出planetary_computer_collections的消息。 - 数据集 ID 因目录而异。这里的
sentinel-2-l2a在 Earth Search 中是sentinel-2-c1-l2a。传入其他目录的同名数据集 ID 会返回空结果,而不是报错。 GET /collections会分页;共享客户端会跟进rel="next",并在停止时报告truncated。
快速开始
添加到你的 MCP 客户端(Claude Desktop、Cursor、Windsurf 等):
{
"mcpServers": {
"planetary-computer": {
"url": "https://gateway.pipeworx.io/planetary-computer/mcp"
}
}
}
此端点实际提供的内容
https://gateway.pipeworx.io/planetary-computer/mcp 上的 tools/list 会返回上表中的工具,以及 Pipeworx 共享元工具——ask_pipeworx、
discover_tools、search_within、remember/recall 和网关范围内的其他工具。因此,你看到的工具数量会多于此表所列:目前,单个工具包端点会在该工具包自有工具之外,列出约 30 个共享工具。连接的 initialize 响应会说明其确切范围,是当天情况的权威信息。
这是有意为之,并非意外复用。元工具让限定范围的连接也能回答此工具包未涵盖的问题——通过 ask_pipeworx 跨整个目录路由——而无需添加第二个 MCP 服务。目前无法挂载不包含这些元工具的工具包端点;如果额外的架构信息占用的上下文比路由功能带来的价值更多,建议连接一次完整网关,而不是连接多个工具包端点。
也可以连接完整的 Pipeworx 网关,直接列出每个工具包的所有工具,而不只是此工具包的工具:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}
两个 URL 都会连接到同一个网关和相同的 1683+ 个数据源。唯一的区别是直接列出哪个工具包的工具;从任一端点调用 ask_pipeworx 都可以访问所有工具。
没有 MCP 客户端?通过 HTTP 调用
curl -X POST https://gateway.pipeworx.io/v1/tools/planetary_computer_collections \
-H 'Content-Type: application/json' \
-d '{"contains":"sentinel","limit":5}'
首次调用无需账户。查看任意工具:GET https://gateway.pipeworx.io/v1/tools/planetary_computer_collections。查找工具:使用 {"query":"..."} 调用 POST https://gateway.pipeworx.io/v1/tools/search_packs。
独立运行(无需网关账户)
此软件包也可作为本地 stdio MCP 服务运行,无需 Pipeworx 账户,也无需经过网关往返:
{
"mcpServers": {
"planetary-computer": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-planetary-computer"]
}
}
}
也可以直接运行,确认它能正常启动:
npx -y @pipeworx/mcp-planetary-computer
它通过 stdin/stdout 使用 MCP 通信,并针对仅限此软件包的工具响应 initialize/tools/list/tools/call——不包含上方网关连接所添加的任何共享元工具。相同的源代码,相同的工具,无需 ask_pipeworx 路由。
使用 ask_pipeworx
你也可以用通俗的英语提问,而不是直接调用工具——这既适用于上方的软件包端点,也适用于完整网关:
ask_pipeworx({ question: "your question about Planetary Computer data" })
网关会选择合适的工具并自动填写参数。
更多信息
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。