Skip to main content

RAS Commander MCP

RAS Commander MCP provides bounded, read-only information from HEC-RAS project and plan text through the public RAS Commander Python API. It requires no HEC-RAS executable. The fuller modeling, analysis and GIS experience uses RAS Commander and its Python workflows outside MCP.

This independent open-source project complements HEC's work. It is not affiliated with or endorsed by USACE HEC. Official HEC references remain passive reader links.

Scope

The explicit tool set covers server/version information, project length units, plan descriptions, and selected project/plan metadata. Project metadata and plan configuration require the new upstream RasText API; on ras-commander 0.103.0, units and descriptions work and metadata tools return an actionable availability error. See release sequencing.

Project tools belong only in bounded informational subagents. Each delegation specifies the question, configured root, named file, selected fields, row and character limits, and answer format. The child returns a compact answer with source identity, installed versions, missing data and truncation. A host without subagent tool isolation should use a scoped Python workflow instead of exposing project tools to its main coordinator.

MCP does not modify projects, compute, read HDF/DSS, inspect geometry/coordinates, extract gridded data, export files, download into projects, or execute arbitrary code. Large and repeated drilldowns use Python. Tool annotations describe this boundary; descriptor checks, allowlists and bounded snapshots enforce the reads.

Install and configure

Use Python 3.10+ and an authorized managed environment. This 0.4 redesign is an unpublished candidate; the current PyPI package is 0.3.2 and has the previous tool set. To review this candidate, install from its checkout:

python -m pip install .

After 0.4 is published and qualified, a managed current install can use python -m pip install --upgrade ras-commander-mcp. Preserve an existing pin or lock when required.

Set RAS_MCP_ALLOWED_ROOTS to a JSON array of absolute, resolved project roots. No roots are trusted by default. On Linux/macOS:

export RAS_MCP_ALLOWED_ROOTS='["/home/user/projects/example"]'
ras-commander-mcp

On PowerShell:

$env:RAS_MCP_ALLOWED_ROOTS = '["C:\\Projects\\Example"]'
ras-commander-mcp

The server uses stdio. Configure the executable and environment in a client that routes project tools to subagents. claude_desktop_config.json illustrates transport configuration, not proof that desktop clients provide this routing. No project query performs package installation or an automatic upgrade.

Dependencies and updates

Direct dependencies are the official MCP Python SDK (without CLI extras), ras-commander and packaging. The SDK has protocol/validation/network dependencies; ras-commander currently inherits numpy, pandas and h5py. This is a small adapter, not a stdlib-only installation. No GIS, Java/DSS or remote-engine extras are added.

server_information(check_updates=true) optionally checks fixed PyPI metadata endpoints with bounded responses and caching. It reports installed/latest versions and update availability; offline use remains available. Preserve deliberate user pins and refresh managed environments outside tool calls.

Documentation

The full library documentation is at RAS Commander.

Metadata

Release files for ras-commander-mcp 0.4.0

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

Source distribution (sdist)

Source distribution for ras-commander-mcp 0.4.0
File Size Uploaded
ras_commander_mcp-0.4.0.tar.gz 31.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ras-commander-mcp 0.4.0
File Interpreter ABI Platform
ras_commander_mcp-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.2 kB

Release files / ras_commander_mcp-0.4.0.tar.gz

Download URL ras_commander_mcp-0.4.0.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
07a9f6d32b6dbd2b9f3db938f1fb1db146e4ec064cc9a263a5bdb95a8c17849e
BLAKE2b-256 checksum
How to use checksums
a8f18e2e4f72dbb9256e35065dffd708be0f4fc398e18120bd597e9a7093c2f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / ras_commander_mcp-0.4.0-py3-none-any.whl

Download URL ras_commander_mcp-0.4.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c965483c551da44c26ac1eabc1646353c30ab2e34f93c122804f50e52f24e3e6
BLAKE2b-256 checksum
How to use checksums
976d6634ad8f50778c17a377fc131b5c3897c82fc77cba398e22ef07d80695e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

0.3.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