Skip to main content

mfai-viewer

The writer behind the open_in_viewer tool of the MODFLOW AI MCP (https://mcp.modflow.ai). It turns a MODFLOW 6 simulation that was built with FloPy and run on this machine into the snapshot the MODFLOW AI web viewer (viewer.modflow.ai) reads, and uploads that snapshot to the link the MCP tool created.

python -m pip install mfai-viewer
mfai-viewer snapshot --workdir <model dir> --out <snapshot dir>
mfai-viewer upload <snapshot dir> "<uploads url from open_in_viewer>"
mfai-viewer version

snapshot refuses a model that has not been run (no head file). It writes manifest.json and a small summary.json; the MCP tool takes the summary and answers the one upload command to run. upload sends every file in parallel, retries, marks the link complete and prints the URL.

Exit codes: 0 done, 2 the environment cannot run it (Python older than 3.10, missing packages, bad arguments), 3 the model has not been run, 4 files are still missing after the upload, 1 anything else.

The writer code (mfai_viewer/writer) and the GWlink slice it vendors (mfai_viewer/gwlink) are copied byte for byte from the mfai-chat and gwlink repositories; mfai_viewer/sources.json records the commits and the sha256 of every file. Nothing is edited here.

Release files for mfai-viewer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mfai-viewer 0.1.1
File Size Uploaded
mfai_viewer-0.1.1.tar.gz 143.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mfai-viewer 0.1.1
File Interpreter ABI Platform
mfai_viewer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 305.7 kB

Release files / mfai_viewer-0.1.1.tar.gz

Download URL mfai_viewer-0.1.1.tar.gz
Size 143.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2ab1b9e09935ec531e4f3af6d89ce3058d37073483c124f78e69233f67e10e3d
BLAKE2b-256 checksum
How to use checksums
5fe563791e7213a9806a7a8dc15600ff89f20ea45c40b6535a9bd7cfc63b554a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / mfai_viewer-0.1.1-py3-none-any.whl

Download URL mfai_viewer-0.1.1-py3-none-any.whl
Size 162.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
645ed397e8173e64bafa13cfa8923b7c4cce798111a486eb7357349c26216b58
BLAKE2b-256 checksum
How to use checksums
3c0b0d1dd2b7001b33162f174e6ca57eb10bffc7576e977af832d28ee292d2b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page