MODFLOW AI
sign in
documentation agent

Grounded answers on MODFLOW, PEST, FloPy, and PyEMU.

Every answer cites official documentation, source code, and tutorials. Ask in the browser, or bring the same knowledge base into Claude Code, Cursor, VS Code, and other MCP compatible clients.

1862 documents · 233 modules · 158 tutorials

Request access→Connect your IDE ↓
quick start

Use it in the browser

Ask questions about MODFLOW, PEST, FloPy, and PyEMU without leaving the browser. The agent writes code, explains errors, and cites official documentation, source code, and tutorials.

open chat →
power users

Connect it to your IDE

Model Context Protocol server. Expose MODFLOW AI inside Claude Code, Claude Desktop, Cursor, or any MCP-compatible client. Same knowledge base, inside your IDE.

request access →
mcp.modflow.ai/mcp
mcp.modflow.ai/mcp
CLI
claude mcp add --transport http modflow-ai https://mcp.modflow.ai/mcp

example answers

How do I set up a heat transport model in MODFLOW 6 using the GWE (energy) package?

A GWE model couples to a GWF flow simulation and adds packages specific to thermal energy. In FloPy you instantiate ModflowGwe with an EST package for thermal storage, a CND package for conduction and mechanical dispersion, and boundary conditions through CTP or the advanced packages (SFE for streams, LKE for lakes, MWE for multi-aquifer wells). A GwfGweExchange block wires the two models together so heads from GWF drive temperature in GWE.

source: mf6suptechinfo.pdf · ch. 10

source: flopy/mf6/modflow/mfgwegwe.py

How does the CLN package connect to groundwater cells in MODFLOW-USG?

The CLN process solves 1D linear features (wells, pipes, karst conduits) simultaneously with the 3D groundwater flow domain, using a single Newton-Raphson linearization over both. Each CLN to GWF connection computes exchange flow as conductance × wetted perimeter fraction × head difference, with four options for the conductance term (Thiem, direct leakance, skin factor, or well efficiency).

source: mfusg_io.pdf · CLN process

source: mfusg_base.pdf · CLN equations

What does PyEMU's PstFrom do, and how do I use it to build a PEST interface from a MODFLOW model?

PstFrom is a builder class in pyemu.utils that generates the full PEST(++) interface from your MODFLOW inputs. It produces a control file, template files, instruction files, and a forward run script. Parameters are set up as multipliers over existing arrays and list file values, so the original model stays the prior mean while PEST scales them during calibration.

source: pstfrom_mf6.ipynb

source: pyemu/utils/pst_from.py

Docs·Tutorials·GWLAB · 2026