Token导航 LogoToken导航TokenDH.com
Skyterra Tif MCP logo
设计创作stdio官方级别未说明来源级核验

Skyterra Tif MCP

MCP Server

SkyTerra TIF MCP Server是一个用于查询和分析作物分类TIF图像的模型上下文协议服务器,支持LLM代理读取和查询地理空间TIF文件,每个像素代表30m x 30m区域的作物类型。

工具数

6

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude设计Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

usaginoki

提供方

usaginoki

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run python main.py

详细介绍

SkyTerra TIF MCP 服务器

一个用于查询和分析作物分类TIF图像的MCP(模型上下文协议)服务器。该服务器使大型语言模型(LLM)代理能够读取和查询地理空间TIF文件,其中每个像素代表一个30米x30米区域内分类的作物类型。

概述

这个MCP服务器提供了工具,用于分析来自作物分类模型的TIF图像,其中:

  • 每个像素包含一个类别值(0-12),代表一种作物类型
  • 每个像素对应一个30米x30米的区域(900平方米)
  • 整幅图像代表的是被分类的农业用地

安装

# Clone the repository
cd skyterra-tif-mcp

# Install dependencies using uv
uv sync

运行服务器

# Using uv
uv run python main.py

# Or activate the virtual environment first
source .venv/bin/activate  # On Linux/Mac
python main.py

使用Claude Desktop进行配置

将此配置添加到您的Claude桌面配置文件中:

MacOS(苹果电脑操作系统)~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "skyterra-tif": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/skyterra-tif-mcp",
        "run",
        "python",
        "main.py"
      ]
    }
  }
}

替换 /path/to/skyterra-tif-mcp 加上此目录的实际路径。

可用工具

1. load_tif_image

加载一张作物分类TIF图像以进行分析。

参数:

  • file_path (字符串): TIF 文件的路径
  • image_id (字符串,可选):此图像的标识符(默认值:“default”)

示例:

Load the TIF image at /data/crops/field_2024.tif

2. query_area_class

查询图像中某个一般区域存在哪些作物类别。

参数:

  • area (str): 查询区域 - 可选之一:

- centertop-lefttop-rightbottom-leftbottom-right - top-edgebottom-edgeleft-edgeright-edgeentire

  • image_id (字符串,可选):图像标识符(默认:“default”)
  • sample_size (int, 可选): 要采样的像素数量(默认值:100)

示例:

What crop classes are in the center of the image?
What's growing in the bottom-right corner?

3. calculate_class_area

计算特定作物类别所覆盖的大致面积。

参数:

  • crop_class (int): 作物类别编号(0-12)
  • image_id (字符串,可选):图像标识符(默认:“default”)
  • unit (字符串,可选):测量单位 - square_metershectares,或 square_kilometers (默认:“公顷”)

示例:

What is the area of crop class 5?
How many hectares of class 8 are there?

4. get_image_info

获取已加载TIF图像的元数据和统计信息。

参数:

  • image_id (字符串,可选):图像标识符(默认:“default”)

示例:

Show me information about the loaded image
What are the dimensions of the image?

5. get_class_distribution

获取图像中所有作物类别的分布情况。

参数:

  • image_id (str, 可选): 图像标识符(默认: "default")

示例:

What's the distribution of all crop classes?
Show me a breakdown of crops in the image

6. list_loaded_images

列出当前加载的所有图像。

示例:

What images are currently loaded?

示例使用工作流程

User: Load the TIF file at /data/field_map.tif

Agent: [Calls load_tif_image with file_path="/data/field_map.tif"]
Response: Successfully loaded image 'default' from field_map.tif
Dimensions: 1000 x 800 pixels
Total area: ~72.00 km² (7200.00 hectares)
Classes found: [0, 1, 2, 5, 7, 8, 11]

User: What crop classes are in the center?

Agent: [Calls query_area_class with area="center"]
Response: Classes in center area (sampled 100 pixels):
  Class 5: 45 pixels (45.0%)
  Class 7: 32 pixels (32.0%)
  Class 2: 23 pixels (23.0%)

Dominant class: 5 (45.0%)

User: How many hectares of class 5 are there?

Agent: [Calls calculate_class_area with crop_class=5]
Response: Crop Class 5 Coverage:
  Pixels: 285,432 / 800,000 (35.68%)
  Area: 2,568.89 hectares

技术细节

图像处理

  • 用途 rasterio 用于读取地理空间TIF文件
  • 用途 numpy 为了高效地进行数组操作
  • 在内存中维护图像数据以实现快速查询
  • 支持同时加载多个具有不同ID的图像

面积计算

  • 每个像素=30米x30米=900平方米
  • 支持平方米、公顷和平方公里之间的转换
  • 像素数量精确;面积计算基于名义上的30米分辨率

坐标系

  • 保留TIF文件中的原始坐标参考系统(CRS)
  • 存储地理空间边界以供参考
  • 能够处理任何投影坐标系

依赖项

  • fastmcp (>=2.12.4): MCP服务器框架
  • rasterio (>=1.4.3): 地理空间栅格输入/输出
  • numpy数组操作
  • matplotlib (>=3.10.7):支持绘图功能
  • scipy (>=1.16.2): 科学计算

许可证

详见LICENSE文件。

目录标签

目录标签

PythonClaude设计地理空间分析本地部署作物分类TIF图像处理农业技术遥感数据处理

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP