MCP server
egms_client.mcp_server ¶
EGMS as tools for AI agents: an MCP server. Needs the mcp extra.
egms mcp serves these tools over stdio to any MCP client (Claude
Desktop, Claude Code, IDE assistants):
releases: the published releases;find_files: what the archive holds over a box, and its size, with nothing downloaded;velocity_at: the L3 velocity of the 100 m cell at a point;area_summary: statistics of the L3 velocity over a box, and its fastest cells.
Every answer names the release and the files it was computed from. The
numbers come from the data, never from the model: the tools return them,
and the client only words them. Downloads are bounded: area_summary
refuses a box touching more than max_tiles L3 tiles (about 60 MB each,
kept in directory for the next call). The service key is read from the
server's environment (EGMS_SERVICE_KEY_FILE or EGMS_SERVICE_KEY) and
never passes through the conversation.
create_server ¶
create_server(archive: ArchiveFactory | None = None, *, directory: Path | None = None, max_tiles: int = MAX_TILES, key_file: Path | None = None) -> MCPServer[Any]
The MCP server, its tools bound to one :class:EgmsArchive.
archive builds that client on the first call (default: one reading
key_file, else the environment), so the server starts even without
a key and says what is missing when a tool is used. directory is
where tiles are kept (default :func:default_directory).
summarize ¶
summarize(tiffs: list[Path], *, box: tuple[float, float, float, float], stable_band: float = 2.0, fastest: int = 5) -> _Stats
The statistics area_summary returns, over the cells inside a box in degrees.
Only cells whose centre falls inside the box count (the box is curved in EPSG:3035, so its bounding rectangle holds more). Pure: no network.