opm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPM_MCP_FLOW_BIN | No | Binary name / absolute WSL path for Flow. | flow |
| OPM_MCP_LOG_TAIL | No | Default line count for flow_log_tail. | 200 |
| OPM_MCP_WORK_DIR | No | Where job logs and artefacts go. | ~/.opm-mcp (Win) |
| OPM_MCP_WSL_DISTRO | No | Name of the WSL distro to run OPM in. | Ubuntu-24.04 |
| OPM_MCP_JOB_HISTORY | No | How many recent jobs to remember in-memory. | 50 |
| OPM_MCP_FLOW_THREADS | No | --threads-per-process default for runs. | 0 (auto) |
| OPM_MCP_RESINSIGHT_BIN | No | Binary name / absolute WSL path for ResInsight. | ResInsight |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| opm_environmentA | Report which OPM binaries and Python bindings the server can reach. Use this first when troubleshooting — it tells you whether |
| list_casesA | Scan a directory tree for simulation cases (.DATA decks and .SMSPEC results). The session opener: returns case names, deck paths, whether results exist, and modification times (newest first). |
| to_wsl_pathA | Translate a Windows path to its WSL equivalent ( |
| to_windows_pathA | Translate a WSL path back to its Windows form. |
| validate_deckB | Parse an ECLIPSE/Flow DATA deck and report keyword counts + parser issues. |
| summarize_deckC | High-level deck summary: phases, units, grid dimensions, wells, schedule length. |
| list_wellsB | List wells declared in the deck at the first schedule step. |
| deck_textA | Numbered text slice of a deck (or one of its include files) — no WSL needed. Decks are plain ASCII; use this instead of host-shell head/sed when a
client misdetects .DATA as binary. |
| deck_grepA | Regex search across a deck AND its resolved INCLUDE tree (PATHS-aware). The deck-QC workhorse: |
| run_flowA | Start an OPM Flow simulation in the background; returns a job id immediately.
|
| flow_statusB | Check whether a Flow job is still running, with the latest progress line. |
| flow_log_tailA | Return the tail of a Flow job's combined stdout/stderr log.
|
| flow_cancelB | Cancel a running Flow job. |
| flow_jobsA | List recent Flow jobs known to this server. |
| list_summary_vectorsB | List summary vector keys in a case. Optional glob pattern (case-insensitive). |
| read_summaryB | Read one or more summary vectors as time series, downsampled to
|
| field_summaryB | Field-level KPIs: cumulative production/injection, pressure, final rates. |
| well_summaryC | Per-well KPIs: oil/gas/water rates, BHP, cumulative production. |
| grid_infoB | Static grid info: dimensions, active count, porosity/permeability stats. |
| restart_infoB | List report steps available in a UNRST file plus the keywords it contains. |
| compare_summariesA | Compare two cases on field totals (or supplied keys). Default = FOPT/FGPT/FWPT/FPR. |
| plot_summaryA | Plot summary vectors to a PNG, rendered inline in the chat. Keys accept wildcards ( |
| plot_property_mapA | I–J areal map of a grid property for one K layer, rendered inline. Dynamic (PRESSURE/SWAT/SGAS/SOIL from UNRST at a report step, default last) or static (PORO/PERMX/NTG/PORV from INIT). Inactive cells blank; axes are 1-based I/J. The no-GL alternative to a ResInsight view for sweep/depletion QC. |
| material_balance_checkC | Field MB QC: OOIP, recovery factor, exact oil mass-balance drift, surface VRR. |
| flow_convergence_reportC | Solver performance from INFOSTEP/INFOITER: time by stage, wasted steps, worst steps. |
| restart_propertyC | Per-layer stats for a dynamic property (PRESSURE/SWAT/SGAS/SOIL) at a report step. |
| compare_to_observedB | History-match QC: misfit (RMSE/bias/MAE/NRMSE) of simulated vs observed data. CSV: first column date (ISO), remaining headers are summary keys (WBHP:PROD, FOPR, ...); blank cells = no observation. Returns per-key stats and an inline sim-vs-obs overlay plot. |
| rft_dataA | RFT surveys (pressure vs depth at well connections) from CASE.RFT. For perforation-pressure / gradient QC. Requires WRFTPLT in the deck's SCHEDULE section. Cell i/j/k are 1-based. |
| clone_deckA | Clone a deck with safe text overrides (append_before_end / replace_regex / set_title / insert_after_keyword). Writes a NEW deck, reports per-op substitution counts, and re-validates.
Idiomatic rate/BHP change: append a new WCONPROD/WCONINJE via
|
| resinsight_snapshotB | Render the default 3D view of a case in ResInsight and save a PNG snapshot. |
| resinsight_well_logC | Export an LAS well log for one well using ResInsight. |
| resinsight_openA | Open ResInsight as an interactive GUI (relies on WSLg). Returns immediately. |
| convert_eclB | Convert between formatted (F*) and unformatted ECL result files. |
| compare_eclC | Compare two ECL result files within tolerances using |
| make_restart_deckA | Generate a restart (history -> prediction) deck via OPM's Restarts |
| pack_deckB | Flatten a deck and all its INCLUDEs into a single file using |
| hash_deckA | Compute a deterministic hash of a deck using |
| summary_toolC | Run the OPM |
| upscaling_statusA | Detect whether the optional |
| run_upscalingB | Run an opm-upscaling binary (
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 40 tools
Most tools have a clear resource-action separation: deck tools, flow job tools, summary tools, and ResInsight tools are easy to tell apart. The main ambiguity is summary_tool vs read_summary/list_summary_vectors, and the cluster of result-reading/plotting tools could occasionally be confused.
There are strong consistent clusters like flow_*, list_*, plot_*, compare_*, and resinsight_*, but the overall naming is mixed: validate_deck/summarize_deck/deck_text/deck_grep place deck inconsistently, and summary_tool/flow_convergence_report break the verb_noun pattern. The style is readable but not fully predictable.
At 40 tools, the surface is well beyond the 25+ threshold for a heavy MCP server, even though the domain spans deck prep, simulation control, results analysis, plotting, restart, and upscaling. Many tools are individually useful, but the overall count creates a steep learning curve and likely too broad an API surface.
The set covers the core OPM workflow well: environment checks, path translation, deck validation/editing, simulation launch and monitoring, summary/grid/RFT access, history-match comparison, restart deck generation, and upscaling. Minor gaps include no direct case deletion/rename, limited schedule editing beyond clone_deck overrides, and no explicit cleanup/management of generated files or jobs.