Skip to main content
Glama
HarshShinde0

GeoCroissant MCP Server

by HarshShinde0

GeoCroissant MCP Server

GeoCroissant 及其地理空间扩展提供的 Model Context Protocol (MCP) 服务器。

功能

  • EO 数据集发现 - 对 STAC 集合进行关键字/主题搜索,并针对实时 Element84 Earth Search APIhttps://earth-search.aws.element84.com/v1,AWS Open Data)执行空间场景搜索(bbox + datetime + 云量),支持传感器模态分类(光学 / 雷达 / 高程)和主题快捷方式(floodwildfirendvidem 等)。

  • STAC -> GeoCroissant 生成 - 将实时搜索结果转换为经过验证的 GeoCroissant 文档:包含 schema.org coverage、CRS、波段配置及由 eo:bands 推导出的光谱元数据(从微米转换为纳米)、直接资源 URL 的 distribution FileObjects,以及每个场景一行的 RecordSet。

  • 官方验证器作为工具 - 使用 mlcroissant(与 mlcroissant validate 相同的引擎)生成结构化的通过/失败报告,包含错误和警告。

  • 深度检查 - 核心元数据以及每个 GeoCroissant 属性:CRS、空间/时间分辨率、波段配置、光谱波段元数据、记录端点、空间索引/偏置/采样策略。

  • 结构图提取 - 暴露库内部构建的有向多重图(Metadata / FileObject / FileSet / RecordSet / Field 节点;source、join 和 containment 边)。

  • 记录物化 - 执行真实操作图(下载、提取、转换)以预览实际记录,与 Python 中的 Dataset.records(...) 完全一致。

  • 经验证的骨架生成 - 从结构化参数生成符合规范的 GeoCroissant JSON-LD,并通过真实验证器进行验证。

  • 内置规范参考 - 命名空间、所有 geocr: 属性及其域/基数、规范 @context、示例文档和 Python API。

Related MCP server: Copernicus Earth Observation MCP Server

工具

工具

描述

list_eo_catalogs

已注册的 EO STAC 目录(Earth Search),包含模态、精选集合和主题关键字。

search_eo_datasets

对 Earth Search 集合进行主题/关键字搜索 - 'flood' -> Sentinel-1 + Sentinel-2,'dem' -> Copernicus DEM 等。

search_eo_scenes

在 bbox 内进行空间/时间/云端场景搜索;返回每个场景的 id、日期、云计算、 原生 EPSG 和 asset key。

create_geocroissant_from_stac

端到端流水线:实时 STAC 搜索 -> 经验证的 GeoGrid JSON-LD(coverage、CRS、bands 及光谱元数据、distribution URL、内嵌场景记录)。可选择写入磁盘。

validate_croissant

验证 Croissant/GeoCroissant 文档(文件路径、URL 或内嵌 JSON)。返回 validerrorswarnings、conformance targets。

inspect_geocroissant

文档的结构化摘要:元数据、geocr: 属性、distribution 条目及每个 RecordSet/Field 的类型、形状和来源链。

get_structure_graph

库内部结构图的节点和有向边 - 用于血统和依赖分析。

list_record_sets

列出 RecordSet,包含 @id、键、内嵌记录/示例数量和嵌套字段摘要。

get_records_preview

物化一个 RecordSet 的前 N 条记录,可选过滤。执行与 Python API 相同的下载/转换。

extract_distribution_urls

从 distribution 中提取可下载 URL:contentUrl、文件格式、md5/sha256、FileSet 包含内容。

create_geocroissant_scaffold

根据参数生成经过验证的 GeoCroissant 文档(无需网络)。可选择写入磁盘。

get_geocroissant_spec_reference

规范参考:overviewcontextpropertiesexamplepython-apiall

添加目录

注册表是数据驱动的实现 (src/geocr_mcp_server/config/catalogs.yaml):每个目录是一个条目,包含其 STAC URL、按模态组织的精选集合以及共享的 topics 和模态关键字提示。要注册另一个目录而无需修改代码:

  1. 复制 YAML 到某处,并在 catalogs 下追加您的目录(同时将主题映射添加到 topics 下)。

  2. 将环境变量指向该文件:

"env": { "GEOCR_CATALOGS_CONFIG": "/path/to/catalogs.yaml" }

加载器会验证引用的主题是否存在于某个目录的集合列表中,因此在启动时就能快速包含偏离错误。

推荐的 agent 工作流

discovery:  list_eo_catalogs -> search_eo_datasets("burn scar", modality=optical)
            -> search_eo_scenes(bbox=[...], datetime_range=...)
metadata:   create_geocroissant_from_stac(...)  # validated output + optional file
consuming:  inspect_geocroissant -> get_records_preview -> extract_distribution_urls
authoring:  create_geocroissant_scaffold -> edit -> validate_croissant

安装

不需要克隆 - pip/uvx 直接从 GitHub 获取 geocr-mcp 及其依赖 mlcroissant。克隆仅用于开发。

pip

pip install git+https://github.com/HarshShinde0/geocr_mcp.git@main

唯一的依赖 mlcroissant 会从 GeoCroiss 分支自动拉取:

pip install git+https://github.com/HarshShinde0/croissant.git@main#subdirectory=python/mlcroissant

uv / uvx (推荐客户端)

uvx --from "geocr-mcp @ git+https://github.com/HarshShinde0/geocr_mcp.git@main" geocr-mcp-server

Docker

docker build -t geocr-mcp-server .
# stdio (local clients):
docker run -i --rm geocr-mcp-server
# hosted (HTTP transports):
docker run -p 8000:8000 geocr-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000

客户端配置

无需克隆 - 客户端通过 uvx 直接从 GitHub 安装(并缓存)两个包。

{
  "mcpServers": {
    "geocr": {
      "command": "uvx",
      "args": [
        "--from", "geocr-mcp @ git+https://github.com/HarshShinde0/geocr_mcp.git@main",
        "geocr-mcp-server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
{
  "mcp": {
    "servers": {
      "geocr": {
        "command": "uvx",
        "args": [
          "--from", "geocr-mcp @ git+https://github.com/HarshShinde0/geocr_mcp.git@main",
          "geocr-mcp-server"
        ],
        "env": {
          "FASTMCP_LOG_LEVEL": "ERROR"
        }
      }
    }
  }
}

仅在迭代服务器代码本身时需要这样做:

git clone https://github.com/HarshShinde0/geocr_mcp.git   # or this monorepo
{
  "mcpServers": {
    "geocr": {
      "command": "uv",
      "args": [
        "--directory", "/path/to/geocr_mcp",
        "run", "geocr-mcp-server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

以 HTTP 传输方式运行同一服务器,用于共享/远程的云计算:

geocr-mcp-server --transport streamable-http --host 0.0.0.0 --port $PORT

在 Render 上部署(1-点击 Blueprint)

此仓库包含一个 render.yaml blueprint:

  1. 登录 Render Dashboard

  2. 单击 New + -> Blueprint 并连接仓库 HarshShinde0/geocr_mcp

  3. 单击 Apply。Render 将自动构建容器并部署服务器。

实时端点:https://geocr-mcp-server.onrender.com/mcp

将客户端连接到托管 MCP

在 AI 客户端、IDE 或 agent 配置(mcpServers)中:

{
  "mcpServers": {
    "geocr-remote": {
      "url": "https://geocr-mcp-server.onrender.com/mcp"
    }
  }
}

在自定义反向代理后,TLS 在代理处终止,并设置 GEOCR_HOST=0.0.0.0GEOCR_TRANSPORT=streamable-http

环境变量

变量

默认值

描述

FASTMCP_LOG_LEVEL

WARNING

stderr 日志级别(DEBUGINFOWARNINGERROR)。

GEOCR_OUTPUT_DIR

系统临时目录

生成文件的写入目录(文件名被缩减为基本名称)。

GEOCR_CATALOGS_CONFIG

附带的 YAML

替代目录注册文件的路径 - 无需修改代码即可添加 catalogs/topics。

GEOCR_HOST / GEOCR_PORT

127传递给0.0.1 / 8000

SSE/streamable-http 传输的绑定地址(也可通过命令行标志设置)。

安全注意事项

  • 服务器在工具输入引用 URL 或从远程 distribution 物化记录(get_records_preview)时发出健康检查。在不信任的环境中请保持 limit 较小。

  • 生成的文件始终写入 GEOCR_OUTPUT_DIR 内;通过将文件名缩减为 basename 来阻止路径遍历。

  • 以非 root 身份运行容器(提供的 Dockerfile 已这样做)。

开发

cd geocr_mcp
uv venv && uv sync --all-groups     # or: python -m pip install -e ".[dev]"
uv run pytest --cov --cov-branch    # unit tests (no network required)
uv run ruff check src tests         # lint (same rules as awslabs/mcp)
npx @modelcontextprotocol/inspector geocr-mcp-server   # interactive debugging
Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Enables AI assistants to search and access geospatial datasets through STAC (SpatioTemporal Asset Catalog) APIs. Supports querying satellite imagery, weather data, and other geospatial assets with spatial, temporal, and attribute filters.
    11
    13
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Provides tools to search, download, and manage satellite imagery from all Copernicus Sentinel missions via the Copernicus Data Space ecosystem. It enables advanced geospatial queries, temporal coverage analysis, and automated data management for Earth observation tasks.
    13
    3
    LGPL 3.0
  • F
    license
    A
    quality
    D
    maintenance
    Provides access to the OpenLandMap STAC catalog, offering over 100 global environmental datasets including soil, climate, and vegetation data. It enables AI agents to discover, search, and retrieve Cloud-Optimized GeoTIFFs for global geospatial analysis.
    27
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides geospatial data intelligence tools for inspecting, querying, and converting geospatial data using DuckDB Spatial.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.

  • Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.

  • GIS tools for AI agents: 65 free tools + 8 paid (hazard/site-scouting/GeoJSON export)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HarshShinde0/geocr_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server