Hydrata - ANUGA Flood Simulation

السجل الرسمي أخرى

Run ANUGA flood simulations, track progress, and retrieve results on Hydrata Cloud.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http hydrata-anuga-flood-simulation 'https://hydrata.com/mcp/'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "hydrata-anuga-flood-simulation": {
            "type": "http",
            "url": "https://hydrata.com/mcp/"
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. hydrata-mcp-server
  2. Connect and authenticate
  3. Tools
  4. What is Hydrata?
  5. Development
  6. License

hydrata-mcp-server

MCP server for Hydrata Cloud — build ANUGA flood models from terrain and input layers, run simulations, track progress, and retrieve results through the Model Context Protocol.

Connect and authenticate

Endpoint: https://hydrata.com/mcp/ — Transport: Streamable HTTP.

Every tool call needs the caller's own hydrata.com credential: an agent key (Authorization: Bearer hk_…), a named, revocable grant at one of three levels (read < draft < launch) that the account owner creates — and can revoke, one at a time or all at once — on the site's Agent keys page (/agents/). The server holds no identity of its own and never parses the key: it forwards the Authorization header verbatim to the Hydrata REST API, where Django verifies it — so results are scoped by the real user's project permissions and the key's level, and the audit trail names them. Every JSON-RPC request — initialize, tools/list and ping as well as tools/call — that does not carry exactly one accepted credential (an agent key, or with the one-click connect flow configured its access token) is answered with 401, a JSON-RPC error -32001 and WWW-Authenticate: Bearer realm="hydrata.com" (plus resource_metadata="…" when the connect flow is configured) before it reaches the MCP SDK: no Authorization header, HTTP Basic, or any other Bearer token such as a GeoNode OAuth token. Only an agent key is subject to the key's level, the account's pause switch, the spend limit and the agent activity log. The 401 on the first request is what tells an OAuth-aware client such as claude.ai that the server needs sign-in (TASK-3987), so the tool catalog is not served anonymously. The server checks only the credential's shape (it holds no key store); Django verifies the key or token itself on every tool call. A body that is not JSON-RPC is left to the SDK's own error, and a GET is answered 405.

The server is not yet open to external accounts: there is no self-serve way to connect your own hydrata.com login to it today, and this README deliberately carries no client-side credential recipe. If you would like to use it, contact us at hydrata.com.

Tools

Version 0.2.0 exposes twenty-eight tools: eleven that read projects, inputs and scenarios and drive a run, eight that build a model from terrain and input layers the agent has already uploaded, six that record flood observations, and three that compare a historic run with them (Compare with observations). Every tool carries MCP annotations (a title; readOnlyHint on the eleven read tools; destructiveHint only on cancel_run and delete_observation).

ToolDescription
list_projectsList ANUGA simulation projects (paginated)
get_projectGet one project — name, projection, visibility, your role, base_map — plus ui_url, the link that opens its map
get_scenarioGet a scenario's compact state — computed_status, its inputs (terrain, boundary, friction, inflow, rainfall, building, mesh region, culvert, resolution, duration), the mesh-triangle estimate + breakdown, the price (compute_cost_estimate, vcpu_hours_estimate) and the latest run's id/status/error — never the raw detail
start_simulationStart a flood simulation (local/EC2/Batch backends); the returned run record has its presigned download links elided; hand-back link opens the run. A run over the agent key's monthly spend limit (default $0), or one Hydrata cannot price, is not started: the tool relays Hydrata's CONSENT_REQUIRED at once with the consent_url the person opens in their browser (consent_timeout_seconds > 0 also polls the run for their click)
get_run_statusLightweight status poll (<50ms); phase is never empty (preparing_inputs while a computing run has no progress yet)
get_runFull run details with timing, log and result layers; presigned s3_*_url download links are elided
cancel_runCancel an in-flight simulation; hand-back link opens the scenario
retry_runRetry a failed simulation (rebuilds the scenario as a new run); hand-back link opens the scenario
list_runsList runs across a project (with status filter); presigned s3_*_url download links are elided from every row
list_inputsEvery input row of a project per kind (boundary, friction, inflow, rainfall, building, mesh region, culvert) — row id, title, dataset, WFS typename and whether it has features — so the agent never has to probe files
list_time_seriesA project's time series — id, name, type, units, row count and first/last timestamp; the data rows are never returned
create_projectCreate an ANUGA project with a name and EPSG projection; returns its base_map and the ui_url of its map
presign_terrain_uploadReturn a presigned URL + key so the agent PUTs the terrain GeoTIFF itself (no file bytes pass through MCP)
finalize_terrain_uploadRegister the uploaded terrain; the import chain seeds the project's six default boundary/friction/inflow/rainfall/building/mesh-region rows (no culvert row: attach_input_layer creates 'Culvert 01' on demand)
get_terrainPoll the terrain until it is ready (bounded; timed_out means call again); phase is never empty; summary = WGS84 bbox, elevation min/max, nodata fraction, native CRS; the link frames the DEM
create_time_seriesCreate a time series (rain gauge, hydrograph or tide/stage — series_type and units are top-level fields) from {"rowData": [...]}; a rainfall polygon binds to its gauge by the series name; summary = row count + first/last timestamp; the link opens the Hydrology panel
attach_input_layerAttach a GeoJSON dataset the agent already uploaded as the project's boundary/friction/inflow/rainfall/building/mesh-region or culvert layer (kind structure = deprecated alias of building); culvert attributes are mapped onto the culvert fields with defaults filled, and culvert_problems lists what the build will still refuse; breakline is refused; summary = feature count (WFS hits) + WGS84 bbox + whether the map now shows the layer; the link opens Inputs and frames the layer
create_scenarioCreate a draft scenario and return its mesh-triangle estimate and price (resolution — scenario and mesh-region — is a length in metres); the link opens the scenario
build_scenarioBuild the scenario package; shows the estimate first and needs confirm=true above 100,000 triangles; polls computed_status to built; never re-posts a build that is in flight or already built (rebuild=true to force one); surfaces the server's 422 refusals (MESH_TOO_LARGE, BOUNDARY_NO_EXTERNAL, MESH_REGION_UNITS_UNMARKED) verbatim; a missing/empty/perimeter-less boundary sends the human to the map to draw or fix it; summary = triangle count + re-priced cost
create_observation_layerCreate a flood observation layer (project-level, never a scenario input) with its vertical datum (terrain, AHD, EGM2008, ellipsoidal, or local + datum_offset_m); waits for the map layer (ready, bounded); the link frames it in the Observations group
list_observationsA project's flood observation layers, or one layer's observations — fid, subtype, stage/depth, sigma, bound, observed window in UTC, datum status (unknown = not scored), photo_count and problems
add_observationsAdd Flood marks, Timed levels, Gauge records and Dry points (up to 200 per call; srid for native coordinates, entry_timezone for naive times); the API validates each one, refused rows come back with the field that is wrong while the rest land
update_observationEdit one observation (PATCH of the fields given; validated against the stored observation)
delete_observationDelete one observation and its photos
add_observation_photo_linkAttach a photo to an observation as a reference link only (stored, never fetched); a photo FILE is refused with the UI path — the engineer uploads files in the photo strip on the observation's form in the map
get_observation_comparisonHow a historic run compares with the project's flood observations: headline (figures at a tolerance, 0.3 m default; no pass or fail), statistics (n, within, bias, RMSE, weighted RMSE, MAE, max), Gauge record peak/timing/NSE, datum checks and one row per observation (residual = modelled - observed; unscored and excluded rows included). layer_id + fid narrow it to one observation with its exclusion history; Gauge records' modelled series are elided unless include_series. A design or unlabelled run reports has_comparison: false, not an error
set_observation_exclusionExclude one observation from a run's comparison with the engineer's reason (required: the tool refuses a blank one and the agent must ask), or include it again; logged with user and reason; returns headline_after
set_comparison_toleranceSave the project's default comparison tolerance (metres, above 0 and at most 5; Editor+). get_observation_comparison uses it unless tolerance is passed, which saves nothing
The hand-back: the engineer signs off in the map

Every tool that changes something (create_project, finalize_terrain_upload, get_terrain, create_time_series, attach_input_layer, create_scenario, build_scenario, start_simulation, cancel_run, retry_run, the five flood observation writes, and the three comparison tools) also returns:

  • ui_url — https://<site>/catalogue/#/map/<base_map>?panel=…&layer=…&scenario=…&run=…, which opens the project map on the thing that changed (the Inputs panel framing the attached layer, the Hydrology panel, the scenario, the run);
  • summary — numbers the engineer can check (feature count and bbox, elevation range, row count and time span, triangle estimate and price);
  • say_to_user — the sentence the agent should relay.

The server's instructions tell the agent to hand the link to the user after each layer lands and to wait for the user before start_simulation. Refusals the user can fix in the map (no boundary, no External boundary edge) carry the link too. Every request the server forwards carries X-Hydrata-Client: mcp/<version> and X-Hydrata-Session: <uuid> — informational only (client-asserted), never used for authorship.

No tool accepts file contents inline. The agent moves the bytes itself — the terrain GeoTIFF to the presigned URL, a GeoJSON layer to the REST API upload endpoint — and hands the server the resulting key or upload id.

No read tool relays a presigned S3 URL. A run's result links are 6-hour capabilities carrying a temporary AWS credential, and the server forwards the caller's own credential rather than holding one, so a tool that echoed such a link would widen what an agent transcript is worth beyond what the caller asked for. Every read tool (and start_simulation) elides them, recursively, by key name (s3_*_url) and by value shape (any string carrying X-Amz-Signature / X-Amz-Security-Token, redacted in place so the rest of a log line survives); results stay viewable through the gn_layer_* WMS entries. presign_terrain_upload is the sole exception: its upload_url is the URL the caller explicitly asked for.

Typical workflow

Run a scenario that already exists:

list_projects → get_scenario → start_simulation → poll get_run_status → get_run

Import a model and run it:

create_project → presign_terrain_upload → PUT the GeoTIFF → finalize_terrain_upload → get_terrain
→ create_time_series / attach_input_layer → create_scenario → build_scenario
→ start_simulation → poll get_run_status → get_run

What is Hydrata?

Hydrata is a geospatial hydraulic modeling platform. It runs ANUGA flood simulations in the cloud — upload terrain data, configure scenarios, run simulations on managed compute (Celery, EC2, or AWS Batch), and visualise results on interactive maps.

ANUGA is an open-source hydrodynamic model developed by Geoscience Australia and the Australian National University. It solves the shallow water wave equations using finite volumes on an unstructured triangular mesh.

Development

git clone https://github.com/Hydrata/hydrata-mcp-server.git
cd hydrata-mcp-server
pip install -e ".[dev]"
pytest -v

Contributions welcome — see issues.

License

MIT

الأسئلة الشائعة

ما هو Hydrata - ANUGA Flood Simulation؟

Run ANUGA flood simulations, track progress, and retrieve results on Hydrata Cloud.

كيف أثبّت Hydrata - ANUGA Flood Simulation؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http hydrata-anuga-flood-simulation 'https://hydrata.com/mcp/'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Hydrata - ANUGA Flood Simulation إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل Hydrata - ANUGA Flood Simulation مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون Hydrata - ANUGA Flood Simulation؟

ينشره Hydrata. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.